diff options
author | mms <michal@sapka.me> | 2024-06-10 22:01:04 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-06-10 22:01:04 +0200 |
commit | e8dd384c73b32a7e92ebe5f08c015f8ac1da78d0 (patch) | |
tree | 19137ca909423f6446d63766bab27eaddc01a2a4 /layouts | |
parent | 902dd210730f5e7bd537ce9ef7f2b9d91a0b7fb6 (diff) |
feat: UH artwork
Diffstat (limited to 'layouts')
l--------- | layouts/brain-rot/.#baseof.html | 1 | ||||
-rw-r--r-- | layouts/shortcodes/image.html | 2 | ||||
l--------- | layouts/unix-history/.#single.html | 1 | ||||
-rw-r--r-- | layouts/unix-history/baseof.html | 242 | ||||
-rw-r--r-- | layouts/unix-history/list.html | 33 | ||||
-rw-r--r-- | layouts/unix-history/single.html | 31 |
6 files changed, 202 insertions, 108 deletions
diff --git a/layouts/brain-rot/.#baseof.html b/layouts/brain-rot/.#baseof.html deleted file mode 120000 index 1a87e03..0000000 --- a/layouts/brain-rot/.#baseof.html +++ /dev/null @@ -1 +0,0 @@ -mms@voyager.2829:1717002207
\ No newline at end of file diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html index 2677b2c..d538fde 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/image.html @@ -43,6 +43,7 @@ loading="lazy" > </a> + {{ if not (strings.Contains $caption "noop") }} <figcaption> {{ $caption }} @@ -50,5 +51,6 @@ <a href="{{ $source }}" target="_blank" title="source">[source]</a> {{ end }} </figcaption> + {{ end }} </figure> diff --git a/layouts/unix-history/.#single.html b/layouts/unix-history/.#single.html new file mode 120000 index 0000000..d7699a2 --- /dev/null +++ b/layouts/unix-history/.#single.html @@ -0,0 +1 @@ +mms@voyager.25629:1717856541
\ No newline at end of file diff --git a/layouts/unix-history/baseof.html b/layouts/unix-history/baseof.html index 19e557e..b5390b9 100644 --- a/layouts/unix-history/baseof.html +++ b/layouts/unix-history/baseof.html @@ -3,126 +3,154 @@ <head> <meta name="viewport" content="width=device-width, initial-scale=1"> - {{ partial "header/meta" . }} - {{- $bg := resources.Get "unix-history/bg.gif" -}} - - <style> - :root { - --bg-color: #E8E9EB; - --heading-color: #738678; - --text-color: #000; - } + <meta charset="utf-8"> + <title> {{ .Page.Title }} </title> - body { - width: 800px; - max-width: 70%; - margin-left: auto; - margin-right: auto; - font-family: helvetica; - font-size: 1em; - line-height: 1.5em; - text-align: justify; - background-image: url({{ $bg.Permalink }}); - background-repeat: repeat-y; - background-size: 200px; - background-color: var(--bg-color); - padding-top: 20px; - padding-bottom: 30px; - padding-left: 210px; - padding-right: 30px; - overflow-x: hidden; - color: var(--text-color); - } - @media only screen and (max-width: 700px) { - body { - background-image: unset; - max-width: 95%; - padding: 10px; - margin-left: 0; - } - } + <meta name="viewport" content="width=device-width, initial-scale=1"> - a { - color: var(--text-color); - } - p { - padding-left: 40px; - } - article figure { - text-align: center; - margin: 0; - max-width: 100%; - font-size: 0.8em; - } + {{- $header_rect := resources.Get "unix-history/header-rect.png" }} + {{- $header_rect_180 := $header_rect.Resize "180x webp q90"}} + <link rel="apple-touch-icon" sizes="180x180" href="{{ $header_rect_180.Permalink }}"> - img { - max-width: 60%; - height: auto; - } - - h1 { - font-style: italic; - color: var(--heading-color); - } - - h2 { - font-size:1.1em; - color: var(--heading-color); - } + {{- $header_rect_32 := $header_rect.Resize "32x webp q90"}} + <link rel="icon" type="image/png" sizes="32x32" href="{{ $header_rect_32.Permalink }}"> - .wip { - width: 80%; - background-color: #EEE; - border-radius: 5px; - margin: 20px; - margin-left: auto; - margin-right: auto; - padding: 10px; - padding-top: 20px; - padding-bottom: 20px; - border-style: solid; - border-color: #000; - border-width: 1px; - vertical-align: middle; - } - .wip img { - vertical-align: middle; - padding-left: 10px; - padding-right: 10px; - } + {{- $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 }}"> + <meta property="og:image" content="{{ $header_rect.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 "unix-history/bg.gif" -}} + + <style> + :root { + --bg-color: #E8E9EB; + --heading-color: #738678; + --text-color: #000; + } + + body { + width: 800px; + max-width: 70%; + margin-left: auto; + margin-right: auto; + font-family: helvetica; + font-size: 1em; + line-height: 1.5em; + text-align: justify; + background-image: url({{ $bg.Permalink }}); + background-repeat: repeat-y; + background-size: 200px; + background-color: var(--bg-color); + padding-top: 20px; + padding-bottom: 30px; + padding-left: 210px; + padding-right: 30px; + overflow-x: hidden; + color: var(--text-color); + } + + @media only screen and (max-width: 700px) { + body { + background-image: unset; + max-width: 95%; + padding: 10px; + margin-left: 0; + } + } + + a { + color: var(--text-color); + } + p { + padding-left: 40px; + } + article figure { + text-align: center; + margin: 0; + max-width: 100%; + font-size: 0.8em; + } + + img { + max-width: 60%; + height: auto; + } + + h1 { + font-style: italic; + color: var(--heading-color); + } + + h2 { + font-size:1.1em; + color: var(--heading-color); + } + + .wip { + width: 80%; + background-color: #EEE; + border-radius: 5px; + margin: 20px; + margin-left: auto; + margin-right: auto; + padding: 10px; + padding-top: 20px; + padding-bottom: 20px; + border-style: solid; + border-color: #000; + border-width: 1px; + vertical-align: middle; + } + .wip img { + vertical-align: middle; + padding-left: 10px; + padding-right: 10px; + } - .top-menu { - display: flex; - } - .top-menu-element { - width: 50%; - flex-shrink: 0; - } + .top-menu { + display: flex; + } + .top-menu-element { + width: 50%; + flex-shrink: 0; + } - .header-sep { - margin-top: 30px; - margin-bottom: 30px; - } + .header-sep { + margin-top: 30px; + margin-bottom: 30px; + } - .footnotes p { - margin: 0; - padding: 0; - } - </style> + .footnotes p { + margin: 0; + padding: 0; + } + </style> </head> <body> <header> - <nav> - {{ range $parent := first 1 .Ancestors}} - <a href="{{ .Permalink }}"> < Back</a> - {{ end }} - </nav> - <hr> + {{ block "head" . }} + {{ end }} - <h1>{{ .Title }}</h1> + <h1>{{ .Page.Params.shortname }}</h1> </header> <article> @@ -131,7 +159,7 @@ <img src="{{$wip.Permalink}}" alt="Work in progress" width="{{ $wip.Width}}" height="{{ $wip.Height }}"> This text is still work in progress and will be updated. </aside> - + {{ block "main" . }} {{ end }} diff --git a/layouts/unix-history/list.html b/layouts/unix-history/list.html new file mode 100644 index 0000000..6295d15 --- /dev/null +++ b/layouts/unix-history/list.html @@ -0,0 +1,33 @@ +{{ 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 }} diff --git a/layouts/unix-history/single.html b/layouts/unix-history/single.html new file mode 100644 index 0000000..fa8673b --- /dev/null +++ b/layouts/unix-history/single.html @@ -0,0 +1,31 @@ +{{ define "head" }} +<a href="/unix-history"> +{{- $header_rect := resources.Get "unix-history/header-top.png" }} +{{- $header_rect_180 := $header_rect.Resize "50x webp q90"}} +<img + style=" + height: 1.5em; + width: auto; + margin-right: 0.5em; + " + src="{{ $header_rect_180.Permalink }}" + ></a> + +<b><i>History of Unix</i></b> +<hr> + +{{ end }} + +{{ define "main" }} + +<article> + {{ .Page.Content }} +</article> + +{{- if .Params.primary_menu }} + {{ partial "single/bottom_nav.html" (dict "menuID" .Page.Params.primary_menu "page" .) }} +{{- end }} + +{{ partial "single/dates.html" . }} + +{{- end }} |