2023-09-23 08:44:56 +00:00
|
|
|
{{ define "main" }}
|
2023-09-24 22:49:10 +00:00
|
|
|
{{ partial "minimal-navbar.html" }}
|
2023-10-02 04:57:49 +00:00
|
|
|
{{ $path := "" }}
|
|
|
|
{{ with .File }}
|
|
|
|
{{ $path = .Path }}
|
|
|
|
{{ if eq .Dir "feed/" }}
|
|
|
|
<h5>/feed</h5>
|
|
|
|
{{ else if eq .Dir "dev/" }}
|
|
|
|
<h5>/dev</h5>
|
2024-02-20 01:14:24 +00:00
|
|
|
{{ else if eq .Dir "files/" }}
|
|
|
|
<h5>/files</h5>
|
2023-10-02 04:57:49 +00:00
|
|
|
{{ end }}
|
2023-10-02 04:45:41 +00:00
|
|
|
{{ end }}
|
2023-11-09 08:13:23 +00:00
|
|
|
<p>{{ .Content }}</p>
|
2024-02-20 02:22:08 +00:00
|
|
|
{{ $colors := slice "cyan" "yellow" "pink"}}
|
2024-02-20 01:14:24 +00:00
|
|
|
{{ if hasPrefix $path "files" }}
|
2024-02-20 02:22:08 +00:00
|
|
|
{{ range $folder, $files := .Params.folders }}
|
|
|
|
{{ $opt := mod (len $folder) (len $colors) }}
|
|
|
|
<div class="card" style="border-color: {{ index $colors $opt }}">
|
|
|
|
<h5 class="card-header postcard card-title">{{ $folder }}</h5>
|
|
|
|
{{ range $file := $files }}
|
2024-02-20 01:14:24 +00:00
|
|
|
<ul>
|
2024-02-20 02:22:08 +00:00
|
|
|
<a href={{ print "/files/" $folder "/" $file }}>{{ $file}}</a>
|
2024-02-20 01:14:24 +00:00
|
|
|
</ul>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2023-09-24 22:42:46 +00:00
|
|
|
{{ range $i, $page := .Pages.ByDate.Reverse }}
|
2024-02-20 02:22:08 +00:00
|
|
|
{{ $opt := mod $i (len $colors) }}
|
2024-02-20 01:14:24 +00:00
|
|
|
<div class="card" style="border-color: {{ index $colors $opt }}">
|
|
|
|
<a href="{{ anchorize .Page.Name }}">
|
|
|
|
<h5 class="card-header postcard card-title">{{ .Title }}</h5>
|
|
|
|
</a>
|
|
|
|
<div class="card-body postcard">
|
|
|
|
{{ if .Page.Params.Article }}
|
|
|
|
<p class="card-text">{{ .Description }}</p>
|
|
|
|
{{ else }}
|
|
|
|
<p class="card-text">{{ .Content }}</p>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .Page.Params.Thumbnail }}
|
|
|
|
<a href="{{ .Params.Thumbnail }}">
|
|
|
|
<img class="card-img" src="{{ .Params.Thumbnail }}">
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="card-footer text-muted postcard">
|
|
|
|
{{ .Date | time.Format ":date_short" }} {{ .Date | time.Format ":time_long"}}
|
|
|
|
</div>
|
2023-09-23 08:44:56 +00:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|