mirror of
https://github.com/ItsDrike/itsdrike.com.git
synced 2025-06-29 16:10:43 +00:00
Redesign list layout
This commit is contained in:
parent
75a45a192b
commit
f3419a37b1
5 changed files with 122 additions and 40 deletions
|
@ -1,9 +1,3 @@
|
|||
{{ if not .Date.IsZero }}
|
||||
<span class="pr-2" title='{{ .Date.Format "January 2 2006" }}'>
|
||||
<i class="far fa-calendar-alt pr-1 content-detail"></i> {{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if not .Parent.IsHome }}
|
||||
{{ if gt .ReadingTime 2 }}
|
||||
<span class="pr-2" title="Reading time">
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
<div class="media list-page-item mb-3" data-id="{{ with .File}}{{ .File.UniqueID }}{{ end }}">
|
||||
<div class="media-body">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<h5 class="my-0">{{ .Title }}</h5>
|
||||
</a>
|
||||
<small>{{ partial "content-details.html" . }}</small>
|
||||
<p>{{ partial "summary.html" . }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Obtain "dateformat" from scratchpad (or fall back to default) -->
|
||||
{{ if not (.Scratch.Get "dateformat") }}
|
||||
{{ .Scratch.Set "dateformat" "Jan 02, 2006" }}
|
||||
{{ end }}
|
||||
{{ $dateformat := .Scratch.Get "dateformat" }}
|
||||
<!-- Reset scratchpad for next use (in next page) - avoids using old values -->
|
||||
{{ .Scratch.Set "dateformat" nil }}
|
||||
|
||||
|
||||
<a class="item-link" href="{{ .RelPermalink }}">
|
||||
<span class="item-title">{{ .Title }}</span>
|
||||
{{ if not .Date.IsZero }}
|
||||
<span class="item-day">{{ .Date.Format $dateformat }}</span>
|
||||
{{ end }}
|
||||
</a>
|
||||
<small class="item-details">{{ partial "content-details.html" . }}</small>
|
||||
<!-- TODO: Only show summary on hover? -->
|
||||
<p class="item-summary">{{ partial "summary.html" . }}</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue