diff --git a/layout/_partials/footer.pug b/layout/_partials/footer.pug index 00efe5a..0ed3272 100644 --- a/layout/_partials/footer.pug +++ b/layout/_partials/footer.pug @@ -15,7 +15,8 @@ div(class="status") i(class="ic i-chart-area") span(title=__('symbols_count_time.count_total')) != `${ symbolsCountTotal(site) } ${__('symbols_count_time.word')}` - span(class="post-meta-divider") | + span(class="post-meta-divider") + != " | " span(class="post-meta-item-icon") i(class="ic i-coffee") span(title=__('symbols_count_time.time_total')) @@ -27,14 +28,14 @@ div(class="status") != __('footer.powered', _url('https://hexo.io', 'Hexo') + ' & Theme.' + _url('https://github.com/theme-shoka-x/hexo-theme-shokaX/', 'ShokaX')) if theme.footer.icp.enable br - span(style="display:inline;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;") + span(style="display:inline;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:var(--grey-5);") a(href="https://beian.miit.gov.cn") != theme.footer.icp.icpnumber - var beianN = theme.footer.icp?.beian, RC=theme.footer.icp?.recordcode if beianN && RC br a(target="_blank" href=`https://beian.mps.gov.cn/#/query/webSearch?code=${RC}`) - img(loading="lazy" decoding="async" data-src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;" width="20" height="20") + img(loading="lazy" decoding="async" data-src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;" width="20" height="20" alt="备案") != beianN != shokax_inject('status') diff --git a/layout/_partials/head/head_com.pug b/layout/_partials/head/head_com.pug index 6c3aa39..db54777 100644 --- a/layout/_partials/head/head_com.pug +++ b/layout/_partials/head/head_com.pug @@ -11,6 +11,13 @@ else if page.tags && page.tags.length else if config.keywords meta(name="keywords" content=config.keywords) +if page.description + meta(name="description" content=page.description) +else if page.excerpt + meta(name="description" content=page.excerpt) +else if config.description + meta(name="description" content=config.description) + != canonical() if theme.open_graph diff --git a/layout/_partials/layout.pug b/layout/_partials/layout.pug index 0ef99d9..7c65506 100644 --- a/layout/_partials/layout.pug +++ b/layout/_partials/layout.pug @@ -47,14 +47,14 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f if theme.homeConfig.gradient || enableFixedCover //- cover不可用时用Bing随机图片代替 - var coverImage = theme.homeConfig?.fixedCover || "https://7ed.net/bing/api" - img(src=coverImage loading="eager" decoding="async" fetchpriority="high") + img(src=coverImage loading="eager" decoding="async" fetchpriority="high" alt=title) else if covers.length === 6 ul each image in covers li(class="item" style=`background-image: url("${image}");`) else - img(src=covers loading="eager" decoding="async" fetchpriority="high") + img(src=covers loading="eager" decoding="async" fetchpriority="high" alt=title) div(id="waves") svg(class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto") defs diff --git a/layout/_partials/sidebar/menu.pug b/layout/_partials/sidebar/menu.pug index bed39e0..7ee0800 100644 --- a/layout/_partials/sidebar/menu.pug +++ b/layout/_partials/sidebar/menu.pug @@ -8,7 +8,7 @@ mixin item(name, path, parent, sublist) if parent li(class="item dropdown") if itemURL === '/' - a(href="javascript:void(0);") + a(href="#" onclick="return false;") != menuIcon + menuText else != _url(itemURL, menuIcon + menuText, {rel: 'section'}) diff --git a/source/css/_common/outline/footer/footer.styl b/source/css/_common/outline/footer/footer.styl index 764e781..a4afd06 100644 --- a/source/css/_common/outline/footer/footer.styl +++ b/source/css/_common/outline/footer/footer.styl @@ -6,7 +6,7 @@ background: var(--body-bg-shadow); .inner { - margin: 0 auto; + margin: 2rem auto .625rem; width: $content-desktop; position: relative; @@ -35,7 +35,6 @@ .status { width: 100%; text-align: center; - margin-top: 2rem; } .languages { @@ -65,5 +64,4 @@ .powered-by, .theme-info { display: inline-block; - margin-bottom: .625rem; } diff --git a/source/js/_app/components/sidebar.ts b/source/js/_app/components/sidebar.ts index ac3fba4..e3d6a43 100644 --- a/source/js/_app/components/sidebar.ts +++ b/source/js/_app/components/sidebar.ts @@ -228,7 +228,7 @@ export const menuActive = () => { if (!target) return const isSamePath = target.pathname === location.pathname || target.pathname === location.pathname.replace('index.html', '') const isSubPath = !CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname) - const active = target.hostname === location.hostname && (isSamePath || isSubPath) + const active = !target.onclick && target.hostname === location.hostname && (isSamePath || isSubPath) element.toggleClass('active', active) if (element.parentNode.child('.active') && parentItem.hasClass('dropdown')) { parentItem.removeClass('active').addClass('expand')