Skip to content

Commit

Permalink
新闻详情时间显示
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyang committed Jul 24, 2021
1 parent 2e2a58c commit b99b6ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions novel-front/src/main/resources/static/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
.news_title h2 { font-size: 20px; }
.news_title .from { color: #999; display: block; margin: 20px 0; }
.news_title .time { margin-left: 20px }
.news_title .click { margin-left: 40px }
.news_info { padding: 0 60px; line-height: 28px; font-size: 14px; min-height:400px }
.news_info p { margin-bottom: 30px }
.aboutBox h2 { font-size:16px; margin-bottom:15px }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<div class="channelWrap channelNews cf">
<div class="news_title">
<h2 th:utext="${news.title}"></h2>
<p class="from" th:text="'来源:'+${news.sourceName}"> <span class="time" th:text="${#dates.format(news.createTime, 'yy-MM-dd')}"></span></p>
<!--while [[...]] corresponds to th:text (i.e. result will be HTML-escaped), [(...)] corresponds to th:utext-->
<p class="from">来源:[[${news.sourceName}]] <span class="time" th:text="'时间:'+${#dates.format(news.createTime, 'yy-MM-dd')}"></span> <span class="time" th:text="'点击:'+'888'"></span></p>
</div>
<div class="news_info" th:utext="${news.content}">
</div>
Expand Down

0 comments on commit b99b6ae

Please sign in to comment.