Improved the posts layout.

This commit is contained in:
Cotes Chung 2020-07-30 04:58:05 +08:00
parent 4675d42f90
commit 112091cbf6
4 changed files with 20 additions and 43 deletions

View File

@ -7,8 +7,10 @@
MIT License
-->
<div id="disqus" class="pt-2 pb-4">
<p class="font-italic text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
<div id="disqus" class="pt-2 pb-2">
<p class="font-italic text-center text-muted small">
Comments powered by <a href="https://disqus.com/">Disqus</a>.
</p>
</div>
<script src="{{ site.baseurl }}/assets/js/lib/jquery.disqusloader.min.js"></script>

View File

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

View File

@ -99,7 +99,7 @@ layout: default
{% endif %}
<div class="post-tail-bottom
d-flex justify-content-between align-items-center pt-5 pb-2">
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
{% if site.data.rights.license %}
<div class="license-wrapper">
This post is licensed under
@ -116,6 +116,7 @@ layout: default
</div> <!-- .post -->
</div> <!-- #post-wrapper -->
{% include panel.html %}
@ -123,9 +124,10 @@ layout: default
</div> <!-- .row -->
<div class="row">
<div id="post-extend-wrapper" class="col-12 col-lg-11 col-xl-8">
<div class="col-12 col-lg-11 col-xl-8">
<div id="post-extend-wrapper" class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
{% include related-posts.html %}
{% include post-nav.html %}
@ -133,12 +135,10 @@ layout: default
{% include disqus.html %}
{% endif %}
{% include related-posts.html %}
</div> <!-- .pl-1 pr-1 -->
</div> <!-- #post-extend-wrapper -->
</div> <!-- .col-* -->
</div> <!-- .row -->
{% include lozad.html %}

View File

@ -45,7 +45,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}
.post-tail-wrapper {
margin-top: 4rem;
margin-top: 6rem;
border-bottom: 1px double var(--main-border-color);
font-size: 0.85rem;
}
@ -209,6 +209,9 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
#post-extend-wrapper {
min-height: 2rem;
#disqus_thread {
margin-bottom: 2rem;
}
}
.post-tail-bottom a {
@ -350,31 +353,3 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}
}
/*
The following resposive design aim to
make #post-extend-wrapper margin-right same as pannel's width
*/
@media all and (min-width: 1200px) {
#post-extend-wrapper {
margin-right: 25%;
}
}
@media all and (min-width: 1460px) {
#post-extend-wrapper {
margin-right: 300px;
}
}
@media all and (min-width: 1650px) {
#post-extend-wrapper {
margin-right: calc((100% - 1150px) / 10 + 300px);
}
}
@media all and (min-width: 1700px) {
#post-extend-wrapper {
margin-right: calc((100% - 1150px) / 8 + 300px);
}
}