1
0
mirror of https://github.com/osmarks/website synced 2024-11-09 12:49:53 +00:00
website/templates/layout.pug
2024-07-06 14:47:54 +01:00

83 lines
3.4 KiB
Plaintext

mixin nav-item(url, name)
a(href=url)= name + " "
mixin image(src)
if typeof src === "string"
img(src=src)
else
picture
each pair in src
if pair[0] == "_fallback"
img(src=pair[1])
else
source(srcset=pair[1], type=pair[0])
doctype html
html(lang="en")
head
link(rel="preload", href="/assets/miracode.woff2", as="font", crossorigin="anonymous")
link(rel="preload", href="/assets/titillium-web-semibold.woff2", as="font", crossorigin="anonymous")
link(rel="preload", href="/assets/titillium-web.woff2", as="font", crossorigin="anonymous")
title= `${title} @ ${name}`
script(src="/assets/js/page.js", defer=true)
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
if description
meta(name="description", content=description)
link(rel="manifest", href="/assets/manifest.webmanifest")
link(rel="shortcut icon", href="/assets/images/logo256.png", type="image/png")
meta(content=`https://${domain}/assets/images/logo256.png`, property="og:image")
style!= css
if comments !== "off"
script(src=`https://${domain}/rsapi/static/comments.js`, async=true)
body
.nav-container
nav
a.logocont(href="/")
img.logo(src="/assets/images/logo256.png", alt="osmarks.net logo")
.logotext osmarks
+nav-item(`/me/`, "About Me")
+nav-item(`https://mse.${domain}/`, "Meme Search")
+nav-item("https://github.com/osmarks/website", "Contribute")
+nav-item(`https://b.${domain}`, "Microblog")
+nav-item(`https://status.${domain}`, "Status")
+nav-item(`https://r.${domain}/login`, "Login")
block nav-items
.sidenotes-container
main(class=!haveSidenotes ? "fullwidth" : "")
.header
h1.page-title= title
block under-title
if !internal
h3.deemph
if updated
span= `Updated ${renderDate(updated)}`
if created || wordCount
span= " / "
if created
span= `Created ${renderDate(created)}`
if wordCount
span= " / "
if wordCount
span= `${metricPrefix(wordCount, "")} words`
if description
em.description!= description
if prev
div
.prev
span= "← "
a(href=`/${prev.slug}`)= prev.title
if next
div
.next
a(href=`/${next.slug}`)= next.title
span= " →"
block content
if haveSidenotes
.sidenotes
if comments !== "off"
main.isso
h2 Comments
section(id="comments-wrapper")