mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Make list pages structurally consistent
This commit is contained in:
parent
650c1b9646
commit
0fd4ad9f4f
6 changed files with 37 additions and 19 deletions
|
@ -23,8 +23,11 @@
|
|||
</a>
|
||||
</h2>
|
||||
<p>
|
||||
Bookmarked on: <time class="dt-published published" itemprop="datePublished" datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}">{{ dateFormat "2006-01-02 15:04" $timestamp }}</time>
|
||||
<br />Tags: <span itemprop="keywords">
|
||||
Bookmarked <time class="dt-published published" itemprop="datePublished" datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}">{{ dateFormat "2006-01-02 15:04" $timestamp }}</time>
|
||||
</p>
|
||||
<div>
|
||||
<p>
|
||||
Tags: <span itemprop="keywords">
|
||||
{{- $start := 2 -}}
|
||||
{{- $firstTag := (index $tags 1) -}}
|
||||
{{- if (eq $firstTag "public") -}}
|
||||
|
@ -40,7 +43,10 @@
|
|||
{{- end }}
|
||||
</span>
|
||||
</p>
|
||||
<p class="e-summary entry-summary" itemprop="description">{{ $bookmark.description | markdownify | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘` | safeHTML }}</p>
|
||||
<p class="e-summary entry-summary" itemprop="description">
|
||||
{{ $bookmark.description | markdownify | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘` | safeHTML }}
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
@ -76,7 +76,11 @@
|
|||
{{- end -}}
|
||||
<activity:object-type>http://activitystrea.ms/schema/1.0/{{ $type }}</activity:object-type>
|
||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||
</entry>
|
||||
{{ with .Params.image -}}
|
||||
{{- $image := resources.Get (printf "/p/%s" . ) | resources.Fingerprint "md5" -}}
|
||||
<media:thumbnail url="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" />
|
||||
{{- end }}
|
||||
</entry>
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
</feed>
|
||||
|
|
|
@ -37,8 +37,10 @@
|
|||
{{ partial "processed-content.html" . }}
|
||||
</div>
|
||||
{{- else }}
|
||||
<div><!--Keep this attr-free div to make this part structurally identical.-->
|
||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||
<p>{{- partial "wordcount.html" . -}}</p>
|
||||
</div>
|
||||
{{- end }}
|
||||
</article>
|
||||
</li>
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04" }}</time>
|
||||
{{- end }}
|
||||
</p>
|
||||
<div>
|
||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||
<p>{{- partial "wordcount.html" . -}}</p>
|
||||
</div>
|
||||
</article>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04" }}</time>
|
||||
{{- end }}
|
||||
</p>
|
||||
<div>
|
||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||
<p>{{- partial "wordcount.html" . -}}</p>
|
||||
</div>
|
||||
</article>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
@ -25,8 +25,10 @@
|
|||
{{- end }}
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
||||
<p>{{- partial "wordcount.html" . -}}</p>
|
||||
</div>
|
||||
</article>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue