summaryrefslogtreecommitdiff
path: root/themes/LoveIt/layouts/_default
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
parent260b6803e78609e16ad3d59792f1681d9df0f1e4 (diff)
switch back to LoveIt, other theme is deprectated
Diffstat (limited to 'themes/LoveIt/layouts/_default')
-rw-r--r--themes/LoveIt/layouts/_default/_markup/render-image.html10
-rw-r--r--themes/LoveIt/layouts/_default/_markup/render-link.html6
-rw-r--r--themes/LoveIt/layouts/_default/baseof.html48
-rw-r--r--themes/LoveIt/layouts/_default/section.html36
-rw-r--r--themes/LoveIt/layouts/_default/single.html24
-rw-r--r--themes/LoveIt/layouts/_default/single.md3
-rw-r--r--themes/LoveIt/layouts/_default/summary.html75
7 files changed, 202 insertions, 0 deletions
diff --git a/themes/LoveIt/layouts/_default/_markup/render-image.html b/themes/LoveIt/layouts/_default/_markup/render-image.html
new file mode 100644
index 0000000..b92397e
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/_markup/render-image.html
@@ -0,0 +1,10 @@
+{{- if .Title -}}
+ <figure>
+ {{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/img.html" -}}
+ <figcaption class="image-caption">
+ {{- .Title | safeHTML -}}
+ </figcaption>
+ </figure>
+{{- else -}}
+ {{- dict "Src" .Destination "Title" .Text "Resources" .Page.Resources | partial "plugin/img.html" -}}
+{{- end -}}
diff --git a/themes/LoveIt/layouts/_default/_markup/render-link.html b/themes/LoveIt/layouts/_default/_markup/render-link.html
new file mode 100644
index 0000000..f10d441
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/_markup/render-link.html
@@ -0,0 +1,6 @@
+{{- $destination := .Destination -}}
+{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
+ {{- $destination = .RelPermalink -}}
+{{- end -}}
+{{- $options := dict "Destination" $destination "Title" .Title "Content" .Text -}}
+{{- partial "plugin/a.html" $options -}}
diff --git a/themes/LoveIt/layouts/_default/baseof.html b/themes/LoveIt/layouts/_default/baseof.html
new file mode 100644
index 0000000..66a6c3c
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/baseof.html
@@ -0,0 +1,48 @@
+{{- partial "init.html" . -}}
+
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="robots" content="noodp" />
+ <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
+
+ {{- partial "head/meta.html" . -}}
+ {{- partial "head/link.html" . -}}
+ {{- partial "head/seo.html" . -}}
+ </head>
+ <body data-header-desktop="{{ .Site.Params.header.desktopMode }}" data-header-mobile="{{ .Site.Params.header.mobileMode }}">
+ {{- /* Check theme isDark before body rendering */ -}}
+ {{- $theme := .Site.Params.defaulttheme -}}
+ <script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ $theme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ $theme }}' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>
+
+ <div id="mask"></div>
+
+ {{- /* Body wrapper */ -}}
+ <div class="wrapper">
+ {{- partial "header.html" . -}}
+ <main class="main">
+ <div class="container">
+ {{- block "content" . }}{{ end -}}
+ </div>
+ </main>
+ {{- partial "footer.html" . -}}
+ </div>
+
+ <div id="fixed-buttons">
+ {{- /* top button */ -}}
+ <a href="#" id="back-to-top" class="fixed-button" title="{{ T `backToTop` }}">
+ <i class="fas fa-arrow-up fa-fw" aria-hidden="true"></i>
+ </a>
+
+ {{- /* comment button */ -}}
+ <a href="#" id="view-comments" class="fixed-button" title="{{ T `viewComments` }}">
+ <i class="fas fa-comment fa-fw" aria-hidden="true"></i>
+ </a>
+ </div>
+
+ {{- /* Load JavaScript scripts and CSS */ -}}
+ {{- partial "assets.html" . -}}
+ </body>
+</html>
diff --git a/themes/LoveIt/layouts/_default/section.html b/themes/LoveIt/layouts/_default/section.html
new file mode 100644
index 0000000..2775891
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/section.html
@@ -0,0 +1,36 @@
+{{- define "title" }}
+ {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
+{{- end -}}
+
+{{- define "content" -}}
+ <div class="page archive">
+ {{- /* Title */ -}}
+ <h2 class="single-title animate__animated animate__pulse animate__faster">
+ {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
+ </h2>
+
+ {{- /* Paginate */ -}}
+ {{- if .Pages -}}
+ {{- $pages := .Pages.GroupByDate "2006" -}}
+ {{- with .Site.Params.section.paginate | default .Site.Params.paginate -}}
+ {{- $pages = $.Paginate $pages . -}}
+ {{- else -}}
+ {{- $pages = .Paginate $pages -}}
+ {{- end -}}
+ {{- range $pages.PageGroups -}}
+ <h3 class="group-title">{{ .Key }}</h3>
+ {{- range .Pages -}}
+ <article class="archive-item">
+ <a href="{{ .RelPermalink }}" class="archive-item-link">
+ {{- .Title | emojify -}}
+ </a>
+ <span class="archive-item-date">
+ {{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
+ </span>
+ </article>
+ {{- end -}}
+ {{- end -}}
+ {{- partial "paginator.html" . -}}
+ {{- end -}}
+ </div>
+{{- end -}}
diff --git a/themes/LoveIt/layouts/_default/single.html b/themes/LoveIt/layouts/_default/single.html
new file mode 100644
index 0000000..f8f72d7
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/single.html
@@ -0,0 +1,24 @@
+{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}}
+
+{{- define "content" -}}
+ {{- $params := .Scratch.Get "params" -}}
+ <div class="page single special">
+ {{- /* Title */ -}}
+ <h1 class="single-title animate__animated animate__pulse animate__faster">
+ {{- .Title -}}
+ </h1>
+
+ {{- /* Subtitle */ -}}
+ {{- with $params.subtitle -}}
+ <h2 class="single-subtitle">{{ . }}</h2>
+ {{- end -}}
+
+ {{- /* Content */ -}}
+ <div class="content" id="content">
+ {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
+ </div>
+
+ {{- /* Comment */ -}}
+ {{- partial "comment.html" . -}}
+ </div>
+{{- end -}}
diff --git a/themes/LoveIt/layouts/_default/single.md b/themes/LoveIt/layouts/_default/single.md
new file mode 100644
index 0000000..e34c2d4
--- /dev/null
+++ b/themes/LoveIt/layouts/_default/single.md
@@ -0,0 +1,3 @@
+# {{ .Title }}
+
+{{ .RawContent }}
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