Skip to content

Commit 8b616d5

Browse files
committed
style(tag-stream): reduce marquee font size scale
1 parent 36042cf commit 8b616d5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/.vitepress/theme/components/HomeTagStream.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ function buildTagStats(notes: NoteItem[]): TagStat[] {
7373
}
7474
7575
const maxCount = Math.max(...entries.map(([, count]) => count))
76-
const minSize = 14
77-
const maxSize = 34
76+
// Keep single-occurrence tags at normal body text size.
77+
const minSize = 16
78+
const maxSize = 22
7879
7980
return entries
8081
.map(([tag, count]) => {
81-
const ratio = maxCount <= 1 ? 1 : count / maxCount
82+
const ratio = maxCount <= 1 ? 0 : (count - 1) / (maxCount - 1)
8283
const size = Math.round(minSize + (maxSize - minSize) * ratio)
8384
return {
8485
tag,

0 commit comments

Comments
 (0)