feat: NAV 添加投稿入口,笔图标+投稿
- nav.html: 帖子后添加笔图标+投稿链接(仅登录可见),跳转 /studio/write - posts/index.html: 移除独立的撰写帖子按钮 - common.css: 添加 .nav-contribute 样式,inline-flex + vertical-align: middle + line-height: 1
This commit is contained in:
@ -8,6 +8,10 @@
|
|||||||
<li><a href="/">首页</a></li>
|
<li><a href="/">首页</a></li>
|
||||||
<li><a href="/posts">帖子</a></li>
|
<li><a href="/posts">帖子</a></li>
|
||||||
{{if .IsLoggedIn}}
|
{{if .IsLoggedIn}}
|
||||||
|
<li><a href="/studio/write" class="nav-contribute">
|
||||||
|
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>
|
||||||
|
投稿
|
||||||
|
</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/messages" class="nav-messages" id="messagesBell" title="消息中心">
|
<a href="/messages" class="nav-messages" id="messagesBell" title="消息中心">
|
||||||
<svg class="nav-bell-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
|
<svg class="nav-bell-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
|
||||||
|
|||||||
@ -6,9 +6,6 @@
|
|||||||
<div class="container posts-container">
|
<div class="container posts-container">
|
||||||
<div class="posts-header">
|
<div class="posts-header">
|
||||||
<h1>社区帖子</h1>
|
<h1>社区帖子</h1>
|
||||||
{{if .IsLoggedIn}}
|
|
||||||
<a href="/studio/write" class="btn btn-primary">撰写帖子</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if .Error}}
|
{{if .Error}}
|
||||||
|
|||||||
@ -145,6 +145,27 @@ header {
|
|||||||
color: var(--color-secondary) !important;
|
color: var(--color-secondary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------- Nav Contribute ---------- */
|
||||||
|
.nav-contribute {
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 1;
|
||||||
|
color: var(--color-accent) !important;
|
||||||
|
font-weight: 600 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-contribute .icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: block;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-contribute:hover {
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------- Nav Messages Bell ---------- */
|
/* ---------- Nav Messages Bell ---------- */
|
||||||
.nav-messages {
|
.nav-messages {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
Reference in New Issue
Block a user