🎉 Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
||||
{{- $small := $image.Resize "480x" -}}
|
||||
{{- $big := $image.Resize "1024x" -}}
|
||||
{{- $alt := .PlainText | safeHTML -}}
|
||||
{{- $caption := "" -}}
|
||||
{{- with $alt -}}
|
||||
{{- $caption = . | safeHTML -}}
|
||||
{{- end -}}
|
||||
<figure>
|
||||
<a href="{{ $image.RelPermalink }}" data-size="{{ $image.Width }}x{{ $image.Height }}">
|
||||
<img srcset="{{ $small.RelPermalink }} 480w, {{ $big.RelPermalink }} 1024w"
|
||||
src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" loading="lazy"
|
||||
alt="{{ if $alt }}{{ $alt }}{{ else if $caption }}{{ $caption | markdownify | plainify }}{{ else }} {{ end }}">
|
||||
</a>
|
||||
{{ with $caption }}
|
||||
<figcaption>{{ . | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{ partial "footer/script.html" . }}
|
||||
{{ partial "footer/style.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
{{ define "body_class" }}2-column{{ end }}
|
||||
{{ define "main" }}
|
||||
<div class="container extended flex on-phone--column align-items--flex-start article-page">
|
||||
{{ partial "sidebar/left.html" . }}
|
||||
|
||||
<div class="flex column do-not-overflow">
|
||||
<main class="main">
|
||||
<div id="article-toolbar">
|
||||
<a href="{{ .Site.BaseURL }}" class="back-home">
|
||||
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
||||
<span>Back</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{ partial "article/article.html" . }}
|
||||
|
||||
{{ partial "article/components/related-contents" . }}
|
||||
|
||||
{{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}}
|
||||
{{ partial "article/components/comment" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partialCached "footer" . }}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- partial "article/components/photoswipe.html" . -}}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,41 @@
|
||||
{{ define "body_class" }}2-column{{ end }}
|
||||
{{ define "main" }}
|
||||
<div class="container extended flex on-phone--column">
|
||||
{{ partial "sidebar/left.html" . }}
|
||||
|
||||
<main class="main">
|
||||
|
||||
<h3 class="taxonomy-type">{{ .Type | singularize | humanize }}</h3>
|
||||
<div class="taxonomy-card">
|
||||
<div class="taxonomy-details">
|
||||
<h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3>
|
||||
<h1 class="taxonomy-term">{{ .Title }}</h1>
|
||||
{{ with .Params.description }}
|
||||
<h2 class="taxonomy-description">{{ . }}</h2>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.image }}
|
||||
{{- $image := partial "helper/image" . -}}
|
||||
{{- $thumbnail := $image.Fill "120x120" -}}
|
||||
<div class="taxonomy-image">
|
||||
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
||||
height="{{ $thumbnail.Height }}" loading="lazy">
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<section class="article-list--compact">
|
||||
{{ $v2 := where .Pages "Params.hidden" "!=" true }}
|
||||
{{ $pag := .Paginate (.Pages) }}
|
||||
{{ range $pag.Pages }}
|
||||
{{ partial "article-list/compact" . }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{- partial "pagination.html" . -}}
|
||||
|
||||
{{ partial "footer" . }}
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user