mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 20:09:41 +08:00
perf(tagsColor): 如果没有配置标签色则使用默认颜色
This commit is contained in:
parent
5e0d301095
commit
e6feff2e13
@ -15,9 +15,9 @@
|
||||
<div class="tags-field">
|
||||
<a th:each="tag : ${tags}" class="tags" th:href="${tag.status.permalink}">
|
||||
<span class="tag" th:text="${tag.spec.displayName}"
|
||||
th:style="${enableTagsColor? 'color: ' + tag.spec.color +'; background: ' + tag.spec.color +'20' : ''}"></span>
|
||||
th:style="${(enableTagsColor && tag.spec.color != '#ffffff')? 'color: ' + tag.spec.color +'; background: ' + tag.spec.color +'20' : ''}"></span>
|
||||
<span class="tag is-grey" th:text="${tag.postCount}"
|
||||
th:style="${enableTagsColor? 'background: ' + tag.spec.color +'CC' : ''}"></span>
|
||||
th:style="${(enableTagsColor && tag.spec.color != '#ffffff')? 'background: ' + tag.spec.color +'CC' : ''}"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,6 +17,6 @@
|
||||
th:href="@{${tag.status.permalink}}"
|
||||
th:text="${tag.spec.displayName}"
|
||||
th:with="size = ${#strings.length(tag.spec.displayName) + #strings.length(tag.spec.slug) + tag.postCount}"
|
||||
th:style="'font-size: ' + ${size < 14 ? 14 : size > 32 ? 32 : size} + 'px;' + ${enableTagsColor? 'color: ' + tag.spec.color +';' : ''}"></a>
|
||||
th:style="'font-size: ' + ${size < 14 ? 14 : size > 32 ? 32 : size} + 'px;' + ${(enableTagsColor && tag.spec.color != '#ffffff')? 'color: ' + tag.spec.color +';' : ''}"></a>
|
||||
</div>
|
||||
</div>
|
@ -15,6 +15,6 @@
|
||||
th:each="tag : ${tags}"
|
||||
th:href="@{${tag.status.permalink}}"
|
||||
th:text="${tag.spec.displayName}"
|
||||
th:style="${enableTagsColor? 'color: ' + tag.spec.color +'; border-color: ' + tag.spec.color +'; background: ' + tag.spec.color +'20;' : ''}"></a>
|
||||
th:style="${(enableTagsColor && tag.spec.color != '#ffffff')? 'color: ' + tag.spec.color +'; border-color: ' + tag.spec.color +'; background: ' + tag.spec.color +'20;' : ''}"></a>
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user