Commit ec0fbd12 authored by Christophe Benz's avatar Christophe Benz
Browse files

Add sticky footer

parent cdbad9e1
<div class="flex flex-col min-h-screen">
<div class="flex-grow bg-gray-50">
<slot name="content" />
</div>
<slot name="footer" />
</div>
......@@ -11,6 +11,7 @@
ProgressLinear
} from "smelte"
import { breakpoint } from "../stores.js"
import StickyFooter from "../components/StickyFooter.svelte"
const { preloading, page, session } = stores()
......@@ -37,59 +38,75 @@
</title>
</svelte:head>
{#if $preloading}
<ProgressLinear app />
{/if}
<StickyFooter>
<div slot="content">
{#if $preloading}
<ProgressLinear app />
{/if}
<AppBar>
<div class="lg:hidden">
<Button
icon="menu"
small
flat
remove="p-1 h-4 w-4"
iconClass={config.appBar.hamburgerMenu.color}
iconClasses={i => i.replace("p-4", "p-3").replace("m-4", "m-3")}
text
on:click={() => {
showNav = !showNav
showNavMobile = !showNavMobile
}} />
</div>
<a href="." class="{config.appBar.title.classes} lg:px-8">
{config.appBar.title.text}
</a>
<Spacer />
<Tabs
class="hidden lg:flex"
color="black"
notSelectedColor="black"
items={navMenu}
bind:selected={path} />
</AppBar>
<AppBar>
<div class="lg:hidden">
<Button
icon="menu"
small
flat
remove="p-1 h-4 w-4"
iconClass={config.appBar.hamburgerMenu.color}
iconClasses={i => i.replace("p-4", "p-3").replace("m-4", "m-3")}
text
on:click={() => {
showNav = !showNav
showNavMobile = !showNavMobile
}} />
</div>
<a href="." class="{config.appBar.title.classes} lg:px-8">
{config.appBar.title.text}
</a>
<Spacer />
<Tabs
class="hidden lg:flex"
color="black"
notSelectedColor="black"
items={navMenu}
bind:selected={path} />
</AppBar>
{#if $bp}
<main class="mt-12 bg-gray-50">
<NavigationDrawer
bind:showDesktop={showNav}
bind:showMobile={showNavMobile}
breakpoint={$bp}>
<List items={navMenu}>
<span slot="item" let:item class="cursor-pointer">
<a href={item.to}>
<ListItem
id={item.id}
text={item.text}
to={item.to}
selected={path.includes(item.to)}
selectedClasses="bg-primary-transLight hover:bg-primary-transLight"
dense
navigation />
</a>
</span>
</List>
<hr />
</NavigationDrawer>
<slot />
</main>
{/if}
{#if $bp}
<main class="mt-12">
<NavigationDrawer
bind:showDesktop={showNav}
bind:showMobile={showNavMobile}
breakpoint={$bp}>
<List items={navMenu}>
<span slot="item" let:item class="cursor-pointer">
<a href={item.to}>
<ListItem
id={item.id}
text={item.text}
to={item.to}
selected={path.includes(item.to)}
selectedClasses="bg-primary-transLight
hover:bg-primary-transLight"
dense
navigation />
</a>
</span>
</List>
<hr />
</NavigationDrawer>
<slot />
</main>
{/if}
</div>
<footer
slot="footer"
class="bg-gray-100 text-center border-t border-grey p-4">
<a class="a" href="https://framagit.org/jailbreak/vitrine/" target="_blank">
Vitrine
</a>
– a Hackathon Dashboard powered by
<a class="a" href="https://www.discourse.org/" target="_blank">Discourse</a>
and
<a class="a" href="https://about.gitlab.com/" target="_blank">GitLab</a>
</footer>
</StickyFooter>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment