From 2c35515206d6f310729f551d7edbda457da7059a Mon Sep 17 00:00:00 2001 From: nanxiaobei Date: Sun, 21 May 2023 03:20:31 +0800 Subject: [PATCH] add featured support --- assets/main.css | 33 ++++++++++++++++++++ exampleSite/content/post/placeholder-text.md | 1 + layouts/_default/list.html | 6 ++++ 3 files changed, 40 insertions(+) diff --git a/assets/main.css b/assets/main.css index 303d57b..6ae42dd 100644 --- a/assets/main.css +++ b/assets/main.css @@ -1188,6 +1188,14 @@ body { margin-bottom: 0.375rem; } +.mb-2 { + margin-bottom: 0.5rem; +} + +.mb-2\.5 { + margin-bottom: 0.625rem; +} + .mb-20 { margin-bottom: 5rem; } @@ -1240,6 +1248,10 @@ body { display: block; } +.inline-block { + display: inline-block; +} + .flex { display: flex; } @@ -1489,10 +1501,23 @@ body { line-height: 1.25rem; } +.text-xs { + font-size: 0.75rem; + line-height: 1rem; +} + .font-bold { font-weight: 700; } +.font-semibold { + font-weight: 600; +} + +.uppercase { + text-transform: uppercase; +} + .\!leading-none { line-height: 1 !important; } @@ -1501,6 +1526,10 @@ body { line-height: 5rem; } +.tracking-wide { + letter-spacing: 0.025em; +} + .text-black { --tw-text-opacity: 1; color: rgb(0 0 0 / var(--tw-text-opacity)); @@ -1514,6 +1543,10 @@ body { opacity: 0.6; } +.opacity-70 { + opacity: 0.7; +} + .shadow-xl { --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color); diff --git a/exampleSite/content/post/placeholder-text.md b/exampleSite/content/post/placeholder-text.md index 2a48c21..c99db5d 100644 --- a/exampleSite/content/post/placeholder-text.md +++ b/exampleSite/content/post/placeholder-text.md @@ -7,6 +7,7 @@ tags = [ "markdown", "text", ] +weight = 10 +++ Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1a6f2e3..8914650 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -47,6 +47,12 @@ {{ end }}
+ {{ if gt .Weight 0 }} + Featured + {{ end }}

{{ .Title }}