feat: 详情页作者名链接到 /space/:uid 空间页
- 作者名可点击跳转到作者空间页,已注销用户不生成链接 - hover 时变为主题紫色 + 下划线,与 meta 行风格协调
This commit is contained in:
@ -8,7 +8,11 @@
|
|||||||
<header class="post-detail-header">
|
<header class="post-detail-header">
|
||||||
<h1 class="post-detail-title">{{.Post.Title}}</h1>
|
<h1 class="post-detail-title">{{.Post.Title}}</h1>
|
||||||
<div class="post-detail-meta">
|
<div class="post-detail-meta">
|
||||||
<span>作者:{{if .Post.AuthorName}}{{.Post.AuthorName}}{{else}}该用户已注销{{end}}</span>
|
{{if .Post.AuthorName}}
|
||||||
|
<span>作者:<a href="/space/{{.Post.UserID}}" class="post-meta-author">{{.Post.AuthorName}}</a></span>
|
||||||
|
{{else}}
|
||||||
|
<span>作者:该用户已注销</span>
|
||||||
|
{{end}}
|
||||||
<span>阅读:{{.Post.ViewsCount}}</span>
|
<span>阅读:{{.Post.ViewsCount}}</span>
|
||||||
<span>点赞:{{.Post.LikesCount}}</span>
|
<span>点赞:{{.Post.LikesCount}}</span>
|
||||||
<span>收藏:{{.Post.FavoritesCount}}</span>
|
<span>收藏:{{.Post.FavoritesCount}}</span>
|
||||||
|
|||||||
@ -97,6 +97,16 @@
|
|||||||
color: #6b7280;
|
color: #6b7280;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-detail-meta a {
|
||||||
|
color: #6b7280;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-detail-meta a:hover {
|
||||||
|
color: #6366f1;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.post-detail-body {
|
.post-detail-body {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
|
|||||||
Reference in New Issue
Block a user