Skip to content

Commit 2bbfda7

Browse files
authored
refactor(layout): improve margin bottom of the core block (cotes2020#1116)
Improvement of commit 73af591
1 parent b0f4ae5 commit 2bbfda7

File tree

7 files changed

+12
-21
lines changed

7 files changed

+12
-21
lines changed

_includes/post-paginator.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- The paginator for post list on HomgPage. -->
22

3-
<ul class="pagination align-items-center mt-4 mb-5 ps-lg-2">
3+
<ul class="pagination align-items-center mt-4 mb-1 ps-lg-2">
44
<!-- left arrow -->
55
{% if paginator.previous_page %}
66
{% assign prev_url = paginator.previous_page_path | relative_url %}

_layouts/category.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{% include lang.html %}
77

8-
<div id="page-category" class="mb-5">
8+
<div id="page-category">
99
<h1 class="ps-lg-2">
1010
<i class="far fa-folder-open fa-fw text-muted"></i>
1111
{{ page.title }}

_layouts/home.html

+2-11
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,7 @@
4040
{% endfor %}
4141
{% endif %}
4242

43-
{% if paginator.total_pages > 1 %}
44-
{% assign has_paginator = true %}
45-
{% endif %}
46-
47-
<div
48-
id="post-list"
49-
{% unless has_paginator %}
50-
class="mb-5"
51-
{% endunless %}
52-
>
43+
<div id="post-list">
5344
{% for post in posts %}
5445
<a href="{{ post.url | relative_url }}" class="card-wrapper">
5546
<div class="card post-preview flex-md-row-reverse">
@@ -114,6 +105,6 @@ <h1 class="card-title my-2 mt-md-0">
114105
</div>
115106
<!-- #post-list -->
116107

117-
{% if has_paginator %}
108+
{% if paginator.total_pages > 1 %}
118109
{% include post-paginator.html %}
119110
{% endif %}

_layouts/page.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
{% include lang.html %}
66
{% include origin-type.html %}
77

8-
<div class="row">
8+
{% if layout.tail_includes %}
9+
{% assign has_tail = true %}
10+
{% endif %}
11+
12+
<div class="row{% unless has_tail %} mb-5{% endunless %}">
913
<!-- core -->
1014
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pe-xl-4">
1115
{% capture padding %}
@@ -52,7 +56,7 @@ <h1 class="dynamic-title">
5256
</div>
5357

5458
<!-- tail -->
55-
{% if layout.tail_includes %}
59+
{% if has_tail %}
5660
<div class="row">
5761
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-3 pe-xl-4 mt-5">
5862
{% for _include in layout.tail_includes %}

_layouts/tag.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{% include lang.html %}
77

8-
<div id="page-tag" class="mb-5">
8+
<div id="page-tag">
99
<h1 class="ps-lg-2">
1010
<i class="fa fa-tag fa-fw text-muted"></i>
1111
{{ page.title }}

_layouts/tags.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# All the Tags of posts.
44
---
55

6-
<div id="tags" class="d-flex flex-wrap mx-xl-2 mb-5">
6+
<div id="tags" class="d-flex flex-wrap mx-xl-2">
77
{% assign tags = '' | split: '' %}
88
{% for t in site.tags %}
99
{% assign tags = tags | push: t[0] %}

_sass/addon/commons.scss

-4
Original file line numberDiff line numberDiff line change
@@ -1213,10 +1213,6 @@ $btn-mb: 0.5rem;
12131213
}
12141214

12151215
#core-wrapper {
1216-
min-height: calc(
1217-
100vh - #{$topbar-height} - #{$footer-height-mobile}
1218-
) !important;
1219-
12201216
.post-content {
12211217
> blockquote[class^='prompt-'] {
12221218
@include ml-mr(-1.25rem);

0 commit comments

Comments
 (0)