Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
SOD/views/layout.pug
2020-09-30 08:33:26 +02:00

60 lines
2.4 KiB
Text

include mixin
doctype html
html
head
title= title
link(rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons")
link(rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css")
link(rel="stylesheet" href="/stylesheets/style.css")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
link(rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png")
link(rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png")
link(rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png")
link(rel="manifest" href="/site.webmanifest")
link(rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#5bbad5")
meta(name="msapplication-TileColor" content="#da532c")
meta(name="theme-color" content="#ffffff")
body
mixin nav
if user
if user.permissions >= 1
li: a(href="/sandwiches")=__("sandwiches")
if user.permissions >= 2
li: a(href="/orders")=__("orders")
if user.permissions >= 3
li: a(href="/admin")=__("admin.title")
li: a(href="/profile")=user.username
li: a(href="/logout")=__("layout.logout")
else
li: a(href="/login")=__("layout.login")
li: a(href="/register")=__("layout.register")
nav.orange(role="navigation")
div.nav-wrapper.container
a.brand-logo(href="/") SOD
a.sidenav-trigger(href="#" data-target="mobile-nav"): i.material-icons menu
ul.right.hide-on-med-and-down
+nav
ul#mobile-nav.sidenav
+nav
main
block content
if !test
p !{captcha}
footer.page-footer
div.container
div.row
div.col.l6.s12
h5.white-text=__("layout.links")
ul
li: a.grey-text.text-lighten-3(href="/about")=__("layout.about")
li: a.grey-text.text-lighten-3(href="/contact")=__("contact")
div.footer-copyright
div.container
a.grey-text.text-lighten-4(href="https://sapinet.fr" target="_blank")=__("layout.powered") + " Sapinet"
a.grey-text.text-lighten-4.right(href="https://www.linkedin.com/in/florian-charlaix" target="_blank")=__("layout.made") + " Florian Charlaix"
script(src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js")
script(src="/javascripts/layout.js")