hugo

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

commit 5e9cefe62e693829e2ae27f9e2d747180aa70c1f
parent a56d5dafb2f5dd0ac2d77e60e4194999e82050aa
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat,  9 Jul 2022 19:35:45 -0400

clean up

Diffstat:
Dlayouts/404.html | 7-------
Dlayouts/blog.html | 10----------
Mlayouts/partials/footer.html | 2+-
Mlayouts/shortcodes/img.html | 36+++++++++++++++++++-----------------
4 files changed, 20 insertions(+), 35 deletions(-)

diff --git a/layouts/404.html b/layouts/404.html @@ -1,7 +0,0 @@ -{{ partial "header.html" . }} - -<header><h1>404: Page not found</h1></header> - -{{ .Content }} - -{{ partial "footer.html" . }} diff --git a/layouts/blog.html b/layouts/blog.html @@ -1,10 +0,0 @@ -{{ define "main" }} -{{ .Content }} - -{{range.Site.RegularPages}} -<li><a href="{{.Permalink}}">{{.Title}}</a></li> -{{end}} - -{{ partial "tagcloud.html" . }} - -{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -13,7 +13,7 @@ {{- end -}} </main> <footer> - <a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a></br> + <a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a><br> {{ if .Site.Params.showrss }}<a href="/index.xml"><img src="/pix/rss.svg" style="max-height:.9em;display:inline" alt=""> Subscribe via RSS for Updates.</a>{{ end }} </footer> </body> diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html @@ -1,18 +1,20 @@ -<!-- 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 }} +<!-- + class: class of the figure + link: url the image directs to + alt: alternative text + caption: caption + mouse: what the image says when moused over ("title" in HTML) +--> +<figure {{ with .Get "class" }}class="{{.}}"{{ end -}}> + {{- with .Get "link"}}<a href="{{.}}">{{ end -}} + <img src="{{ .Get "src" }}" + {{- with .Get "mouse" }} title="{{.}}"{{ end -}} + {{- with .Get "alt" }} alt="{{.}}"{{ end -}} + > + {{- if .Get "link"}}</a>{{ end -}} + {{- with .Get "caption" -}} + <figcaption> + {{- . -}} + </figcaption> + {{- end -}} </figure> -<!-- image -->