Skip to content

Commit a0ef01d

Browse files
committed
style(skin): 调整长文章页面样式和专栏标签显示
- 将作者信息底部间距从8px调整为4px - 新增.long-book__column类样式用于专栏标签显示 - 将专栏标签从内联样式改为独立CSS类 - 修改专栏标签HTML结构,使用div替代span元素 - 更新长文章编辑器占位符提示文字
1 parent 7aba7ef commit a0ef01d

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed

src/main/resources/css/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/lang_zh_CN.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ settingsLabel=\u8bbe\u7f6e
619619
addArticleLabel=\u6dfb\u52a0\u65b0\u5e16\u5b50
620620
updateArticleLabel=\u66f4\u65b0\u5e16\u5b50
621621
addLongArticleLabel=\u957f\u6587\u7ae0
622-
addLongArticleEditorPlaceholderLabel=\u5f00\u59cb\u4e66\u5199\u4f60\u7684\u957f\u7ae0\u7bc7\u7a74...
622+
addLongArticleEditorPlaceholderLabel=\u5f00\u59cb\u4e66\u5199\u4f60\u7684\u957f\u7bc7\u6545\u4e8b...
623623
longArticleLabel=\u957f\u6587\u7ae0
624624
longArticleTipLabel=\u9002\u5408\u521b\u4f5c\u5c0f\u8bf4\u3001\u957f\u7bc7\u6545\u4e8b\u7b49
625625
longArticleTypeLabel=\u957f\u6587\u7ae0

src/main/resources/scss/index.scss

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4410,7 +4410,7 @@ body.night {
44104410
.long-book__author {
44114411
font-size: 12px;
44124412
color: #6b7280;
4413-
margin-bottom: 8px;
4413+
margin-bottom: 4px;
44144414
display: flex;
44154415
align-items: center;
44164416
gap: 4px;
@@ -4429,6 +4429,26 @@ body.night {
44294429
color: #6b7280;
44304430
}
44314431

4432+
.long-book__column {
4433+
display: inline-flex;
4434+
align-items: center;
4435+
align-self: flex-start;
4436+
max-width: 100%;
4437+
margin: -2px 0 8px;
4438+
padding: 0 8px;
4439+
height: 22px;
4440+
line-height: 22px;
4441+
border-radius: 11px;
4442+
background: #eef4ff;
4443+
color: #2b5db9;
4444+
font-size: 12px;
4445+
white-space: nowrap;
4446+
overflow: hidden;
4447+
text-overflow: ellipsis;
4448+
cursor: pointer;
4449+
}
4450+
4451+
44324452
.long-book__summary {
44334453
font-size: 12px;
44344454
line-height: 1.55;

src/main/resources/skins/classic/index.ftl

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,10 @@
318318
</#if>
319319
<div class="long-book__info">
320320
<div class="long-book__title">${article.articleTitleEmoj}</div>
321-
<div class="long-book__author">${article.articleAuthorName}
322-
<#if article.columnId?? && article.columnId?has_content && article.columnTitle?? && article.columnTitle?has_content>
323-
<span style="display:inline-block;margin-left:6px;padding:0 6px;border-radius:10px;background:#eef4ff;color:#2b5db9;line-height:18px;vertical-align:middle;cursor:pointer;" onclick="event.preventDefault();event.stopPropagation();window.location.href='${servePath}/column/${article.columnId}';">专栏 · ${article.columnTitle}</span>
324-
</#if>
325-
</div>
321+
<div class="long-book__author">${article.articleAuthorName}</div>
322+
<#if article.columnId?? && article.columnId?has_content && article.columnTitle?? && article.columnTitle?has_content>
323+
<div class="long-book__column" title="专栏 · ${article.columnTitle}" onclick="event.preventDefault();event.stopPropagation();window.location.href='${servePath}/column/${article.columnId}';">专栏 · ${article.columnTitle}</div>
324+
</#if>
326325
<#if article.articlePreviewContent?has_content && !coverUrl?has_content>
327326
<div class="long-book__summary">${article.articlePreviewContent}</div>
328327
</#if>
@@ -366,11 +365,10 @@
366365
</#if>
367366
<div class="long-book__info">
368367
<div class="long-book__title">${article.articleTitleEmoj}</div>
369-
<div class="long-book__author">${article.articleAuthorName}
370-
<#if article.columnId?? && article.columnId?has_content && article.columnTitle?? && article.columnTitle?has_content>
371-
<span style="display:inline-block;margin-left:6px;padding:0 6px;border-radius:10px;background:#eef4ff;color:#2b5db9;line-height:18px;vertical-align:middle;cursor:pointer;" onclick="event.preventDefault();event.stopPropagation();window.location.href='${servePath}/column/${article.columnId}';">专栏 · ${article.columnTitle}</span>
372-
</#if>
373-
</div>
368+
<div class="long-book__author">${article.articleAuthorName}</div>
369+
<#if article.columnId?? && article.columnId?has_content && article.columnTitle?? && article.columnTitle?has_content>
370+
<div class="long-book__column" title="专栏 · ${article.columnTitle}" onclick="event.preventDefault();event.stopPropagation();window.location.href='${servePath}/column/${article.columnId}';">专栏 · ${article.columnTitle}</div>
371+
</#if>
374372
<#if article.articlePreviewContent?has_content && !coverUrl?has_content>
375373
<div class="long-book__summary">${article.articlePreviewContent}</div>
376374
</#if>

0 commit comments

Comments
 (0)