From c9cdf1c695fc763be41a167a6f061a233d51a416 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Wed, 2 Sep 2020 09:56:23 +0800 Subject: [PATCH] Fix post-meta position in scheme Mist --- _config.yml | 3 +-- source/css/_common/outline/header/site-meta.styl | 2 +- source/css/_schemes/Mist/_posts-expand.styl | 11 +++++++++-- source/css/_variables/Mist.styl | 1 - source/css/_variables/base.styl | 1 - source/js/local-search.js | 1 + 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/_config.yml b/_config.yml index 0e8adaa..7e863f5 100644 --- a/_config.yml +++ b/_config.yml @@ -79,7 +79,6 @@ creative_commons: # Usage: `Key: /link/ || icon` # Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive. # Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon. -# When running the site in a subdirectory (e.g. yoursite.com/blog), remove the leading slash from link value (/archives -> archives). # External url should start with http:// or https:// menu: #home: / || fa fa-home @@ -165,7 +164,7 @@ links_settings: layout: block links: - #Title: http://yoursite.com + #Title: https://example.com # Table of Contents in the Sidebar # Front-matter variable (unsupport wrap expand_all). diff --git a/source/css/_common/outline/header/site-meta.styl b/source/css/_common/outline/header/site-meta.styl index 3afb6e3..2a51290 100644 --- a/source/css/_common/outline/header/site-meta.styl +++ b/source/css/_common/outline/header/site-meta.styl @@ -1,6 +1,6 @@ .site-meta { flex-grow: 1; - text-align: $site-meta-text-align; + text-align: center; +mobile() { text-align: center; diff --git a/source/css/_schemes/Mist/_posts-expand.styl b/source/css/_schemes/Mist/_posts-expand.styl index 2489b56..e62d2a5 100644 --- a/source/css/_schemes/Mist/_posts-expand.styl +++ b/source/css/_schemes/Mist/_posts-expand.styl @@ -3,7 +3,7 @@ .posts-expand { &.index { .post-header { - text-align: $site-meta-text-align; + text-align: left; +mobile() { text-align: center; @@ -13,6 +13,14 @@ .post-meta-container { margin-top: 5px; } + + .post-meta { + justify-content: flex-start; + + +mobile() { + justify-content: center; + } + } } .post-eof { @@ -25,7 +33,6 @@ .post-header { margin-bottom: 20px; - text-align: center; } .post-tags { diff --git a/source/css/_variables/Mist.styl b/source/css/_variables/Mist.styl index f37c08c..a892a96 100644 --- a/source/css/_variables/Mist.styl +++ b/source/css/_variables/Mist.styl @@ -15,7 +15,6 @@ $head-bg = var(--content-bg-color); $brand-color = $black-deep; $brand-hover-color = $brand-color; -$site-meta-text-align = left; $posts-collapse-left = 0; $btn-default-bg = transparent; diff --git a/source/css/_variables/base.styl b/source/css/_variables/base.styl index 97868e7..3c77d92 100644 --- a/source/css/_variables/base.styl +++ b/source/css/_variables/base.styl @@ -207,7 +207,6 @@ $headband-bg = $black-deep; $head-bg = transparent; // Site Meta -$site-meta-text-align = center; $brand-color = white; $brand-hover-color = white; $brand-color-dark = $grey-lighter; diff --git a/source/js/local-search.js b/source/js/local-search.js index 33ca439..edffe25 100644 --- a/source/js/local-search.js +++ b/source/js/local-search.js @@ -281,6 +281,7 @@ document.addEventListener('DOMContentLoaded', () => { }); }; + highlightSearchWords(); if (CONFIG.localsearch.preload) { fetchData(); }