[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
edit: Edit This Page
top: Scroll to Top
bottom: Jump to Comment
comments: Join Discussion
meta:
recent_update: Recent Update

View File

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

View File

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

View File

@ -5,12 +5,4 @@
<button type='button' style='display:none' class='mobile-only leftbar-toggle mobile' onclick='sidebar.leftbar()'>
<%- icon('default:leftbar') %>
</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>

View File

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

View File

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