summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/meta
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
committerChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
commite77051ccc4b47951bfa4fde2be436b1bb2fb113b (patch)
treef0b75ee3521da9c8cd39dac4359212348f70e4e8 /themes/blowfish/layouts/partials/meta
parent4b355837824ac2422d371acef790f0f4249255c7 (diff)
use https://github.com/nunocoracao/blowfish.git
Diffstat (limited to 'themes/blowfish/layouts/partials/meta')
-rw-r--r--themes/blowfish/layouts/partials/meta/date-updated.html4
-rw-r--r--themes/blowfish/layouts/partials/meta/date.html4
-rw-r--r--themes/blowfish/layouts/partials/meta/edit.html19
-rw-r--r--themes/blowfish/layouts/partials/meta/likes.html22
-rw-r--r--themes/blowfish/layouts/partials/meta/likes_button.html10
-rw-r--r--themes/blowfish/layouts/partials/meta/reading-time.html4
-rw-r--r--themes/blowfish/layouts/partials/meta/views.html20
-rw-r--r--themes/blowfish/layouts/partials/meta/word-count.html4
-rw-r--r--themes/blowfish/layouts/partials/meta/zen-mode.html14
9 files changed, 101 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/partials/meta/date-updated.html b/themes/blowfish/layouts/partials/meta/date-updated.html
new file mode 100644
index 0000000..cc25c69
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/date-updated.html
@@ -0,0 +1,4 @@
+<time datetime="{{ . }}">
+ {{- i18n "article.date_updated" (dict "Date" (partial "functions/date.html" .)) | markdownify | emojify -}}
+</time>
+{{- /* Trim EOF */ -}}
diff --git a/themes/blowfish/layouts/partials/meta/date.html b/themes/blowfish/layouts/partials/meta/date.html
new file mode 100644
index 0000000..654a6c7
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/date.html
@@ -0,0 +1,4 @@
+<time datetime="{{ . }}">
+ {{- i18n "article.date" (dict "Date" (partial "functions/date.html" .)) | markdownify | emojify -}}
+</time>
+{{- /* Trim EOF */ -}}
diff --git a/themes/blowfish/layouts/partials/meta/edit.html b/themes/blowfish/layouts/partials/meta/edit.html
new file mode 100644
index 0000000..7cd1a43
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/edit.html
@@ -0,0 +1,19 @@
+{{ $url := .Params.editURL | default (.Site.Params.article.editURL | default "#") }}
+{{ $slash := "" }}
+{{ if .Params.editAppendPath | default ( .Site.Params.article.editAppendPath | default false ) }}
+ {{ if ne (substr $url -1 1) "/" }}
+ {{ $slash = "/" }}
+ {{ end }}
+ {{ $url = printf "%s%s%s" $url $slash (path.Join .File.Path) }}
+{{ end }}
+<span class="mb-[2px]">
+ <a
+ href="{{ $url }}"
+ class="text-lg hover:text-primary-500"
+ rel="noopener noreferrer"
+ target="_blank"
+ title="{{ i18n "article.edit_title" }}"
+ ><span class="inline-block align-text-bottom">{{ partial "icon.html" "edit" }}</span></a
+ >
+</span>
+{{- /* Trim EOF */ -}}
diff --git a/themes/blowfish/layouts/partials/meta/likes.html b/themes/blowfish/layouts/partials/meta/likes.html
new file mode 100644
index 0000000..9cb5ff6
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/likes.html
@@ -0,0 +1,22 @@
+<span>
+ {{ $id := "null" }}
+ {{ if eq .Kind "taxonomy" }}
+ {{ $id = delimit (slice "likes_taxonomy_" .Page.Data.Plural) "" }}
+ {{ else if eq .Kind "term" }}
+ {{ $id = delimit (slice "likes_term_" .Page.Data.Term) "" }}
+ {{ else }}
+ {{ $translations := .AllTranslations }}
+ {{ with .File }}
+ {{ $path := .Path }}
+ {{range $translations}}
+ {{ $lang := print "." .Lang ".md" }}
+ {{ $path = replace $path $lang ".md" }}
+ {{end}}
+ {{ $id = delimit (slice "likes_" $path) "" }}
+ {{ end }}
+ {{ end }}
+ <span id="{{ $id }}"
+ class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400"
+ title="likes">loading</span>
+ <span class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }}</span>
+</span> \ No newline at end of file
diff --git a/themes/blowfish/layouts/partials/meta/likes_button.html b/themes/blowfish/layouts/partials/meta/likes_button.html
new file mode 100644
index 0000000..09c3c15
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/likes_button.html
@@ -0,0 +1,10 @@
+<span>
+ <button id="button_likes"
+ class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"
+ onclick="process_article()">
+ <span id="button_likes_heart" style="display:none" class="inline-block align-text-bottom">{{ partial "icon.html" "heart" }} </span>
+ <span id="button_likes_emtpty_heart" class="inline-block align-text-bottom">{{ partial "icon.html" "heart-empty" }}</span>
+ <span id="button_likes_text">&nbsp;Like</span>
+ </button>
+</span>
+{{- /* Trim EOF */ -}} \ No newline at end of file
diff --git a/themes/blowfish/layouts/partials/meta/reading-time.html b/themes/blowfish/layouts/partials/meta/reading-time.html
new file mode 100644
index 0000000..71e706d
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/reading-time.html
@@ -0,0 +1,4 @@
+<span title="{{ i18n "article.reading_time_title" }}">
+ {{- i18n "article.reading_time" .ReadingTime | markdownify | emojify -}}
+</span>
+{{- /* Trim EOF */ -}}
diff --git a/themes/blowfish/layouts/partials/meta/views.html b/themes/blowfish/layouts/partials/meta/views.html
new file mode 100644
index 0000000..fc4a386
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/views.html
@@ -0,0 +1,20 @@
+<span>
+ {{ $id := "null" }}
+ {{ if eq .Kind "taxonomy" }}
+ {{ $id = delimit (slice "views_taxonomy_" .Page.Data.Plural) "" }}
+ {{ else if eq .Kind "term" }}
+ {{ $id = delimit (slice "views_term_" .Page.Data.Term) "" }}
+ {{ else }}
+ {{ $translations := .AllTranslations }}
+ {{ with .File }}
+ {{ $path := .Path }}
+ {{range $translations}}
+ {{ $lang := print "." .Lang ".md" }}
+ {{ $path = replace $path $lang ".md" }}
+ {{end}}
+ {{ $id = delimit (slice "views_" $path) "" }}
+ {{ end }}
+ {{ end }}
+ <span id="{{ $id }}" class="animate-pulse inline-block text-transparent max-h-3 rounded-full mt-[-2px] align-middle bg-neutral-300 dark:bg-neutral-400" title="views">loading</span>
+ <span class="inline-block align-text-bottom">{{ partial "icon.html" "eye" }}</span>
+</span> \ No newline at end of file
diff --git a/themes/blowfish/layouts/partials/meta/word-count.html b/themes/blowfish/layouts/partials/meta/word-count.html
new file mode 100644
index 0000000..517101a
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/word-count.html
@@ -0,0 +1,4 @@
+<span>
+ {{- i18n "article.word_count" .WordCount | markdownify | emojify -}}
+</span>
+{{- /* Trim EOF */ -}}
diff --git a/themes/blowfish/layouts/partials/meta/zen-mode.html b/themes/blowfish/layouts/partials/meta/zen-mode.html
new file mode 100644
index 0000000..6339e26
--- /dev/null
+++ b/themes/blowfish/layouts/partials/meta/zen-mode.html
@@ -0,0 +1,14 @@
+{{ $jsZenMode := resources.Get "js/zen-mode.js" }}
+{{ $jsZenMode = $jsZenMode | resources.Minify | resources.Fingerprint "sha512" }}
+
+<script type="text/javascript" src="{{ $jsZenMode.RelPermalink }}" integrity="{{ $jsZenMode.Data.Integrity }}"></script>
+
+<span class="mb-[2px]">
+ <span id="zen-mode-button"
+ class="text-lg hover:text-primary-500"
+ title="{{ i18n "article.zen_mode_title.enable" }}"
+ data-title-i18n-disable="{{ i18n "article.zen_mode_title.enable" }}"
+ data-title-i18n-enable="{{ i18n "article.zen_mode_title.disable" }}">
+ <span class="inline-block align-text-bottom">{{ partial "icon.html" "expand" }}</span>
+ </span>
+</span> \ No newline at end of file