mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 04:19:41 +08:00
fix(heat): 修复热度显示格式错误问题
This commit is contained in:
parent
80cc5800dd
commit
a56eab4314
@ -16,7 +16,7 @@
|
|||||||
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
||||||
<li
|
<li
|
||||||
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
||||||
th:style="'color: ' + ${heatColor}">[[${heat}]]℃
|
th:style="'color: ' + ${heatColor}">[[${#numbers.formatDecimal(heat,0,1)}]]℃
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
||||||
<li
|
<li
|
||||||
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
||||||
th:style="'color: ' + ${heatColor}">[[${heat}]]℃
|
th:style="'color: ' + ${heatColor}">[[${#numbers.formatDecimal(heat,0,1)}]]℃
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item is-hidden-mobile">
|
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item is-hidden-mobile">
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
||||||
<li
|
<li
|
||||||
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
||||||
th:style="'color: ' + ${heatColor}">[[${heat}]]℃
|
th:style="'color: ' + ${heatColor}">[[${#numbers.formatDecimal(heat,0,1)}]]℃
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item is-hidden-mobile">
|
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item is-hidden-mobile">
|
||||||
@ -118,7 +118,7 @@
|
|||||||
<li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
<li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
||||||
<li
|
<li
|
||||||
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
||||||
th:style="'color: ' + ${heatColor}">[[${heat}]]℃
|
th:style="'color: ' + ${heatColor}">[[${#numbers.formatDecimal(heat,0,1)}]]℃
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item">
|
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item">
|
||||||
@ -148,7 +148,7 @@
|
|||||||
<li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
<li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
||||||
<li
|
<li
|
||||||
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}"
|
||||||
th:style="'color: ' + ${heatColor}">[[${heat}]]℃
|
th:style="'color: ' + ${heatColor}">[[${#numbers.formatDecimal(heat,0,1)}]]℃
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 class="title">
|
<h2 class="title">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user