diff --git a/layout/home-content.ejs b/layout/home-content.ejs index d41eccc..125d073 100644 --- a/layout/home-content.ejs +++ b/layout/home-content.ejs @@ -17,7 +17,7 @@ <% if (post.excerpt) { %> <%- post.excerpt %> <% } else { %> - <%- truncate(strip_html(post.content), {length: 168}) %> + <%- truncate(strip_html(post.content), {length: 128}) %> <% } %> diff --git a/source/css/layout/_partial/empty-page.styl b/source/css/layout/_partial/empty-page.styl index 69b1414..c534c57 100644 --- a/source/css/layout/_partial/empty-page.styl +++ b/source/css/layout/_partial/empty-page.styl @@ -4,7 +4,7 @@ $friend-link-item-border-radius = 6px; .empty-page-container { - keep-container(1.005, 1.01, 30px, true); + keep-container(1.005, 1.01, 30px, 30px); .empty-page-content { diff --git a/source/css/layout/_partial/tagcloud.styl b/source/css/layout/_partial/tagcloud.styl index 305afd3..d64aada 100644 --- a/source/css/layout/_partial/tagcloud.styl +++ b/source/css/layout/_partial/tagcloud.styl @@ -1,6 +1,6 @@ .tagcloud-container { - keep-container(1.005, 1.01, 30px, true); + keep-container(1.005, 1.01, 30px, 30px); .tagcloud-content { diff --git a/source/css/layout/archive-content.styl b/source/css/layout/archive-content.styl index 63c58b1..22a5586 100644 --- a/source/css/layout/archive-content.styl +++ b/source/css/layout/archive-content.styl @@ -1,5 +1,5 @@ .archive-container { - keep-container(1.005, 1.01, 30px, true); + keep-container(1.005, 1.01, 30px, 30px); } diff --git a/source/css/layout/article-content.styl b/source/css/layout/article-content.styl index 4140836..67b473a 100644 --- a/source/css/layout/article-content.styl +++ b/source/css/layout/article-content.styl @@ -4,7 +4,7 @@ $post-nav-max-width = 220px; .article-content-container { - keep-container(1.008, 1.002, 30px, true); + keep-container(1.008, 1.002, 30px, 30px); .article-title { color: var(--second-text-color); @@ -109,7 +109,7 @@ $post-nav-max-width = 220px; height: 100%; box-sizing: border-box; - keep-container(1.08, 1.08, 10px, false); + keep-container(1.08, 1.08, 10px, 0); a { position: relative; diff --git a/source/css/layout/category-content.styl b/source/css/layout/category-content.styl index bb354e8..326b81e 100644 --- a/source/css/layout/category-content.styl +++ b/source/css/layout/category-content.styl @@ -1,6 +1,6 @@ .category-container { - keep-container(1.02, 1.02, 30px, true); + keep-container(1.02, 1.02, 30px, 30px); .category-name { color: var(--second-text-color); diff --git a/source/css/layout/category-list.styl b/source/css/layout/category-list.styl index 135a1f2..699e156 100644 --- a/source/css/layout/category-list.styl +++ b/source/css/layout/category-list.styl @@ -1,6 +1,6 @@ .category-list-container { - keep-container(1.005, 1.01, 30px, true); + keep-container(1.005, 1.01, 30px, 30px); .category-list-content { diff --git a/source/css/layout/common/keep-theme.styl b/source/css/layout/common/keep-theme.styl index 796e49e..ed78641 100644 --- a/source/css/layout/common/keep-theme.styl +++ b/source/css/layout/common/keep-theme.styl @@ -1,4 +1,3 @@ -$keep-container-margin-bottom = 30px; $keep-container-border-radius = 5px; hover-style(scaleX, scaleY) { @@ -20,24 +19,25 @@ hover-style(scaleX, scaleY) { } -keep-container(scaleX, scaleY, padding, isMarginBottom) { +keep-container(scaleX, scaleY, padding, marginBottomValue) { background: var(--background-color); padding: padding; border-radius: $keep-container-border-radius; box-sizing: border-box; - if (isMarginBottom) { - margin-bottom: $keep-container-margin-bottom; + if (marginBottomValue != 0) { + margin-bottom: marginBottomValue; +keep-tablet() { - margin-bottom: $keep-container-margin-bottom * 0.8; + margin-bottom: marginBottomValue * 0.8; } +keep-mobile() { - margin-bottom: $keep-container-margin-bottom * 0.6; + margin-bottom: marginBottomValue * 0.6; } } + hover-style(scaleX, scaleY); +keep-tablet() { diff --git a/source/css/layout/home-content.styl b/source/css/layout/home-content.styl index 3bcd03b..05a5b2b 100644 --- a/source/css/layout/home-content.styl +++ b/source/css/layout/home-content.styl @@ -5,7 +5,7 @@ .home-article-item { position: relative; - keep-container(1.02, 1.02, 28px, true); + keep-container(1.02, 1.02, 28px, 38px); .top-icon { position: absolute; diff --git a/source/css/layout/page.styl b/source/css/layout/page.styl index dbe1116..e819319 100644 --- a/source/css/layout/page.styl +++ b/source/css/layout/page.styl @@ -128,7 +128,7 @@ $page-aside-width = $temp-width ? convert($temp-width) : 260px; overflow-y: auto; border-radius: 0 !important; - keep-container(1.02, 1.02, 18px, false); + keep-container(1.02, 1.02, 18px, 0); +keep-tablet() { left: 0 !important; diff --git a/source/css/layout/tag-content.styl b/source/css/layout/tag-content.styl index 72f0db8..5403023 100644 --- a/source/css/layout/tag-content.styl +++ b/source/css/layout/tag-content.styl @@ -1,6 +1,6 @@ .tag-container { - keep-container(1.02, 1.02, 30px, true); + keep-container(1.02, 1.02, 30px, 30px); .tag-name { color: var(--second-text-color);