Skip to content

Commit 9c435e3

Browse files
committed
Improved the posts layout.
1 parent 6ebad75 commit 9c435e3

4 files changed

Lines changed: 20 additions & 43 deletions

File tree

_includes/disqus.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
MIT License
88
-->
99

10-
<div id="disqus" class="pt-2 pb-4">
11-
<p class="font-italic text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
10+
<div id="disqus" class="pt-2 pb-2">
11+
<p class="font-italic text-center text-muted small">
12+
Comments powered by <a href="https://disqus.com/">Disqus</a>.
13+
</p>
1214
</div>
1315

1416
<script src="{{ site.baseurl }}/assets/js/lib/jquery.disqusloader.min.js"></script>

_includes/related-posts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585

8686
{% if index_list.size > 0 %}
87-
<div id="related-posts" class="mt-4 mb-2 mb-sm-4 pb-2">
87+
<div id="related-posts" class="mt-5 mb-2 mb-sm-4">
8888
<h3 class="pt-2 mt-1 mb-4 ml-1" data-toc-skip>{{ site.data.label.post.relate_posts }}</h3>
8989
<div class="card-deck mb-4">
9090
{% for entry in index_list %}

_layouts/post.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h1 data-toc-skip>{{ page.title }}</h1>
9999
{% endif %}
100100

101101
<div class="post-tail-bottom
102-
d-flex justify-content-between align-items-center pt-5 pb-2">
102+
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
103103
{% if site.data.rights.license %}
104104
<div class="license-wrapper">
105105
This post is licensed under
@@ -116,28 +116,28 @@ <h1 data-toc-skip>{{ page.title }}</h1>
116116

117117
</div> <!-- .post -->
118118

119+
119120
</div> <!-- #post-wrapper -->
120121

121122
{% include panel.html %}
122123

123124
</div> <!-- .row -->
124125

125126
<div class="row">
126-
<div id="post-extend-wrapper" class="col-12 col-lg-11 col-xl-8">
127-
128-
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
127+
<div class="col-12 col-lg-11 col-xl-8">
128+
<div id="post-extend-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
129129

130-
{% include post-nav.html %}
130+
{% include related-posts.html %}
131131

132-
{% if site.disqus.comments and page.comments %}
133-
{% include disqus.html %}
134-
{% endif %}
132+
{% include post-nav.html %}
135133

136-
{% include related-posts.html %}
134+
{% if site.disqus.comments and page.comments %}
135+
{% include disqus.html %}
136+
{% endif %}
137137

138-
</div> <!-- .pl-1 pr-1 -->
138+
</div> <!-- #post-extend-wrapper -->
139139

140-
</div> <!-- #post-extend-wrapper -->
140+
</div> <!-- .col-* -->
141141

142142
</div> <!-- .row -->
143143

assets/css/post.scss

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
4545
}
4646

4747
.post-tail-wrapper {
48-
margin-top: 4rem;
48+
margin-top: 6rem;
4949
border-bottom: 1px double var(--main-border-color);
5050
font-size: 0.85rem;
5151
}
@@ -209,6 +209,9 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
209209

210210
#post-extend-wrapper {
211211
min-height: 2rem;
212+
#disqus_thread {
213+
margin-bottom: 2rem;
214+
}
212215
}
213216

214217
.post-tail-bottom a {
@@ -350,31 +353,3 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
350353
}
351354

352355
}
353-
354-
/*
355-
The following resposive design aim to
356-
make #post-extend-wrapper margin-right same as pannel's width
357-
*/
358-
@media all and (min-width: 1200px) {
359-
#post-extend-wrapper {
360-
margin-right: 25%;
361-
}
362-
}
363-
364-
@media all and (min-width: 1460px) {
365-
#post-extend-wrapper {
366-
margin-right: 300px;
367-
}
368-
}
369-
370-
@media all and (min-width: 1650px) {
371-
#post-extend-wrapper {
372-
margin-right: calc((100% - 1150px) / 10 + 300px);
373-
}
374-
}
375-
376-
@media all and (min-width: 1700px) {
377-
#post-extend-wrapper {
378-
margin-right: calc((100% - 1150px) / 8 + 300px);
379-
}
380-
}

0 commit comments

Comments
 (0)