[opt] rightbar

This commit is contained in:
xaoxuu 2024-04-11 11:04:52 +08:00
parent af9f2ebcf7
commit d70eb23738
6 changed files with 9 additions and 21 deletions

View File

@ -14,7 +14,7 @@ btn:
getting_started: Getting Started getting_started: Getting Started
edit: Edit This Page edit: Edit This Page
top: Scroll to Top top: Scroll to Top
bottom: Jump to Comment comments: Join Discussion
meta: meta:
recent_update: Recent Update recent_update: Recent Update

View File

@ -14,7 +14,7 @@ btn:
getting_started: 开始使用 getting_started: 开始使用
edit: 编辑本文 edit: 编辑本文
top: 回到顶部 top: 回到顶部
bottom: 评论跳转 comments: 参与讨论
meta: meta:
recent_update: 最近更新 recent_update: 最近更新

View File

@ -14,7 +14,7 @@ btn:
getting_started: 開始使用 getting_started: 開始使用
edit: 編輯本文 edit: 編輯本文
top: 回到頂部 top: 回到頂部
bottom: 評論跳轉 comments: 參與討論
meta: meta:
recent_update: 最近更新 recent_update: 最近更新

View File

@ -5,12 +5,4 @@
<button type='button' style='display:none' class='mobile-only leftbar-toggle mobile' onclick='sidebar.leftbar()'> <button type='button' style='display:none' class='mobile-only leftbar-toggle mobile' onclick='sidebar.leftbar()'>
<%- icon('default:leftbar') %> <%- icon('default:leftbar') %>
</button> </button>
<button type='button' style='display:none' class='laptop-only button-toggle mobile' onclick='util.scrollTop()'>
<%- icon('default:upup') %>
</button>
<% if (page.comments) { %>
<button type='button' style='display:none' class='laptop-only button-toggle mobile' onclick='util.scrollComment()'>
<%- icon('default:tocomment') %>
</button>
<% } %>
</div> </div>

View File

@ -55,10 +55,12 @@ function layoutDiv(fallback) {
el += icon('default:upup') el += icon('default:upup')
el += `<span>${__('btn.top')}</span>` el += `<span>${__('btn.top')}</span>`
el += `</a>` el += `</a>`
if (page.comments) {
el += `<a class="buttom" onclick="util.scrollComment()">` el += `<a class="buttom" onclick="util.scrollComment()">`
el += icon('default:tocomment') el += icon('default:tocomment')
el += `<span>${__('btn.bottom')}</span>` el += `<span>${__('btn.comments')}</span>`
el += `</a>` el += `</a>`
}
el += `</div>` el += `</div>`
el += `</widget>` el += `</widget>`
return el return el

View File

@ -162,9 +162,3 @@
.tk-comments-no .tk-comments-no
color: var(--text-p1) color: var(--text-p1)
if theme(dark)
_dark_comments()
else if theme(auto)
@media (prefers-color-scheme: dark)
_dark_comments()