diff --git a/apps/test/content/posts/task-list-test.md b/apps/test/content/posts/task-list-test.md index 6f4d5485..f4f4b556 100644 --- a/apps/test/content/posts/task-list-test.md +++ b/apps/test/content/posts/task-list-test.md @@ -26,6 +26,7 @@ This post tests the rendering of task lists in Markdown. - [<] Scheduled Task - [>] Rescheduled Task - [!] Important Task +- [!x] Important Checked Task - [?] Question Task - Regular list item @@ -43,6 +44,7 @@ This post tests the rendering of task lists in Markdown. - [<] Scheduled Task - [>] Rescheduled Task - [!] Important Task + - [!x] Important Checked Task - [?] Question Task ## Mixed Content in List Items diff --git a/assets/css/_core/_function/_index.scss b/assets/css/_core/_function/_index.scss new file mode 100644 index 00000000..486f9dd0 --- /dev/null +++ b/assets/css/_core/_function/_index.scss @@ -0,0 +1,2 @@ +@import 'rgba'; +@import 'var'; diff --git a/assets/css/_core/_function/_rgba.scss b/assets/css/_core/_function/_rgba.scss new file mode 100644 index 00000000..7b1f93ee --- /dev/null +++ b/assets/css/_core/_function/_rgba.scss @@ -0,0 +1,8 @@ +/// Build an rgba-like color from any source color expression. +/// @param {Color | String} $color - Source color, supports CSS vars such as fixit-var(secondary). +/// @param {Number} $alpha [1] - Alpha channel value in range 0..1. +/// @example +/// color: fixit-rgba(fixit-var(secondary), 0.2); +@function fixit-rgba($color, $alpha: 1) { + @return unquote("rgb(from #{$color} r g b / #{$alpha})"); +} diff --git a/assets/css/_core/_function/_var.scss b/assets/css/_core/_function/_var.scss new file mode 100644 index 00000000..8b4f6b80 --- /dev/null +++ b/assets/css/_core/_function/_var.scss @@ -0,0 +1,14 @@ +/// Get CSS variable with prefix +/// @param {String} $name - CSS variable name (without prefix) +/// @param {*} $fallback - Optional fallback value +/// @return {String} - Complete CSS variable reference +/// @example +/// color: fixit-var(global-font-color); +/// background: fixit-var(custom-bg, #fff); +@function fixit-var($name, $fallback: null) { + @if $fallback { + @return var(#{$rootPrefix}#{$name}, #{$fallback}); + } @else { + @return var(#{$rootPrefix}#{$name}); + } +} diff --git a/assets/css/_core/_index.scss b/assets/css/_core/_index.scss index ebc5a7bd..feb8facc 100644 --- a/assets/css/_core/_index.scss +++ b/assets/css/_core/_index.scss @@ -1,3 +1,4 @@ +@import "_function"; @import "_mixin"; @import "_base"; @import "_common"; diff --git a/assets/css/_core/_mixin/_theme-vars.scss b/assets/css/_core/_mixin/_theme-vars.scss index b478bc26..8634ad41 100644 --- a/assets/css/_core/_mixin/_theme-vars.scss +++ b/assets/css/_core/_mixin/_theme-vars.scss @@ -2,21 +2,6 @@ // Theme Variable Mixins and Functions // ======================================== -/// Get CSS variable with prefix -/// @param {String} $name - CSS variable name (without prefix) -/// @param {*} $fallback - Optional fallback value -/// @return {String} - Complete CSS variable reference -/// @example -/// color: fixit-var(global-font-color); -/// background: fixit-var(custom-bg, #fff); -@function fixit-var($name, $fallback: null) { - @if $fallback { - @return var(#{$rootPrefix}#{$name}, #{$fallback}); - } @else { - @return var(#{$rootPrefix}#{$name}); - } -} - /// Set a single CSS variable /// @param {String} $name - CSS variable name (without prefix) /// @param {*} $value - Variable value diff --git a/assets/css/_page/_single/_index.scss b/assets/css/_page/_single/_index.scss index 298fcd84..7c7d59ae 100644 --- a/assets/css/_page/_single/_index.scss +++ b/assets/css/_page/_single/_index.scss @@ -241,6 +241,16 @@ color: fixit-var(task-text-color); } } + + &[data-task='x'] { + @include task-icon { + background-color: fixit-rgba(fixit-var(secondary), 0.2); + mask-image: linear-gradient(#000, #000); + mask-size: 0.875em 0.875em; + mask-repeat: no-repeat; + mask-position: center; + }; + } &[data-task='-'] { @include task-icon { @@ -257,7 +267,8 @@ @include task-text(fixit-var(success)); } - &[data-task='!'] { + &[data-task='!'], + &[data-task='!x'] { @include task-icon(fixit-var(danger)); } diff --git a/i18n/de.toml b/i18n/de.toml index 26f0335c..ea6143f4 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -208,6 +208,7 @@ x = "Überprüft" "<" = "Geplant" ">" = "Verschoben" "!" = "Wichtig" +"!x" = "Wichtig Erledigt" "?" = "Frage" # === Task lists === diff --git a/i18n/en.toml b/i18n/en.toml index 8a921585..dfeaf6ed 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -208,6 +208,7 @@ x = "Checked" "<" = "Scheduled" ">" = "Rescheduled" "!" = "Important" +"!x" = "Important Checked" "?" = "Question" # === Task lists === diff --git a/i18n/es.toml b/i18n/es.toml index c80d62b3..b8799ca6 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -208,6 +208,7 @@ x = "Verificado" "<" = "Programado" ">" = "Reprogramado" "!" = "Importante" +"!x" = "Importante Verificado" "?" = "Pregunta" # === Task lists === diff --git a/i18n/fr.toml b/i18n/fr.toml index 6ef00792..c15f1f05 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -208,6 +208,7 @@ x = "Vérifié" "<" = "Planifié" ">" = "Replanifié" "!" = "Important" +"!x" = "Important Vérifié" "?" = "Question" # === Task lists === diff --git a/i18n/hi.toml b/i18n/hi.toml index 6b0d976b..9ffe4e8a 100644 --- a/i18n/hi.toml +++ b/i18n/hi.toml @@ -209,6 +209,7 @@ x = "जांच की गई" "<" = "अनुसूचित" ">" = "पुनः अनुसूचित" "!" = "महत्वपूर्ण" +"!x" = "महत्वपूर्ण सत्यापित" "?" = "सवाल" # === Task lists === diff --git a/i18n/it.toml b/i18n/it.toml index b7678cc9..6659c0f4 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -208,6 +208,7 @@ x = "Verificato" "<" = "Programmato" ">" = "Ripianificato" "!" = "Importante" +"!x" = "Importante Verificato" "?" = "Domanda" # === Task lists === diff --git a/i18n/ja.toml b/i18n/ja.toml index bb5b50d8..6ead33a1 100644 --- a/i18n/ja.toml +++ b/i18n/ja.toml @@ -204,6 +204,7 @@ x = "完了" "<" = "予定" ">" = "再予定" "!" = "重要" +"!x" = "重要・確認済み" "?" = "問題" # === Task lists === diff --git a/i18n/ko.toml b/i18n/ko.toml index 963e46fc..610d60b9 100644 --- a/i18n/ko.toml +++ b/i18n/ko.toml @@ -204,6 +204,7 @@ x = "완료" "<" = "계획됨" ">" = "다시 계획됨" "!" = "중요" +"!x" = "중요 확인됨" "?" = "문제" # === Task lists === diff --git a/i18n/pl.toml b/i18n/pl.toml index c485869f..8d9f2e08 100644 --- a/i18n/pl.toml +++ b/i18n/pl.toml @@ -208,6 +208,7 @@ x = "Zweryfikowane" "<" = "Zaplanowane" ">" = "Przełożone" "!" = "Ważne" +"!x" = "Ważne Sprawdzone" "?" = "Pytanie" # === Task lists === diff --git a/i18n/pt-BR.toml b/i18n/pt-BR.toml index b97d9fde..e7c4e221 100644 --- a/i18n/pt-BR.toml +++ b/i18n/pt-BR.toml @@ -209,6 +209,7 @@ x = "Verificado" "<" = "Agendado" ">" = "Reagendado" "!" = "Importante" +"!x" = "Importante Verificado" "?" = "Dúvida" # === Task lists === diff --git a/i18n/ro.toml b/i18n/ro.toml index 04b6f051..a63f7c9a 100644 --- a/i18n/ro.toml +++ b/i18n/ro.toml @@ -208,6 +208,7 @@ x = "Controlat" "<" = "Programat" ">" = "Reprogramat" "!" = "Important" +"!x" = "Important Verificat" "?" = "Întrebare" # === Task lists === diff --git a/i18n/ru.toml b/i18n/ru.toml index b8932b88..5584354d 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -208,6 +208,7 @@ x = "Проверено" "<" = "Запланировано" ">" = "Перенесено" "!" = "Важно" +"!x" = "Важно Проверено" "?" = "Вопрос" # === Task lists === diff --git a/i18n/sr.toml b/i18n/sr.toml index 84eac1ce..d48c1f75 100644 --- a/i18n/sr.toml +++ b/i18n/sr.toml @@ -208,6 +208,7 @@ x = "Проверено" "<" = "Планирано" ">" = "Преустановљено" "!" = "Важно" +"!x" = "Важно Проверено" "?" = "Питање" # === Task lists === diff --git a/i18n/vi.toml b/i18n/vi.toml index f41831ec..f3c4f0da 100644 --- a/i18n/vi.toml +++ b/i18n/vi.toml @@ -207,6 +207,7 @@ x = "Đã kiểm tra" "<" = "Đã lên lịch" ">" = "Đã lên lịch lại" "!" = "Quan trọng" +"!x" = "Quan trọng Đã kiểm tra" "?" = "Câu hỏi" # === Task lists === diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index 05f90eaf..7de671f6 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -204,6 +204,7 @@ x = "已完成" "<" = "已计划" ">" = "已重新计划" "!" = "重要" +"!x" = "重要已核验" "?" = "问题" # === Task lists === diff --git a/i18n/zh-TW.toml b/i18n/zh-TW.toml index 121ccf53..c6ea1281 100644 --- a/i18n/zh-TW.toml +++ b/i18n/zh-TW.toml @@ -204,6 +204,7 @@ x = "已完成" "<" = "已計劃" ">" = "已重新計劃" "!" = "重要" +"!x" = "重要已核驗" "?" = "問題" # === Task lists === diff --git a/layouts/_partials/function/task-lists.html b/layouts/_partials/function/task-lists.html index 75ed8343..99d54202 100644 --- a/layouts/_partials/function/task-lists.html +++ b/layouts/_partials/function/task-lists.html @@ -3,12 +3,13 @@ {{- $iconMap := dict " " "fa-regular fa-square" - "x" "fa-solid fa-check-square" + "x" "fa-regular fa-check-square" "/" "fa-regular fa-square" "-" "fa-solid fa-square-xmark" "<" "fa-regular fa-calendar-plus" ">" "fa-regular fa-calendar-minus" - "!" "fa-solid fa-circle-exclamation" + "!" "fa-regular fa-star" + "!x" "fa-solid fa-star" "\\?" "fa-regular fa-circle-question" -}} {{- /* Custom Task lists */ -}} @@ -41,6 +42,7 @@ - [<] Scheduled - [>] Rescheduled - [!] Important + - [!x] Important Checked - [?] Question */ -}} {{- range $extendedSigns -}}