diff options
author | mms <michal@sapka.me> | 2024-09-14 22:34:42 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-09-14 22:34:42 +0200 |
commit | f10a1070096953eaa3668ca660bffac193235ed2 (patch) | |
tree | b0e8681625c8e9fe871454a66430de5f857975a7 /layouts | |
parent | 738a6b74f6c77df682526fc6ced9c02d108e1f4d (diff) |
feat: move out brainrots
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/brain-rot/baseof.html | 248 | ||||
-rw-r--r-- | layouts/brain-rot/list.html | 2 | ||||
-rw-r--r-- | layouts/brain-rot/redirect.html | 9 | ||||
-rw-r--r-- | layouts/brain-rot/single.html | 2 | ||||
-rw-r--r-- | layouts/unix-history/list.html | 31 |
5 files changed, 22 insertions, 270 deletions
diff --git a/layouts/brain-rot/baseof.html b/layouts/brain-rot/baseof.html index 4610c79..3195652 100644 --- a/layouts/brain-rot/baseof.html +++ b/layouts/brain-rot/baseof.html @@ -1,243 +1,13 @@ +{{ block "main" . }} +{{ end }} + <!DOCTYPE html> -<html lang="en"> +<html> <head> - <meta charset="utf-8"> - <title> {{ .Page.Title }} | Michal's Brain Rots </title> - - <meta name="viewport" content="width=device-width, initial-scale=1"> - - {{- $header_rect := resources.Get "/icons/apple-touch-icon.png" }} - {{- $header_rect_180 := $header_rect.Resize "180x webp q90"}} - <link rel="apple-touch-icon" sizes="180x180" href="{{ $header_rect_180.Permalink }}"> - - {{- $header_rect_32 := $header_rect.Resize "32x webp q90"}} - <link rel="icon" type="image/png" sizes="32x32" href="{{ $header_rect_32.Permalink }}"> - - {{- $header_rect_16 := $header_rect.Resize "16x webp q90"}} - <link rel="icon" type="image/png" sizes="16x16" href="{{ $header_rect_16.Permalink }}"> - - <meta name="description" content="{{ .Params.Abstract | default .Site.Params.DefaultDescription}}"> - - <meta property="og:title" content="{{ .Page.Title }}"> - <meta property="og:type" content="website"> - <meta property="og:url" content="{{ .Permalink }}"> - - {{- $imageUrl := default "logos/right.png" .Params.image }} - {{- $image := resources.Get $imageUrl }} - <meta property="og:image" content="{{ $image.Permalink }}"> - - <meta property="og:description" content="{{ .Params.Abstract | default .Site.Params.DefaultDescription}}"> - - <link rel="canonical" href="{{ .Permalink }}"> - <link rel='alternate' type='application/rss+xml' title="Feed with all changes" href='/index.xml'> - <link rel='alternate' type='application/rss+xml' title="Feed with Unix History changes" href='/unix-history/index.xml'> - <meta name="robots" content="index, follow"> - <link rel="me" href="https://emacs.ch/@mms"> - - <link rel="webmention" href="https://webmention.io/d-s.sh/webmention"> - <link rel="pingback" href="https://webmention.io/d-s.sh/xmlrpc"> - - {{- $bg := resources.Get "brain-rot/bg-stars.jpg" -}} - {{- if strings.Contains .Permalink "witcher" -}} - {{- $bg = resources.Get "brain-rot/bg-witcher.jpg" -}} - {{- end -}} - - <style> - :root { - --content-bg: #fff; - --highlight-color: #978b27; - --text-color: #000; - --cool-border: conic-gradient(from -135deg at right,#000,#000 1deg 89deg,#0000 90deg) 50%/100% 35px; - - --info-bg: #f2f2f2; - } - @media (prefers-color-scheme: dark) { - :root { - --content-bg: #000; - --text-color: #fff; - --info-bg: #484343; - } - } - html { - height:100%; - font-family: serif; - font-size: 1.2em; - color: var(--text-color); - } - body { - margin: 0; - padding: 0; - height: 100%; - background-color: var(--content-bg); - } - a { - color: var(--text-color); - } - a:hover { - color: var(--highlight-color); - } - .container { - display: flex; - min-height: 100%; - max-width: 1020px; - } - - .decoration-left { - background-color: #000; - width: 200px; - min-height: 100%; - flex-shrink: 0; - mask: var(--cool-border); - background-image: url("{{ $bg.Permalink }}"); - } - - .main { - flex-grow: 1; - padding: 15px; - padding-left: 40px; - padding-top: 70px; - padding-bottom: 40px; - overflow-x: hidden; - } - - .breadcrumbs, .lastup { - font-size: 0.8em; - } - - h1 { - margin-top: 5px; - margin-bottom: 10px; - font-family: sans-serif; - font-size: 1.8em; - font-weight: 500; - } - - article { - text-align: justify; - line-height: 1.6em; - } - - img { - max-width: 99%; - height: auto; - } - - article figure { - text-align: center; - margin: 0; - max-width: 100%; - font-size: 0.8em; - } - img.float-right { - float: right; - display: inline; - margin-left: 10px; - } - img.center { - max-width: 100%; - height: auto; - } - img.small { - max-width: 50%; - height: auto; - } - figure.graph { - background-color: var(--highlight-bg); - padding: 5px; - padding-top: 20px; - } - figure.graph img { - width: 95%; - } - - .rating-box { - float: right; - padding: 10px; - text-align: center; - font-size: 0.8em; - line-height: 1em; - } - @media only screen and (max-width: 400px) { - .rating-box { - width: 100%; - float: none; - } - } - - footer { - margin-top: 20px; - text-align: center; - padding-bottom: 20px; - } - - .recent-updates { - margin-top: 20px; - margin-bottom: 20px; - background-color: var(--info-bg); - padding: 10px; - border-radius: 10px; - width: 500px; - margin-left: auto; - margin-right: auto; - border-color: #000; - border-style: solid; - border-width: 1px; - max-width: 90%; - } - - .recent-updates h2 { - font-size: inherit; - margin: 0; - padding: 0; - } - - @media only screen and (max-width: 600px) { - .decoration-left { - width: 30px; - } - - .main { - padding-left: 20px; - } - - .recent-updates { - margin-left: -10px; - } - } - - </style> - </head> - <body> - <div class="container"> - <div class="decoration-left"></div> - <div class="main"> - - <header> - <nav class="home"> - <a href="/brain-rot/">Back to homepage</a> | - My other sites -: - <a href="/blog/">Blog</a>, - <a href="/cool-emacs/">Emacs</a>, - <a href="/unix-history/">Unix History</a> - </nav> - <hr> - - <h1> {{ .Page.Title }}</h1> - </header> - - - <main> - {{ block "main" . }} - {{ end }} - </main> + <title>{{ .Title }}</title> + <link rel="canonical" href="/unix-history/"/> + <meta http-equiv="content-type" content="text/html; charset=utf-8"/> + <meta http-equiv="refresh" content="0; url=https://brainrot.crys.site/{{ replace .RelPermalink "/brain-rot/" ""}}"/> + </head> - <footer> - {{ partial "buttons/valid_html" . }} - {{ partial "button-31" (dict "file" "rss.gif" "alt" "RSS Feed" "href" "https://michal.sapka.me/brain-rot/index.xml") }} - {{ partial "buttons/openbsd" . }} - </footer> - </div> - </div> - </body> </html> diff --git a/layouts/brain-rot/list.html b/layouts/brain-rot/list.html new file mode 100644 index 0000000..e4e4a83 --- /dev/null +++ b/layouts/brain-rot/list.html @@ -0,0 +1,2 @@ +{{ define "main" }} +{{ end }} diff --git a/layouts/brain-rot/redirect.html b/layouts/brain-rot/redirect.html new file mode 100644 index 0000000..599d57b --- /dev/null +++ b/layouts/brain-rot/redirect.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> + <head> + <title>{{ .Title }}</title> + <link rel="canonical" href="/unix-history/"/> + <meta http-equiv="content-type" content="text/html; charset=utf-8"/> + <meta http-equiv="refresh" content="0; url=/unix-history/#{{ .Page.Params.link }}"/> + </head> +</html> diff --git a/layouts/brain-rot/single.html b/layouts/brain-rot/single.html new file mode 100644 index 0000000..e4e4a83 --- /dev/null +++ b/layouts/brain-rot/single.html @@ -0,0 +1,2 @@ +{{ define "main" }} +{{ end }} diff --git a/layouts/unix-history/list.html b/layouts/unix-history/list.html index 6295d15..e4e4a83 100644 --- a/layouts/unix-history/list.html +++ b/layouts/unix-history/list.html @@ -1,33 +1,2 @@ -{{ define "head"}} -<a href="/">Back</a> -<hr> -{{end}} - - - {{ define "main" }} - -{{if .Page.Content}} - {{ .Page.Content }} - {{- if .Params.primary_menu }} - {{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }} - {{- end }} - - {{ partial "single/dates.html" . }} -{{ else }} - - {{ if in .Page.Params.Categories "blog" }} - {{ partial "partials/blog_index.html" . }} - {{ else if in .Page.Params.Categories "article" }} - {{ partial "partials/article_index.html" . }} - {{ else }} - - <h2>Articles</h2> - {{ range .Data.Pages }} - {{ partial "partials/article_list_item.html" . }} - {{ end }} - - {{ end }} -{{end}} - {{ end }} |