LoveIt/assets/css/_page/_post.scss

501 lines
8.1 KiB
SCSS
Raw Normal View History

2019-08-11 19:36:19 +02:00
/** Post **/
2019-08-18 19:36:52 +02:00
.post-header {
.post-title {
margin: 0 !important;
font-size: 2em;
line-height: 1.5em;
}
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.post-meta {
font-size: 14px;
color: rgba(85, 85, 85, 0.52941) !important;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
span {
display: inline-block;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
.dark-theme & {
color: $global-font-secondary-color-dark !important;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
a {
color: $post-link-color;
2019-08-11 19:36:19 +02:00
.dark-theme & {
2019-08-18 19:36:52 +02:00
color: $post-link-color-dark;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
&:hover {
color: $post-link-hover-color;
2019-08-11 19:36:19 +02:00
.dark-theme & {
2019-08-18 19:36:52 +02:00
color: $post-link-hover-color-dark;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
}
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.author {
font-size: 1.2em;
}
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.post-toc {
position: absolute;
width: 240px;
max-width: 300px;
2019-08-18 19:36:52 +02:00
margin-left: 800px;
padding: 10px;
border-left: 1px solid $global-border-color;
word-wrap: break-word;
box-sizing: border-box;
top: 120px;
.post-toc-title {
font-weight: 400;
text-transform: uppercase;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
.post-toc-content {
&.always-active ul {
display: block;
}
2019-08-18 19:36:52 +02:00
>nav>ul {
margin: 10px 0;
}
2019-08-18 19:36:52 +02:00
ul {
padding-left: 10px;
list-style: none;
ul {
2019-08-18 19:36:52 +02:00
padding-left: 20px;
display: none;
}
2019-08-18 19:36:52 +02:00
.has-active > ul {
display: block;
}
}
2019-08-18 19:36:52 +02:00
.toc-link.active {
color: $global-link-hover-color;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
}
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.featured_image {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
overflow: hidden;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.post-content {
h2,
h3,
h4,
h5,
h6 {
padding-top: .8em;
padding-bottom: .3em;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
h2::before {
content: "#";
margin-right: 5px;
color: $post-link-color;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.dark-theme & {
color: $post-link-color-dark;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
h3::before {
content: "|";
margin-right: 5px;
color: $post-link-color;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.dark-theme & {
color: $post-link-color-dark;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
a {
color: $post-link-color;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.dark-theme & {
color: $post-link-color-dark;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
a:hover {
color: $post-link-hover-color;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.dark-theme &:hover {
color: $post-link-hover-color-dark;
font-weight: bold;
}
}
2019-08-18 19:36:52 +02:00
ul {
padding-left: 2em;
}
2019-08-19 07:26:39 +02:00
ruby {
background: $code-background;
rt {
color: $global-font-secondary-color;
}
.dark-theme & {
background: $code-background-dark;
rt {
color: $global-font-secondary-color-dark;
}
}
}
2019-08-18 19:36:52 +02:00
.table-wrapper {
overflow-x: auto;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
> table {
width: 100%;
max-width: 100%;
margin: 10px 0;
border-spacing: 0;
box-shadow: 2px 2px 3px rgba(0,0,0,.125);
background: $table-background-color;
2019-08-18 19:36:52 +02:00
.dark-theme & {
background: $table-background-color-dark;
}
2019-08-18 19:36:52 +02:00
thead {
background: $table-thead-color;
2019-08-18 19:36:52 +02:00
.dark-theme & {
background-color: $table-thead-color-dark;
}
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
th, td {
padding: 5px 15px;
border: 1px double $global-border-color;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.dark-theme & {
border: 1px double $global-border-color-dark;
}
}
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
figure {
text-align: center;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.image-caption:not(:empty) {
min-width: 20%;
max-width: 80%;
display: inline-block;
padding: 10px;
margin: 0 auto;
border-bottom: 1px solid #d9d9d9;
font-size: 14px;
color: #969696;
line-height: 1.7;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
img {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
overflow: hidden;
}
2019-08-18 19:36:52 +02:00
blockquote {
font-size: 1rem;
display: block;
border-width: 1px 0;
border-style: solid;
border-color: $global-border-color;
padding: 1.5em 1.2em 0.5em 1.2em;
margin: 0 0 2em 0;
position: relative;
&:before {
content: '\201C';
position: absolute;
top: 0em;
left: 50%;
transform: translate(-50%, -50%);
width: 3rem;
height: 2rem;
font: 6em/1.08em 'PT Sans', sans-serif;
color: $post-link-color;
text-align: center;
2019-08-18 19:36:52 +02:00
.dark-theme & {
color: $post-link-color-dark;
}
2019-08-18 19:36:52 +02:00
}
2019-08-18 19:36:52 +02:00
&:after {
content: "#blockquote" attr(cite);
display: block;
text-align: right;
font-size: 0.875em;
color: $post-link-color;
.dark-theme & {
2019-08-18 19:36:52 +02:00
color: $post-link-color-dark;
}
}
2019-08-18 19:36:52 +02:00
.dark-theme & {
border-color: $global-border-color-dark;
}
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
@import "../_partial/_post/code";
@import "../_partial/_post/admonition";
2019-08-18 19:36:52 +02:00
.mermaid {
@import "../_mermaid/neutral/index";
2019-08-18 19:36:52 +02:00
.dark-theme & {
@import "../_mermaid/dark/index";
}
2019-08-18 19:36:52 +02:00
}
.echarts {
margin: 3% auto;
text-align: center;
}
.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
2019-08-18 19:36:52 +02:00
iframe {
position: absolute;
width: 100%;
2019-08-18 19:36:52 +02:00
height: 100%;
left: 0;
top: 0;
}
2019-08-18 19:36:52 +02:00
}
2019-08-18 19:36:52 +02:00
hr {
margin: 1rem 0;
position: relative;
border-top: 1px dashed $global-border-color;
border-bottom: none;
2019-08-18 19:36:52 +02:00
.dark-theme & {
border-top: 1px dashed $global-border-color-dark;
}
2019-08-18 19:36:52 +02:00
}
2019-08-18 19:36:52 +02:00
kbd {
display: inline-block;
padding: .25em;
background-color: $global-background-color;
border: 1px solid $global-border-color;
border-bottom-color: $global-border-color;
border-radius: 3px;
-webkit-box-shadow: inset 0 -1px 0 $global-border-color;
box-shadow: inset 0 -1px 0 $global-border-color;
font-size: .8em;
line-height: 1.25;
font-family: $code-font-family;
color: $code-color;
2019-08-18 19:36:52 +02:00
.dark-theme & {
background-color: $global-background-color-dark;
border: 1px solid $global-border-color-dark;
border-bottom-color: $global-border-color-dark;
-webkit-box-shadow: inset 0 -1px 0 $global-border-color-dark;
box-shadow: inset 0 -1px 0 $global-border-color-dark;
color: $code-color-dark;
}
2019-08-18 19:36:52 +02:00
}
2019-08-18 19:36:52 +02:00
.typeit {
.code {
padding: 6px;
font-size: 14px;
font-family: Consolas, Monaco, Menlo, Consolas, monospace;
font-weight: bold;
word-break: break-all;
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.k {
color: #D371E3;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.kt {
color: #D371E3;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.kc {
color: #D371E3;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.o {
color: #D371E3;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.nf {
color: #F16473;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.na {
color: #41B1F5;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.s {
color: #8BC56F;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.n {
color: #DB975C;
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.c1 {
color: #7E848F;
2019-08-11 19:36:19 +02:00
}
}
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
p {
font-size: 1em;
margin: .5em 0 .5em 0;
2019-08-19 07:26:39 +02:00
text-align: justify;
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.post-footer {
2019-08-19 07:26:39 +02:00
margin-top: 3rem;
.post-info {
border-bottom: 1px solid $global-border-color;
padding: 1rem 0 0.3rem;
2019-08-11 19:36:19 +02:00
.dark-theme & {
border-bottom: 1px solid $global-border-color-dark;
2019-08-11 19:36:19 +02:00
}
2019-08-19 07:26:39 +02:00
.post-info-line {
display: flex;
justify-content: space-between;
.post-info-mod {
font-size: 0.8em;
color: $global-font-secondary-color;
.dark-theme & {
color: $global-font-secondary-color-dark;
}
}
.post-info-license {
font-size: 0.8em;
color: $global-font-secondary-color;
.dark-theme & {
color: $global-font-secondary-color-dark;
}
}
.post-info-md
a {
font-size: 0.8em;
color: $post-link-color;
.dark-theme & {
color: $post-link-color-dark;
}
&:hover {
color: $post-link-hover-color;
.dark-theme & {
color: $post-link-hover-color-dark;
}
}
}
}
2019-08-11 19:36:19 +02:00
}
.post-tags {
padding: 0.3rem 0 1rem;
2019-08-11 19:36:19 +02:00
display: flex;
justify-content: space-between;
}
.post-nav {
&:before,
&:after {
content: " ";
display: table;
}
& a.prev,
& a.next {
font-weight: 600;
font-size: 16px;
transition-property: transform;
transition-timing-function: ease-out;
transition-duration: 0.3s;
}
& a.prev {
float: left;
}
& a.prev:hover {
transform: translateX(-4px);
}
& a.next {
float: right;
}
& a.next:hover {
transform: translateX(4px);
}
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
.post-comment {
padding: 3em 0;
}
2019-08-18 19:36:52 +02:00
.align-left {
text-align: left;
}
2019-08-18 19:36:52 +02:00
.align-center {
text-align: center;
}
2019-08-18 19:36:52 +02:00
.align-right {
text-align: right;
}
2019-08-18 19:36:52 +02:00
.float-left {
float: left;
2019-08-11 19:36:19 +02:00
}
2019-08-18 19:36:52 +02:00
.float-right {
float: right;
}