From dd51522f81b0d928e5bbb5094f284b06f200dbfe Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Sat, 15 Aug 2020 01:18:19 +0800 Subject: [PATCH] New element .post-content --- layout/archive.njk | 4 ++-- layout/category.njk | 4 ++-- layout/tag.njk | 4 ++-- source/css/_common/components/post/post-collapse.styl | 2 +- source/css/_common/outline/mobile.styl | 5 ----- source/css/_variables/base.styl | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/layout/archive.njk b/layout/archive.njk index f8e4d9a..76e1a14 100644 --- a/layout/archive.njk +++ b/layout/archive.njk @@ -4,7 +4,7 @@ {% block title %}{{ __('title.archive') }} | {{ title }}{% endblock %} -{% block class %}archive{% endblock %} +{% block class %}archive posts-collapse{% endblock %} {% block content %} @@ -12,7 +12,7 @@ {### ARCHIVE BLOCK ###} {#####################}
-
+
{%- set posts_length = site.posts.length %} {%- if posts_length > 210 %} diff --git a/layout/category.njk b/layout/category.njk index be7f193..49850fd 100644 --- a/layout/category.njk +++ b/layout/category.njk @@ -4,7 +4,7 @@ {% block title %}{{ __('title.category') }}: {{ page.category }} | {{ title }}{% endblock %} -{% block class %}category{% endblock %} +{% block class %}category posts-collapse{% endblock %} {% block content %} @@ -12,7 +12,7 @@ {### CATEGORY BLOCK ###} {######################}
-
+

{{- page.category }} diff --git a/layout/tag.njk b/layout/tag.njk index 6756666..66a6a9e 100644 --- a/layout/tag.njk +++ b/layout/tag.njk @@ -4,7 +4,7 @@ {% block title %}{{ __('title.tag') }}: {{ page.tag }} | {{ title }}{% endblock %} -{% block class %}tag{% endblock %} +{% block class %}tag posts-collapse{% endblock %} {% block content %} @@ -12,7 +12,7 @@ {### TAG BLOCK ###} {#################}
-
+

{{- page.tag }} diff --git a/source/css/_common/components/post/post-collapse.styl b/source/css/_common/components/post/post-collapse.styl index 038964c..2a4351c 100644 --- a/source/css/_common/components/post/post-collapse.styl +++ b/source/css/_common/components/post/post-collapse.styl @@ -1,4 +1,4 @@ -.posts-collapse { +.posts-collapse .post-content { margin-bottom: $posts-collapse-margin; margin-left: $posts-collapse-margin; position: relative; diff --git a/source/css/_common/outline/mobile.styl b/source/css/_common/outline/mobile.styl index 7e59409..bb14012 100644 --- a/source/css/_common/outline/mobile.styl +++ b/source/css/_common/outline/mobile.styl @@ -24,11 +24,6 @@ padding: $content-mobile-padding 18px $content-mobile-padding !important; } - .posts-collapse { - margin-left: 0; - margin-right: 0; - } - .post-body { // For headers narrow width. h1, h2, h3, h4, h5, h6 { diff --git a/source/css/_variables/base.styl b/source/css/_variables/base.styl index 6db4a24..ffd7c6e 100644 --- a/source/css/_variables/base.styl +++ b/source/css/_variables/base.styl @@ -222,7 +222,7 @@ $site-subtitle-color = $grey-dark; // Posts Collpase // -------------------------------------------------- $posts-collapse-margin = 35px; -$posts-collapse-margin-mobile = 0px; +$posts-collapse-margin-mobile = 0; // Tag Cloud