mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Shortcode fixes
- Support an indieweb person without a hyperlink. - Don't put a period after "Changelog" links. Causes a line-break on many popular phone screen sizes.
This commit is contained in:
parent
d5edffb914
commit
bbdad95067
2 changed files with 4 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
||||||
{{ if $needsList }}</li>{{ end }}
|
{{ if $needsList }}</li>{{ end }}
|
||||||
{{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
|
{{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
|
||||||
{{ if $needsList }}<li>{{ end }}
|
{{ if $needsList }}<li>{{ end }}
|
||||||
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>.{{ if not $shortMeta }} <a href="{{ $logURL }}">Changelog</a>.{{ end }}
|
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>.{{ if not $shortMeta }} <a href="{{ $logURL }}">Changelog</a>{{ end }}
|
||||||
{{ if $needsList }}</li>{{ end }}
|
{{ if $needsList }}</li>{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if not $isNotes -}}
|
{{- if not $isNotes -}}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<span {{ if (.Get "itemprop") -}}itemprop="{{- .Get "itemprop" -}}"{{- end }}
|
<span {{ if (.Get "itemprop") -}}itemprop="{{- .Get "itemprop" -}}"{{- end }}
|
||||||
itemscope="" itemtype="https://schema.org/Person"
|
itemscope="" itemtype="https://schema.org/Person"
|
||||||
class="h-card vcard{{if eq (.Get "itemprop") "author"}} p-author{{end}}">
|
class="h-card vcard{{if eq (.Get "itemprop") "author"}} p-author{{end}}">
|
||||||
|
{{- if .Get "url" -}}
|
||||||
<a itemprop="url" href="{{- .Get "url" -}}" class="u-url url">
|
<a itemprop="url" href="{{- .Get "url" -}}" class="u-url url">
|
||||||
|
{{- end -}}
|
||||||
{{- if (.Get "avatar") -}}
|
{{- if (.Get "avatar") -}}
|
||||||
{{- $avatar_img := (resources.GetRemote (.Get "avatar")).Resize "32x32" -}}
|
{{- $avatar_img := (resources.GetRemote (.Get "avatar")).Resize "32x32" -}}
|
||||||
<img itemprop="image" class="u-photo photo" src="{{ $avatar_img.RelPermalink }}" alt="" width="16" height="16">
|
<img itemprop="image" class="u-photo photo" src="{{ $avatar_img.RelPermalink }}" alt="" width="16" height="16">
|
||||||
|
@ -12,7 +14,7 @@
|
||||||
{{- if (.Get "nickname") -}}<span class="p-nickname nickname">{{- .Get "nickname" -}}</span>{{- end -}}
|
{{- if (.Get "nickname") -}}<span class="p-nickname nickname">{{- .Get "nickname" -}}</span>{{- end -}}
|
||||||
{{- if (.Get "name") -}}{{- .Get "name" -}}{{- end -}}
|
{{- if (.Get "name") -}}{{- .Get "name" -}}{{- end -}}
|
||||||
</span>{{- if (.Get "appendString") -}}{{- .Get "appendString" -}}{{- end -}}{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
|
</span>{{- if (.Get "appendString") -}}{{- .Get "appendString" -}}{{- end -}}{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
|
||||||
</a>{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
|
{{- if .Get "url" -}}</a>{{- end -}}{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
|
||||||
{{- if (.Get "org") }}
|
{{- if (.Get "org") }}
|
||||||
from <span class="p-org org" itemprop="affiliation" itemscope="" itemtype="https://schema.org/Organization">
|
from <span class="p-org org" itemprop="affiliation" itemscope="" itemtype="https://schema.org/Organization">
|
||||||
<a itemprop="url" class="organization-name" href="{{- .Get "org-url" -}}">
|
<a itemprop="url" class="organization-name" href="{{- .Get "org-url" -}}">
|
||||||
|
|
Loading…
Reference in a new issue