summaryrefslogtreecommitdiff
path: root/themes/LoveIt/layouts/_default/summary.html
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2022-08-14 19:01:21 +0200
committerChristoph Cullmann <cullmann@kde.org>2022-08-14 19:01:21 +0200
commit51fb029ca27d67d7cd67352cdede45e5b25868f7 (patch)
tree6d8e34b2abdc757310ffe11189e926d017417bae /themes/LoveIt/layouts/_default/summary.html
parent260b6803e78609e16ad3d59792f1681d9df0f1e4 (diff)
switch back to LoveIt, other theme is deprectated
Diffstat (limited to 'themes/LoveIt/layouts/_default/summary.html')
-rw-r--r--themes/LoveIt/layouts/_default/summary.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/themes/LoveIt/layouts/_default/summary.html b/themes/LoveIt/layouts/_default/summary.html
new file mode 100644
index 0000000..7169220
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/summary.html
@@ -0,0 +1,75 @@
+{{- $params := .Params | merge .Site.Params.page -}}
+
+<article class="single summary" itemscope itemtype="http://schema.org/Article">
+ {{- /* Featured image */ -}}
+ {{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with .Resources.GetMatch "featured-image-preview" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with $image -}}
+ <div class="featured-image-preview">
+ <a href="{{ $.RelPermalink }}">
+ {{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/img.html" -}}
+ </a>
+ </div>
+ {{- end -}}
+
+ {{- /* Title */ -}}
+ <h1 class="single-title" itemprop="name headline">
+ <a href="{{ .RelPermalink }}">{{ .Title | emojify }}</a>
+ </h1>
+
+ {{- /* Meta */ -}}
+ <div class="post-meta">
+ {{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
+ {{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
+ <span class="post-author">
+ {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
+ {{- partial "plugin/a.html" $options -}}
+ </span>
+
+ {{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
+ &nbsp;<span class="post-publish">
+ {{- printf `<time datetime="%v">%v</time>` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
+ </span>
+ {{- end -}}
+
+ {{- $categories := slice -}}
+ {{- range .Params.categories -}}
+ {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
+ {{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw" aria-hidden="true"></i>%v</a>` $category.RelPermalink $category.Title) -}}
+ {{- end -}}
+ {{- with delimit $categories "&nbsp;" -}}
+ &nbsp;<span class="post-category">
+ {{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
+ </span>
+ {{- end -}}
+ </div>
+
+ {{- /* Summary content */ -}}
+ <div class="content">
+ {{- with .Summary -}}
+ {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
+ {{- else -}}
+ {{- .Description | safeHTML -}}
+ {{- end -}}
+ </div>
+
+ {{- /* Footer */ -}}
+ <div class="post-footer">
+ <a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
+ {{- with .Params.tags -}}
+ <div class="post-tags">
+ <i class="fas fa-tags fa-fw" aria-hidden="true"></i>&nbsp;
+ {{- range $index, $value := . -}}
+ {{- if gt $index 0 }},&nbsp;{{ end -}}
+ {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
+ <a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
+ {{- end -}}
+ </div>
+ {{- end -}}
+ </div>
+</article> \ No newline at end of file