218 lines
No EOL
3.8 KiB
SCSS
218 lines
No EOL
3.8 KiB
SCSS
---
|
|
---
|
|
/*!
|
|
Individual styles for Post
|
|
© 2019 Cotes Chung
|
|
MIT License
|
|
*/
|
|
|
|
.post img {
|
|
margin-top: .5rem;
|
|
margin-bottom: 1.5rem;
|
|
max-width: 100%;
|
|
height: auto;
|
|
filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.08));
|
|
}
|
|
|
|
.post-tail {
|
|
margin-top: 3.5rem;
|
|
border-bottom: 1px double #e9ecef;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.post-pager {
|
|
margin: 1rem 0 2rem;
|
|
}
|
|
|
|
.post-pager .btn,
|
|
.post-pager .btn.disabled {
|
|
color: #2a408e;
|
|
border-color: #2a408e;
|
|
}
|
|
|
|
.post-pager .btn:hover {
|
|
background: #2a408e;
|
|
color: #fff;
|
|
}
|
|
|
|
.post-pager a.btn.disabled {
|
|
pointer-events: auto;
|
|
cursor: not-allowed;
|
|
background: none;
|
|
color: gray;
|
|
border-color: gray;
|
|
}
|
|
|
|
@keyframes fade-up {
|
|
from {
|
|
opacity: 0;
|
|
position: relative;
|
|
top: 2rem;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
position: relative;
|
|
top: 0;
|
|
}
|
|
}
|
|
|
|
#toc-wrapper {
|
|
border-left: 1px solid rgba(158, 158, 158, 0.17);
|
|
position: -webkit-sticky;
|
|
position: sticky;
|
|
top: 2rem;
|
|
transition: top 0.2s ease-in-out;
|
|
animation: fade-up .8s;
|
|
}
|
|
|
|
#toc-wrapper.topbar-down {
|
|
top: 6rem;
|
|
}
|
|
|
|
#toc-wrapper>h3 {
|
|
font-size: 1rem;
|
|
font-family: 'Oswald', sans-serif;
|
|
color: gray;
|
|
}
|
|
|
|
#toc li>a {
|
|
padding-top: 0;
|
|
}
|
|
|
|
|
|
/*--- Related Posts ---*/
|
|
|
|
#related-posts {
|
|
border-bottom: 1px double #e9ecef;
|
|
}
|
|
|
|
#related-posts>h3 {
|
|
color: gray;
|
|
font-size: 1.1rem;
|
|
font-family: 'Oswald', sans-serif;
|
|
}
|
|
|
|
#related-posts .card {
|
|
border: 1px solid #f1f1f1;
|
|
box-shadow: 0 0 5px 0 rgba(234, 234, 234, 0.7686274509803922);
|
|
-webkit-transition: all .3s ease-in-out;;
|
|
-moz-transition: all .3s ease-in-out;;
|
|
transition: all .3s ease-in-out;
|
|
}
|
|
|
|
#related-posts .card:hover {
|
|
-webkit-transform: translate3d(0, -3px, 0);
|
|
transform: translate3d(0, -3px, 0);
|
|
filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.08));
|
|
}
|
|
|
|
#related-posts .card h3 {
|
|
color: #353a3d;
|
|
}
|
|
|
|
#related-posts .timeago {
|
|
color: rgba(30,55,70,.4);
|
|
}
|
|
|
|
#related-posts p {
|
|
font-size: .9rem;
|
|
margin-bottom: .5rem;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
#related-posts a:hover {
|
|
text-decoration: none;
|
|
}
|
|
|
|
#related-posts ul {
|
|
list-style-type: none;
|
|
padding-inline-start: 1.5rem;
|
|
}
|
|
|
|
#related-posts ul>li::before {
|
|
background: #c2c9d4;
|
|
width: 5px;
|
|
height: 5px;
|
|
border-radius: 1px;
|
|
display: block;
|
|
content: "";
|
|
position: relative;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
}
|
|
|
|
#post-extend-wrapper {
|
|
min-height: 2rem;
|
|
}
|
|
|
|
|
|
@media all and (max-width: 768px) {
|
|
.post img {
|
|
max-width: calc(100% + 1rem);
|
|
}
|
|
}
|
|
|
|
@media all and (min-width: 768px) {
|
|
.post .post-meta>div:not(:first-child)::before {
|
|
content: "\2022";
|
|
color: rgba(158, 158, 158, 0.8);
|
|
font-weight: bold;
|
|
padding-left: .5rem;
|
|
padding-right: .3rem;
|
|
}
|
|
|
|
.post .post-meta.flex-column {
|
|
-webkit-box-orient: horizontal!important;
|
|
-webkit-box-direction: normal!important;
|
|
-ms-flex-direction: row!important;
|
|
flex-direction: row!important;
|
|
}
|
|
}
|
|
|
|
@media all and (min-width: 768px) and (max-width: 830px) {
|
|
.post img {
|
|
max-width: calc(100% + 2rem);
|
|
}
|
|
}
|
|
|
|
/* Hide SideBar and TOC */
|
|
@media all and (max-width: 830px) {
|
|
.post img {
|
|
position: relative;
|
|
left: 50%;
|
|
-webkit-transform: translateX(-50%);
|
|
-ms-transform: translateX(-50%);
|
|
transform: translateX(-50%);
|
|
}
|
|
}
|
|
|
|
/*
|
|
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);
|
|
}
|
|
} |