Merge pull request #1778 from Void4m0n/feature/cloudtags-custom-colors

feat(cloudTags): add custom colors support for cloudTags on card_tags widget & tags page Pr_Satus(Finished)
This commit is contained in:
Jerry Wong authored and GitHub committed 2026-01-15 23:08:29 +08:00 Unverified
commit b034637bc1
4 files changed
+43 -9

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
.tag-cloud-list.text-center .tag-cloud-list.text-center
!=cloudTags({source: site.tags, orderby: page.orderby || 'random', order: page.order || 1, minfontsize: 1.2, maxfontsize: 1.5, limit: 0, unit: 'em'}) !=cloudTags({source: site.tags, orderby: page.orderby || 'random', order: page.order || 1, minfontsize: 1.2, maxfontsize: 1.5, limit: 0, unit: 'em', custom_colors: page.custom_colors})
+3 -3
View File
@@ -5,10 +5,10 @@ if theme.aside.card_tags.enable
i.fas.fa-tags i.fas.fa-tags
span= _p('aside.card_tags') span= _p('aside.card_tags')
- let { limit, orderby, order } = theme.aside.card_tags - let { limit, orderby, order, custom_colors } = theme.aside.card_tags
- limit = limit === 0 ? 0 : limit || 40 - limit = limit === 0 ? 0 : limit || 40
if theme.aside.card_tags.color if theme.aside.card_tags.color
.card-tag-cloud!= cloudTags({source: site.tags, orderby: orderby, order: order, minfontsize: 1.15, maxfontsize: 1.45, limit: limit, unit: 'em', page: 'index'}) .card-tag-cloud!= cloudTags({source: site.tags, orderby: orderby, order: order, minfontsize: 1.15, maxfontsize: 1.45, limit: limit, unit: 'em', page: 'index', custom_colors: custom_colors})
else else
.card-tag-cloud!= tagcloud({orderby: orderby, order: order, min_font: 1.1, max_font: 1.5, amount: limit , color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'}) .card-tag-cloud!= tagcloud({orderby: orderby, order: order, min_font: 1.1, max_font: 1.5, amount: limit, color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'})
+1
View File
@@ -179,6 +179,7 @@ module.exports = {
enable: true, enable: true,
limit: 40, limit: 40,
color: false, color: false,
custom_colors: null,
orderby: 'random', orderby: 'random',
order: 1, order: 1,
sort_order: null sort_order: null
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more