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 { faWandMagic, faPlusCircle, faInfoCircle } from '@fortawesome/free-solid-svg-icons'
|
||||
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>
|
||||
|
||||
<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">
|
||||
<py-script auto-generate target="page:mydiv" source='./mycode.py'>
|
||||
sum([1, 2, 3, 4, 5])
|
||||
</py-script>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="w-full p-6 bg-black text-white flex space-between">
|
||||
<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">
|
||||
<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);"/>
|
||||
</a>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user