Skip to content

Commit

Permalink
修改信息模块统计部分,单位放在标题栏上,W:万,KW:千万
Browse files Browse the repository at this point in the history
  • Loading branch information
mjsoftking committed Nov 25, 2024
1 parent 995df8d commit ea99f25
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions templates/widget/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
</nav>
<nav class="level" th:if="${!#lists.isEmpty(theme.config.sidebar.custom_stats)}">
<div th:each="item,sindex :${theme.config.sidebar.custom_stats}" class="level-item" th:switch="${item.type}">
<div th:case="visit">
<p class="heading">访问</p>
<p class="value" th:title="${stats.visit / 10000 > 0} ? ${stats.visit}" th:text="${stats.visit / 1000000 > 0} ? (${#numbers.formatDecimal(stats.visit / 1000000.0,1,1)} + 'bw') : (${stats.visit / 10000 > 0} ? (${#numbers.formatDecimal(stats.visit / 10000.0,1,2)} + 'w') : ${stats.visit})"></p>
<div th:case="visit" th:with="visit = ${stats.visit}">
<p class="heading" th:text="|访问${visit / 10000000 > 0 ? '(KW)' : (visit / 10000 > 0 ? '(W)' : '')}|"></p>
<p class="value" th:title="${visit / 10000 > 0} ? ${visit}" th:text="${visit / 10000000 > 0} ? (${#numbers.formatDecimal(visit / 10000000.0,1,1)}) : (${visit / 10000 > 0} ? (${#numbers.formatDecimal(visit / 10000.0,1,1)}) : ${visit})"></p>
</div>
<div th:case="upvote">
<p class="heading">点赞</p>
<p class="value" th:title="${stats.upvote / 10000 > 0} ? ${stats.upvote}" th:text="${stats.upvote / 1000000 > 0} ? (${#numbers.formatDecimal(stats.upvote / 1000000.0,1,1)} + 'bw') : (${stats.upvote / 10000 > 0} ? (${#numbers.formatDecimal(stats.upvote / 10000.0,1,2)} + 'w') : ${stats.upvote})"></p>
<div th:case="upvote" th:with="upvote = ${stats.upvote}">
<p class="heading" th:text="|点赞${upvote / 10000000 > 0 ? '(KW)' : (upvote / 10000 > 0 ? '(W)' : '')}|"></p>
<p class="value" th:title="${upvote / 10000 > 0} ? ${upvote}" th:text="${upvote / 10000000 > 0} ? (${#numbers.formatDecimal(upvote / 10000000.0,1,1)}) : (${upvote / 10000 > 0} ? (${#numbers.formatDecimal(upvote / 10000.0,1,1)}) : ${upvote})"></p>
</div>
<div th:case="comment">
<p class="heading">评论</p>
<p class="value" th:title="${stats.comment / 10000 > 0} ? ${stats.comment}" th:text="${stats.comment / 1000000 > 0} ? (${#numbers.formatDecimal(stats.comment / 1000000.0,1,1)} + 'bw') : (${stats.comment / 10000 > 0} ? (${#numbers.formatDecimal(stats.comment / 10000.0,1,2)} + 'w') : ${stats.comment})"></p>
<div th:case="comment" th:with="comment = ${stats.comment}">
<p class="heading" th:text="|评论${comment / 10000000 > 0 ? '(KW)' : (comment / 10000 > 0 ? '(W)' : '')}|"></p>
<p class="value" th:title="${comment / 10000 > 0} ? ${comment}" th:text="${comment / 10000000 > 0} ? (${#numbers.formatDecimal(comment / 10000000.0,1,1)}) : (${comment / 10000 > 0} ? (${#numbers.formatDecimal(comment / 10000.0,1,1)}) : ${comment})"></p>
</div>
<div th:case="category">
<p class="heading">分类</p>
<p class="value" th:title="${stats.category / 10000 > 0} ? ${stats.category}" th:text="${stats.category / 1000000 > 0} ? (${#numbers.formatDecimal(stats.category / 1000000.0,1,1)} + 'bw') : (${stats.category / 10000 > 0} ? (${#numbers.formatDecimal(stats.category / 10000.0,1,2)} + 'w') : ${stats.category})"></p>
<div th:case="category" th:with="category = ${stats.category}">
<p class="heading" th:text="|分类${category / 10000000 > 0 ? '(KW)' : (category / 10000 > 0 ? '(W)' : '')}|"></p>
<p class="value" th:title="${category / 10000 > 0} ? ${category}" th:text="${category / 10000000 > 0} ? (${#numbers.formatDecimal(category / 10000000.0,1,1)}) : (${category / 10000 > 0} ? (${#numbers.formatDecimal(category / 10000.0,1,1)}) : ${category})"></p>
</div>
<div th:case="tag" th:with="tagsList = ${tagFinder.listAll()}, tags = ${#lists.size(tagsList)}">
<p class="heading">标签</p>
<p class="value" th:title="${tags / 10000 > 0} ? ${tags}" th:text="${tags / 1000000 > 0} ? (${#numbers.formatDecimal(tags / 1000000.0,1,1)} + 'bw') : (${tags / 10000 > 0} ? (${#numbers.formatDecimal(tags / 10000.0,1,2)} + 'w') : ${tags})"></p>
<p class="heading" th:text="|标签${tags / 10000000 > 0 ? '(KW)' : (tags / 10000 > 0 ? '(W)' : '')}|"></p>
<p class="value" th:title="${tags / 10000 > 0} ? ${tags}" th:text="${tags / 10000000 > 0} ? (${#numbers.formatDecimal(tags / 10000000.0,1,1)}) : (${tags / 10000 > 0} ? (${#numbers.formatDecimal(tags / 10000.0,1,1)}) : ${tags})"></p>
</div>
<div th:case="*">
<p class="heading">文章</p>
<p class="value" th:title="${stats.post / 10000 > 0} ? ${stats.post}" th:text="${stats.post / 1000000 > 0} ? (${#numbers.formatDecimal(stats.post / 1000000.0,1,1)} + 'bw') : (${stats.post / 10000 > 0} ? (${#numbers.formatDecimal(stats.post / 10000.0,1,2)} + 'w') : ${stats.post})"></p>
<div th:case="post" th:with="post = ${stats.post}">
<p class="heading" th:text="|文章${post / 10000000 > 0 ? '(KW)' : (post / 10000 > 0 ? '(W)' : '')}|"></p>
<p class="value" th:title="${post / 10000 > 0} ? ${post}" th:text="${post / 10000000 > 0} ? (${#numbers.formatDecimal(post / 10000000.0,1,1)}) : (${post / 10000 > 0} ? (${#numbers.formatDecimal(post / 10000.0,1,1)}) : ${post})"></p>
</div>
</div>
</nav>
Expand Down

0 comments on commit ea99f25

Please sign in to comment.