hugo

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit e5645601a6676a611a1cff74cd9fd2c46644f00e
parent dd780025861d39350cd0caa135c87a1b8d53f4c2
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sun,  8 May 2022 22:37:00 -0400

stuff

Diffstat:
Mlayouts/_default/list.html | 2+-
Alayouts/_default/tag.html | 10++++++++++
Dlayouts/_default/terms.html | 7-------
Mlayouts/index.html | 4+---
Mlayouts/partials/footer.html | 2+-
Mlayouts/partials/header.html | 2+-
Mlayouts/partials/nav.html | 6+++---
Dlayouts/partials/tagcloud.html | 10----------
Mlayouts/shortcodes/hidvid.html | 1+
Alayouts/shortcodes/img.html | 18++++++++++++++++++
Alayouts/shortcodes/tagcloud.html | 3+++
Mstatic/style.css | 8++++++++
12 files changed, 47 insertions(+), 26 deletions(-)

diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -7,7 +7,7 @@ {{ range.Pages }} <li> - <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 2" }}</time> &ndash; + <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; <a href="{{ .RelPermalink }}">{{ .Title }}</a> </li> diff --git a/layouts/_default/tag.html b/layouts/_default/tag.html @@ -0,0 +1,10 @@ +{{ partial "header.html" . }} + +<header><h1>{{ .Title | title }}</h1></header> + +{{ .Content }} +<ul class=tagartlist> +{{ range.Pages }}<li><time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; <a href="{{ .RelPermalink }}">{{ .Title }}</a></li> +{{ end }}</ul> + +{{ partial "footer.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html @@ -1,7 +0,0 @@ -{{ partial "header.html" . }} - -<header><h1>{{ .Title }}</h1></header> - -{{ .Content }} - -{{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html @@ -1,9 +1,7 @@ {{ partial "header.html" . }} -<header><h1>{{ .Site.Title }}</h1></header> +<header><h1>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</h1></header> {{ .Content }} -{{ partial "tagcloud.html" . }} - {{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -5,7 +5,7 @@ See related:</br> {{ range $k, $v := .Params.tags }} {{ $url := printf "tags/%s" (. | urlize | lower) }} - <a href="{{ $url | absURL }}">{{ . }}</a> + <a href="{{ $url | absURL }}">{{ . | title }}</a> {{ if lt $k (sub $tagsLen 1) }}&middot;{{ end }} {{ end }} </div> diff --git a/layouts/partials/header.html b/layouts/partials/header.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="{{ .Site.Language }}"> <head> - <title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title> + <title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title> <meta charset="utf-8"/> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel='stylesheet' type='text/css' href='/style.css'> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html @@ -1,7 +1,7 @@ <nav> - <ul> - {{ range.Site.Menus.main }} - <a href="{{ .URL }}"><li>{{ .Pre }}{{ .Name }}</li></a> + <ul>{{ $sec := .Page.Section }}{{ $file := .File.TranslationBaseName }} + {{ range.Site.Menus.main }}{{ $base := path.Base .URL }} + <a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><li><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></li></a> {{ end }} </ul> </nav> diff --git a/layouts/partials/tagcloud.html b/layouts/partials/tagcloud.html @@ -1,10 +0,0 @@ -{{ if isset .Site.Taxonomies "tags" }} -{{ if not (eq (len .Site.Taxonomies.tags) 0) }} - <div class="tagcloud"> - {{ range $name, $items := .Site.Taxonomies.tags }} - {{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}} - <a href="{{ $url | absURL }}">{{ $name }}</a> - {{ end }} - </div> -{{ end }} -{{ end }} diff --git a/layouts/shortcodes/hidvid.html b/layouts/shortcodes/hidvid.html @@ -4,6 +4,7 @@ loading="lazy" sandbox="allow-same-origin allow-scripts allow-popups" allowfullscreen frameborder="0" + class="embvid" title="Embedded Video"> </iframe> </details> diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html @@ -0,0 +1,18 @@ +<!-- image --> +<figure {{ with .Get "class" }}class="{{.}}"{{ end }}> + {{ with .Get "link"}}<a href="{{.}}">{{ end }} + <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }}{{ with .Get "mouse"}}title="{{.}}"{{end}}/> + {{ if .Get "link"}}</a>{{ end }} + {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} + <figcaption>{{ if isset .Params "title" }} + <h4>{{ .Get "title" }}</h4>{{ end }} + {{ if or (.Get "caption") (.Get "attr")}}<p> + {{ .Get "caption" }} + {{ with .Get "attrlink"}}<a href="{{.}}">{{ end }} + {{ .Get "attr" }} + {{ if .Get "attrlink"}}</a>{{ end }} + </p>{{ end }} + </figcaption> + {{ end }} +</figure> +<!-- image --> diff --git a/layouts/shortcodes/tagcloud.html b/layouts/shortcodes/tagcloud.html @@ -0,0 +1,3 @@ +{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }} <div id="tagcloud"> + {{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}<a href="{{ $url | absURL }}" id="tag_{{ $name }}">{{ $name | title }}</a> + {{ end }}</div>{{ end }}{{ end }} diff --git a/static/style.css b/static/style.css @@ -4,6 +4,14 @@ body { color: #ddd ; } +.lw, p img, li img, h1 img, h2 img, h3 img, h4 img, dt img, td img { + max-height: 1em; + max-width: 1em; + vertical-align: middle ; +} + +img { max-width: 100% ; } + main { max-width: 800px ; margin: auto ;