8000 Add visibility css for pyscript dev buttons and support for opening/c… · fskydev/pyscript@c6a99e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit c6a99e8

Browse files
committed
Add visibility css for pyscript dev buttons and support for opening/close component details nav
1 parent 2f019d3 commit c6a99e8

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

pyscriptjs/src/App.svelte

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import { faPlusCircle } from '@fortawesome/free-solid-svg-icons'
55
import Tailwind from "./Tailwind.svelte";
66
import { loadInterpreter } from './interpreter';
7-
import { pyodideLoaded, loadedEnvironments, navBarOpen } from './stores';
7+
import { pyodideLoaded, loadedEnvironments, navBarOpen, componentsNavOpen } from './stores';
88
import Main from "./Main.svelte";
99
import Header from "./Header.svelte";
1010
import SideNav from "./SideNav.svelte";
11+
import ComponentsNav from "./ComponentsNav.svelte";
12+
import ComponentDetailsNav from "./ComponentDetailsNav.svelte";
1113
1214
let iconSize = 2;
1315
let pyodideReadyPromise
@@ -41,6 +43,10 @@
4143
});
4244
}
4345
46+
function toggleComponentsNavBar(evt){
47+
componentsNavOpen.set(!$componentsNavOpen);
48+
}
49+
4450
</script>
4551

4652
<svelte:head>
@@ -49,27 +55,38 @@
4955

5056
<style>
5157
:global(div.dev-buttons-group) {
52-
margin-top: -12px;
58+
margin-top: -15px;
5359
z-index: 9999;
5460
}
5561
5662
:global(div.output) {
57-
margin-top: -25px;
5863
z-index: 9999;
5964
}
65+
66+
:global(div.buttons-box) {
67+
visibility: hidden;
68+
}
69+
70+
:global(.parentBox:hover .buttons-box) {
71+
visibility: visible;
72+
}
73+
6074
</style>
6175

6276
<Tailwind />
6377

64-
6578
<div class="flex flex-wrap bg-grey-light min-h-screen">
6679
<div>
6780
<SideNav />
6881
</div>
82+
<div>
83+
<ComponentsNav />
84+
</div>
85+
<div><ComponentDetailsNav /></div>
6986
<div id="main" class="w-full min-h-full absolute pin-r flex flex-col">
7087
<Header />
7188
<div id="add-component" class="lex flex-column w-full text-lg">
72-
<div style="margin-left: 50%;" on:mouseenter={bumpSize} on:mouseleave={downSize}>
89+
<div style="margin-left: 50%;" on:mouseenter={bumpSize} on:mouseleave={downSize} on:click={toggleComponentsNavBar}>
7390
<Fa icon={faPlusCircle} class="grow-icon"style="transform: scale({iconSize});"/>
7491
</div>
7592
</div>

0 commit comments

Comments
 (0)
0