1
0
mirror of https://github.com/osmarks/website synced 2025-02-05 21:50:03 +00:00
website/templates/layout.pug

92 lines
3.7 KiB
Plaintext
Raw Normal View History

2024-11-21 12:02:34 +00:00
mixin nav-item(url, name, color)
a(href=url, style=`color: ${color}`)= name + " "
2020-03-08 17:13:14 +00:00
mixin image(src)
if typeof src === "string"
img(src=src)
else
picture
each pair in src
if pair[0] == "_fallback"
img(src=pair[1], loading="lazy")
else
source(srcset=pair[1], type=pair[0])
2020-03-08 17:13:14 +00:00
doctype html
html(lang="en")
head
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)
meta(property="og:description", content=description)
meta(property="og:title", content=title)
meta(property="og:type", content="website")
meta(property="og:url", content=`https://${domain}`)
meta(property="og:site_name", content=name)
2020-03-08 17:13:14 +00:00
link(rel="manifest", href="/assets/manifest.webmanifest")
2022-03-09 20:59:26 +00:00
link(rel="shortcut icon", href="/assets/images/logo256.png", type="image/png")
2023-03-18 15:33:06 +00:00
meta(content=`https://${domain}/assets/images/logo256.png`, property="og:image")
if katex
link(rel="stylesheet", href="/assets/katex.min.css")
2025-01-09 21:06:14 +00:00
link(rel="alternate", type="application/rss+xml", title="RSS", href="/rss.xml")
style!= css
2020-03-08 17:13:14 +00:00
if comments !== "off"
2024-03-22 11:39:39 +00:00
script(src=`https://${domain}/rsapi/static/comments.js`, async=true)
2020-03-08 17:13:14 +00:00
body
2024-01-02 02:23:11 +00:00
.nav-container
nav
a.logocont(href="/")
img.logo(src="/assets/images/logo256.png", alt="osmarks.net logo")
.logotext osmarks
2024-11-21 12:02:34 +00:00
+nav-item(`/me/`, "About Me", "#5AF2F2")
+nav-item(`https://b.${domain}`, "Microblog", "#F25AF2")
+nav-item(`https://mse.${domain}/`, "Meme Search", "#5AF25A")
+nav-item(`https://docs.${domain}/random`, "Documentation", "#F2A65A")
+nav-item(`https://status.${domain}`, "Status", "#EEDC5B")
2025-01-09 21:06:14 +00:00
+nav-item(`#`, "Search", "#12E193")
2024-01-02 02:23:11 +00:00
block nav-items
.sidenotes-container
main(class=!haveSidenotes ? "fullwidth" : "")
.header
h1.page-title= title
block under-title
2024-04-22 19:19:53 +01:00
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
2024-04-22 19:19:53 +01:00
span= `${metricPrefix(wordCount, "")} words`
2024-01-02 02:23:11 +00:00
if description
em.description!= description
2024-07-06 14:47:54 +01:00
if prev
div
.prev
span= "← "
a(href=`/${prev.slug}`)= prev.title
if next
div
.next
a(href=`/${next.slug}`)= next.title
span= " →"
2024-01-02 02:23:11 +00:00
block content
2020-03-08 17:13:14 +00:00
2024-01-02 02:23:11 +00:00
if haveSidenotes
.sidenotes
2024-02-26 19:20:31 +00:00
if comments !== "off"
2024-04-22 19:19:53 +01:00
main.isso
h2 Comments
section(id="comments-wrapper")
2025-01-26 16:43:01 +00:00
if squiggle
script(src="/assets/js/squiggle_rt.js", async=true)