Optimized responsive layout.

This commit is contained in:
Cotes Chung 2020-06-07 00:42:21 +08:00
parent 34d54f9349
commit ba47cc0509
3 changed files with 88 additions and 81 deletions

View file

@ -45,7 +45,7 @@
or item.name == page.tab_active
or item.name == "Home" and page.layout == "home" %}active{% endif %}">
<a href="{{ ref }}" class="nav-link d-flex justify-content-center align-items-center w-100">
<i class="fa-fw {{ item.icon }} ml-3 mr-3 unloaded"></i>
<i class="fa-fw {{ item.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
<span>{{ item.name | upcase }}</span>
</a>
</li> <!-- .nav-item -->

View file

@ -53,7 +53,7 @@ layout: page
{% for post in posts %}
<div class="post-preview">
<div class="d-flex justify-content-between align-items-center pr-2">
<div class="d-flex justify-content-between align-items-center pr-xl-2">
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
{% if post.pin %}
<i class="fas fa-thumbtack fa-fw fa-sm text-muted pinned" data-toggle="tooltip" data-placement="top"

View file

@ -11,36 +11,33 @@
#post-list {
margin-top: 1rem;
padding-right: .5rem;
.post-meta {
i:not(:first-child) { // post-meta icons on HOME
margin-left: 1.5rem;
}
}
}
.pagination {
font-size: 1rem;
a:hover {
text-decoration: none;
}
}
.post-preview {
padding-top: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--main-border-color);
h1 {
font-size: 1.4rem;
margin: 0;
}
i.far { /* fontawesome icons */
font-size: 86%;
}
.post-meta {
i:not(:first-child) { // post-meta icons on the homepage
margin-left: 1.5rem;
}
}
.post-content {
margin-top: .6rem;
margin-bottom: .6rem;
color: var(--post-list-text-color);
>p { /* Make preview shorter in Home page*/
>p {
/* Make preview shorter on the homepage */
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
@ -49,9 +46,19 @@
-webkit-box-orient: vertical;
}
}
.pinned {
transform: rotate(45deg);
}
} // .post-preview
} // #post-list
.pagination {
font-size: 1rem;
a:hover {
text-decoration: none;
}
.page-item {
@ -93,11 +100,11 @@
border-radius: 50%;
}
&:not(:last-child) {
margin-right: 0.6rem;
margin-right: 0.7rem;
}
} // .page-item
} // .pagination
@media all and (max-width: 576px) {
#post-list .post-meta>span i:not(:first-child) {
@ -121,14 +128,14 @@
.pagination {
font-size: .85rem;
}
.page-item .page-link {
width: 2.2rem;
height: 2.2rem;
}
}
}
/* Pannel hidden */
@media all and (max-width: 1200px) {
#post-list {