mirror of
https://github.com/pyscript/pyscript.git
synced 2022-05-01 19:47:48 +03:00
add referece to main in stores and clean main contents
This commit is contained in:
@@ -2,24 +2,31 @@
|
|||||||
import Fa from 'svelte-fa';
|
import Fa from 'svelte-fa';
|
||||||
import { faWandMagic, faPlusCircle, faInfoCircle } from '@fortawesome/free-solid-svg-icons'
|
import { faWandMagic, faPlusCircle, faInfoCircle } from '@fortawesome/free-solid-svg-icons'
|
||||||
import SideNav from "./SideNav.svelte";
|
import SideNav from "./SideNav.svelte";
|
||||||
|
import { onMount } from 'svelte';
|
||||||
|
|
||||||
|
import { mainDiv } from './stores';
|
||||||
|
|
||||||
|
// reference to the main application div
|
||||||
|
let main;
|
||||||
|
onMount(() => {
|
||||||
|
// set the mainDiv in stores to point to the main div, after it has been mounted
|
||||||
|
mainDiv.set(main);
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex content-between flex-wrap min-h-full flex-grow">
|
<div class="flex content-between flex-wrap min-h-full flex-grow">
|
||||||
<main class="w-full p-6">
|
<main class="w-full p-6" bind:this={main}>
|
||||||
<div role="alert" class="w-full p-2 rounded-full bg-teal-light text-teal-darker text-lg">
|
<div role="alert" class="w-full p-2 rounded-full bg-teal-light text-teal-darker text-lg">
|
||||||
<py-script auto-generate target="page:mydiv" source='./mycode.py'>
|
|
||||||
sum([1, 2, 3, 4, 5])
|
|
||||||
</py-script>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="w-full p-6 bg-black text-white flex space-between">
|
<footer class="w-full p-6 bg-black text-white flex space-between">
|
||||||
<p class="logo-title text-center">PyScript</p>
|
<p class="logo-title text-center">PyScript</p>
|
||||||
<p class="w-full ml-6 text-center sm:text-left">Copyright © 2019</p>
|
<p class="w-full ml-6 text-center sm:text-left">Copyright © 2022</p>
|
||||||
|
|
||||||
<aside class="w-full sm:w-auto text-center sm:text-right">
|
<aside class="w-full sm:w-auto text-center sm:text-right">
|
||||||
<a href="https://github.com/SlawomirChabowski" title="My Github page" class="text-white block">
|
<a href="https://pyscript.com" title="PyScript" class="text-white block">
|
||||||
<Fa icon={faInfoCircle} style="transform: scale(2);"/>
|
<Fa icon={faInfoCircle} style="transform: scale(2);"/>
|
||||||
</a>
|
</a>
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
Reference in New Issue
Block a user