From 5603e05ddae8825a9d0bd2529e1bc278ebe728d9 Mon Sep 17 00:00:00 2001 From: daudix Date: Sat, 20 Jan 2024 22:40:48 +0300 Subject: [PATCH] feat: Emoji favicon support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🦆🪶 --- config.toml | 2 ++ templates/includes/head.html | 26 ++++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/config.toml b/config.toml index 0abc03d..55d487c 100644 --- a/config.toml +++ b/config.toml @@ -28,6 +28,8 @@ smart_punctuation = true primary_color = "#ff7800" # Same as primary_color, but with 20% opacity primary_color_alpha = "rgba(255, 120, 0, 0.2)" +# Emoji favicon; can be set per-page or even section. +emoji_favicon = false # If the favicon is GIF or not animated_favicon = false # Tera date format (not used in comments!), diff --git a/templates/includes/head.html b/templates/includes/head.html index be59554..d120da6 100644 --- a/templates/includes/head.html +++ b/templates/includes/head.html @@ -1,14 +1,18 @@ - + - {% if page.title %} {{ page.title }} - {{ config.title }} - {% elif section.title %} {{ section.title }} - {{ config.title }} - {% else %} {{ config.title }} {% endif %} + {% if page.title %} + {{ page.title }} - {{ config.title }} + {% elif section.title %} + {{ section.title }} - {{ config.title }} + {% else %} + {{ config.title }} + {% endif %} @@ -25,12 +29,22 @@ } - {% if config.extra.animated_favicon %} + {% if page.extra.emoji_favicon %} + + + {% elif section.extra.emoji_favicon %} + + + {% elif config.extra.emoji_favicon %} + + + {% elif config.extra.animated_favicon %} + {% else %} + {% endif %} -