[opt] css

This commit is contained in:
xaoxuu 2022-12-12 21:07:22 +08:00
parent 801e3dc610
commit 540f93eaed
8 changed files with 19 additions and 13 deletions

View File

@ -32,11 +32,11 @@ page.cmt = cmt;
%>
<% if (loadComment) { %>
<div class='related-wrap md-text reveal' id="comments">
<div class='cmt-title cap theme'>
<section class='header cmt-title cap theme'>
<%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
</div>
<div class='cmt-body <%- cmt.service %>'>
</section>
<section class='body cmt-body <%- cmt.service %>'>
<%- partial(cmt.service + '/layout') %>
</div>
</section>
</div>
<% } %>

View File

@ -63,7 +63,7 @@ function layoutDiv(fallback) {
var el = '';
if (type.length > 0) {
el += '<widget class="widget-wrapper toc ' + type + '" id="toc">';
el += '<widget class="widget-wrapper toc ' + type + '" id="data-toc">';
if (page.layout !== 'wiki') {
// post 布局
el += layoutTocHeader(page.toc_title);

View File

@ -49,7 +49,8 @@ h1.article-title
a.headerlink:before
opacity: 1
.md-text.content:first-child
padding-top: 0
.md-text
ul:not(:last-child),

View File

@ -84,7 +84,7 @@ article.md-text.content+.related-wrap
.related-wrap#comments
padding: 0 1rem
div.cmt-title
.cmt-title
p
margin: 0
font-size: inherit
@ -95,7 +95,7 @@ article.md-text.content+.related-wrap
color: $color-hover
&:before
display: none
div.cmt-body
.cmt-body
min-height: 150px
position: relative
svg.loading

View File

@ -0,0 +1,3 @@
.md-text
.aplayer
border-radius: $border-block

View File

@ -2,5 +2,5 @@
margin: 0 -4px
width: 'calc(100% + %s)' % 8px
.related-wrap#comments div.cmt-body svg.loading
.related-wrap#comments .cmt-body svg.loading
top: 62px

View File

@ -1,3 +1,5 @@
@import 'aplayer'
//
if hexo-config('plugins.lazyload.enable')
@import 'lazyload'

View File

@ -111,12 +111,12 @@ const init = {
}
}
if (topSeg) {
$(".toc#toc a.toc-link").removeClass("active")
$("#data-toc a.toc-link").removeClass("active")
var link = "#" + topSeg.attr("id")
if (link != '#undefined') {
$('.toc#toc a.toc-link[href="' + encodeURI(link) + '"]').addClass("active")
$('#data-toc a.toc-link[href="' + encodeURI(link) + '"]').addClass("active")
} else {
$('.toc#toc a.toc-link:first').addClass("active")
$('#data-toc a.toc-link:first').addClass("active")
}
}
})
@ -124,7 +124,7 @@ const init = {
},
sidebar: () => {
stellar.jQuery(() => {
$(".toc#toc a.toc-link").click(function (e) {
$("#data-toc a.toc-link").click(function (e) {
l_body.classList.remove("sidebar");
});
})