grgr.me

latest commits to https://grgr.me/
Log | Files | Refs

commit c9b669a814792816b8551d37e31f5276795612d9
parent a3271350cb16d0458728f73d83093d30040d7e13
Author: corndog <cauchyn@firemail.cc>
Date:   Wed, 20 Mar 2019 23:35:03 -0700

Suppress pointless tags

If .Other.Description was empty, then the template
still outputs <no value> which isn't valid HTML.

Diffstat:
Min/index.html | 9++++-----
Min/static/style.css | 4+++-
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/in/index.html b/in/index.html @@ -8,14 +8,13 @@ This was supposed to just be a way to throw short links on <a href='{{ $.Rel "gr <ul class="post-list"> {{ range .Site.Pages.WithTag "project" }} - <li><a href="{{ $.Rel .Url }}">{{ .Title }}</a>{{ if .Other.Commits }} <a class="tab" href="{{ .Other.Commits}}">»commits</a>{{ end }}<br> - {{ .Other.Description }} + <li><a href="{{ $.Rel .Url }}">{{ .Title }}</a>{{ if .Other.Commits }} <a class="tab" href="{{ .Other.Commits}}">»commits</a>{{ end }} + {{ if (.Other.Description) }}<br>{{ .Other.Description }}{{ end }} </li> {{ end }} {{ range .Site.Pages.WithTag "prose" }} - <li><a href="{{ $.Rel .Url }}">{{ .Title }}</a><br> - {{ .Other.Description }} - </li> + <li><a href="{{ $.Rel .Url }}">{{ .Title }}</a> + {{ if (.Other.Description) }}<br>{{ .Other.Description }}{{ end }} {{ end }} </ul> diff --git a/in/static/style.css b/in/static/style.css @@ -85,7 +85,9 @@ img.embed.left { } button:hover > img.embed { - display: block; + @media (max-width: 68ch) { + display: block; + } } .nowrap {