From 08f8e3b4a4879dd7c91c16fbce80c4f2bc5e357f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 10 Jul 2023 02:32:24 +0000
Subject: [PATCH] docs + various polish

---
 quartz/components/TagList.tsx |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/quartz/components/TagList.tsx b/quartz/components/TagList.tsx
index a462e95..6b93719 100644
--- a/quartz/components/TagList.tsx
+++ b/quartz/components/TagList.tsx
@@ -6,12 +6,12 @@
   const tags = fileData.frontmatter?.tags
   const slug = fileData.slug!
   const baseDir = resolveToRoot(slug)
-  if (tags) {
+  if (tags && tags.length > 0) {
     return <ul class="tags">{tags.map(tag => {
       const display = `#${tag}`
       const linkDest = baseDir + `/tags/${slugAnchor(tag)}`
       return <li>
-        <a href={linkDest}>{display}</a>
+        <a href={linkDest} class="internal">{display}</a>
       </li>
     })}</ul>
   } else {
@@ -25,17 +25,19 @@
   display: flex;
   padding-left: 0;
   gap: 0.4rem;
+}
+  
+.tags > li {
+  display: inline-block;
+  white-space: nowrap;
+  margin: 0;
+  overflow-wrap: normal;
+}
 
-  & > li {
-    display: inline-block;
-    margin: 0;
-
-    & > a {
-      border-radius: 8px;
-      border: var(--lightgray) 1px solid;
-      padding: 0.2rem 0.5rem;
-    }
-  }
+.tags > li > a {
+  border-radius: 8px;
+  background-color: var(--highlight);
+  padding: 0.2rem 0.5rem;
 }
 `
 

--
Gitblit v1.10.0