Skip to content

Commit

Permalink
Handle NavigationDrawer & container spacing;
Browse files Browse the repository at this point in the history
Minor cleanup

Signed-off-by: Don Alfons Nisnoni <[email protected]>
  • Loading branch information
itsdonnix committed Feb 19, 2021
1 parent 8eb47eb commit 4b2b232
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/frontend/src/components/SiteNavigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
export let segment;
</script>

<NavigationDrawer active={sidenav} borderless class="h-screen show-after-200ms" clipped fixed>
<NavigationDrawer active={sidenav} borderless class="h-screen" clipped fixed>
<List dense nav>
{#each routes as item}
<NavItem {item} {segment} />
Expand Down
18 changes: 16 additions & 2 deletions src/main/frontend/src/routes/_layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<MaterialApp theme={$theme}>
{#if $isLoggedIn}
<AppBar>
<AppBar fixed style="width:100%">
<div slot="icon">
<Button
aria-label="Open Menu"
Expand Down Expand Up @@ -54,7 +54,21 @@

<SiteNavigation {segment} bind:sidenav />
{/if}
<Container>

<Container class="main">
<slot />
</Container>
</MaterialApp>

<style lang="scss" global>
.main {
padding-top: 5rem;
}
// medium screens and up
@media (min-width: 768px) {
.s-navigation-drawer.active ~ .main {
padding: 5rem 7rem 0 13rem !important;
}
}
</style>
15 changes: 14 additions & 1 deletion src/main/frontend/static/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ body {
}

.h-screen {
height: 100vh;
height: 100vh !important;
}

.m-0 {
Expand All @@ -62,6 +62,7 @@ body {
}
}

/* medium screens and up */
@media (min-width: 768px) {
.md\:flex-row {
flex-direction: row !important;
Expand All @@ -70,10 +71,22 @@ body {
.md\:max-width-initial {
max-width: initial;
}

.md\:d-none {
display: none !important;
}
}

/* large screens and up */
@media (min-width: 1024px) {
.lg\:flex-row {
flex-direction: row !important;
}
}

/* medium screens and down */
@media (max-width: 768px) {
.md-and-down\:d-none {
display: none !important;
}
}

0 comments on commit 4b2b232

Please sign in to comment.