From 6fd57ea48d265161a6822f2245d97245e9e1542e Mon Sep 17 00:00:00 2001 From: taco Date: Thu, 28 May 2026 15:07:00 -0600 Subject: [PATCH] Implement firebase --- config/_default/params.toml | 12 ++++++++-- layouts/_shortcodes/smiley.html | 41 +++++++++++++++++++++++++++++++++ layouts/partials/meta/mood.html | 23 ++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 layouts/_shortcodes/smiley.html create mode 100644 layouts/partials/meta/mood.html diff --git a/config/_default/params.toml b/config/_default/params.toml index 51f1da4..b5429ae 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -100,7 +100,7 @@ forgejoDefaultServer = "https://v11.next.forgejo.org" [article] showDate = true - showViews = false + showViews = true showLikes = false showDateOnlyInArticle = false showDateUpdated = false @@ -171,7 +171,7 @@ forgejoDefaultServer = "https://v11.next.forgejo.org" layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground layoutBackgroundHeaderSpace = true # only used when heroStyle equals background showBreadcrumbs = false - showViews = false + showViews = true showLikes = false showTableOfContents = true groupByYear = false @@ -187,6 +187,14 @@ forgejoDefaultServer = "https://v11.next.forgejo.org" # appId = "XXXXXX" # measurementId = "XXXXXX" + apiKey = "AIzaSyAYxMpZr2_6RozvnnAJyuVnNIErXQ4PHAY" + authDomain = "taco-blog-2f02a.firebaseapp.com" + projectId = "taco-blog-2f02a" + storageBucket = "taco-blog-2f02a.firebasestorage.app" + messagingSenderId = "1045655642694" + appId = "1:1045655642694:web:bac90806052c5eae18e047" + measurementId = "G-E1Y6QGXZ04" + [fathomAnalytics] # site = "ABC12345" # domain = "llama.yoursite.com" diff --git a/layouts/_shortcodes/smiley.html b/layouts/_shortcodes/smiley.html new file mode 100644 index 0000000..d113997 --- /dev/null +++ b/layouts/_shortcodes/smiley.html @@ -0,0 +1,41 @@ +{{- $mood := .Get "mood" | default "neutral" | lower -}} +{{- $size := .Get "size" | default "md" -}} +{{- $label := .Get "label" | default "" -}} + +{{- $moods := dict + "happy" (dict "emoji" "😊" "alt" "Happy" "bg" "bg-emerald-100" "text" "text-emerald-600" "darkBg" "dark:bg-emerald-900/30" "darkText" "dark:text-emerald-400") + "sad" (dict "emoji" "ðŸ˜Ē" "alt" "Sad" "bg" "bg-sky-100" "text" "text-sky-600" "darkBg" "dark:bg-sky-900/30" "darkText" "dark:text-sky-400") + "neutral" (dict "emoji" "😐" "alt" "Neutral" "bg" "bg-neutral-200" "text" "text-neutral-600" "darkBg" "dark:bg-neutral-700/50" "darkText" "dark:text-neutral-400") + "excited" (dict "emoji" "ðŸĪĐ" "alt" "Excited" "bg" "bg-orange-100" "text" "text-orange-600" "darkBg" "dark:bg-orange-900/30" "darkText" "dark:text-orange-400") + "thoughtful" (dict "emoji" "ðŸĪ”" "alt" "Thoughtful" "bg" "bg-purple-100" "text" "text-purple-600" "darkBg" "dark:bg-purple-900/30" "darkText" "dark:text-purple-400") + "angry" (dict "emoji" "😠" "alt" "Angry" "bg" "bg-red-100" "text" "text-red-600" "darkBg" "dark:bg-red-900/30" "darkText" "dark:text-red-400") + "love" (dict "emoji" "😍" "alt" "Love" "bg" "bg-pink-100" "text" "text-pink-600" "darkBg" "dark:bg-pink-900/30" "darkText" "dark:text-pink-400") + "surprised" (dict "emoji" "ðŸ˜Ū" "alt" "Surprised" "bg" "bg-amber-100" "text" "text-amber-600" "darkBg" "dark:bg-amber-900/30" "darkText" "dark:text-amber-400") + "confused" (dict "emoji" "😕" "alt" "Confused" "bg" "bg-teal-100" "text" "text-teal-600" "darkBg" "dark:bg-teal-900/30" "darkText" "dark:text-teal-400") + "tired" (dict "emoji" "ðŸ˜ī" "alt" "Tired" "bg" "bg-slate-100" "text" "text-slate-600" "darkBg" "dark:bg-slate-700/50" "darkText" "dark:text-slate-400") + "laughing" (dict "emoji" "😂" "alt" "Laughing" "bg" "bg-yellow-100" "text" "text-yellow-600" "darkBg" "dark:bg-yellow-900/30" "darkText" "dark:text-yellow-400") + "cool" (dict "emoji" "😎" "alt" "Cool" "bg" "bg-cyan-100" "text" "text-cyan-600" "darkBg" "dark:bg-cyan-900/30" "darkText" "dark:text-cyan-400") + "crazy" (dict "emoji" "ðŸĪŠ" "alt" "Crazy" "bg" "bg-fuchsia-100" "text" "text-fuchsia-600" "darkBg" "dark:bg-fuchsia-900/30" "darkText" "dark:text-fuchsia-400") + "silly" (dict "emoji" "😜" "alt" "Silly" "bg" "bg-lime-100" "text" "text-lime-600" "darkBg" "dark:bg-lime-900/30" "darkText" "dark:text-lime-400") + "worried" (dict "emoji" "😰" "alt" "Worried" "bg" "bg-indigo-100" "text" "text-indigo-600" "darkBg" "dark:bg-indigo-900/30" "darkText" "dark:text-indigo-400") + "party" (dict "emoji" "ðŸĨģ" "alt" "Party" "bg" "bg-gradient-to-br from-pink-100 to-purple-100" "text" "text-pink-600" "darkBg" "dark:from-pink-900/30 dark:to-purple-900/30" "darkText" "dark:text-pink-400") +-}} + +{{- $data := index $moods $mood -}} +{{- if not $data -}} + {{- $data = index $moods "neutral" -}} +{{- end -}} + +{{- $sizes := dict "sm" "text-lg w-8 h-8" "md" "text-2xl w-10 h-10" "lg" "text-4xl w-14 h-14" "xl" "text-5xl w-16 h-16" -}} +{{- $sizeClass := index $sizes $size | default (index $sizes "md") -}} + +{{- $displayLabel := $label | default $data.alt -}} + + + + {{ $data.emoji }} + + {{- with $label -}} + {{ . }} + {{- end -}} + diff --git a/layouts/partials/meta/mood.html b/layouts/partials/meta/mood.html new file mode 100644 index 0000000..3cb40a2 --- /dev/null +++ b/layouts/partials/meta/mood.html @@ -0,0 +1,23 @@ +{{- $mood := .Params.mood | default "" -}} +{{- if $mood -}} + {{- $moods := dict + "happy" "😊" + "sad" "ðŸ˜Ē" + "neutral" "😐" + "excited" "ðŸĪĐ" + "thoughtful" "ðŸĪ”" + "angry" "😠" + "love" "😍" + "surprised" "ðŸ˜Ū" + "confused" "😕" + "tired" "ðŸ˜ī" + "laughing" "😂" + "cool" "😎" + "crazy" "ðŸĪŠ" + "silly" "😜" + "worried" "😰" + "party" "ðŸĨģ" + -}} + {{- $emoji := index $moods $mood | default "😐" -}} + {{ $emoji }} +{{- end -}} \ No newline at end of file