blog/themes/farallon/layouts/404.html

36 lines
2.1 KiB
HTML
Raw Normal View History

2024-05-06 12:00:46 +08:00
{{ define "main"}}
<main id="site--main">
<section class="template--404">
<div class="error--text">404</div>
<div class="error--posts">
{{ $pages := .Site.RegularPages }}
{{ $paginator := .Paginate ($pages) }}
{{ range first 6 $paginator.Pages }}
<article class="post--error" itemtype="http://schema.org/Article" itemscope="itemscope">
{{ if .Content }}
{{ $urls := findRE "<img src=\"[^\"|\\\"]*\"" .Content }} {{ if $urls }} {{ $url :=index ($urls) 0 }} {{
$url :=(strings.TrimPrefix "<img src=\"" $url) }}
{{ $url := strings.TrimRight " \"" $url }} <img src="{{ $url }}" class="cover" /> {{ end }} {{ end }}
<div class="content">
<h2 class="post--title" itemprop="headline">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h2>
<div class="meta">
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
<path
d="M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 89.697523v229.86362h160.865523v73.142857H512a36.571429 36.571429 0 0 1-36.571429-36.571429V260.388571h73.142858z">
</path>
</svg>
<time datetime='{{.Date.Format "2006-01-02 15:04:01" }}' class="humane--time">{{ .Date |
time.Format ":date_long"
}}</time>
</div>
</div>
</article>
{{ end }}
</div>
</section>
</main>
{{ end }}