LoveIt/assets/css/_page/_post.scss

377 lines
6.3 KiB
SCSS
Raw Normal View History

2019-08-11 19:36:19 +02:00
/** Post **/
2019-08-24 13:32:41 +02:00
.post-title {
margin: 0 !important;
font-size: 1.8rem;
2019-08-24 13:32:41 +02:00
line-height: 3rem;
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-meta {
font-size: .88rem;
2020-01-31 11:46:28 +01:00
color: $global-font-secondary-color;
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 & {
2020-01-31 11:46:28 +01:00
color: $global-font-secondary-color-dark;
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
.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.05rem;
2019-08-18 19:36:52 +02:00
}
}
2019-08-11 19:36:19 +02:00
.post-featured-image {
padding-top: .6rem;
2019-08-24 13:32:41 +02:00
img {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
overflow: hidden;
}
}
2020-01-31 15:53:04 +01:00
@import "../_partial/_post/toc";
2019-08-19 21:01:15 +02:00
2019-08-18 19:36:52 +02:00
.post-content {
2019-08-24 17:41:57 +02:00
.post-dummy-target:target {
2019-08-24 18:14:21 +02:00
display: inline-block;
2019-08-21 19:22:33 +02:00
position: relative;
top: -5.6rem;
2019-08-21 19:22:33 +02:00
visibility: hidden;
}
2020-02-03 13:47:49 +01:00
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
.dark-theme & {
font-weight: bolder;
}
}
2019-08-18 19:36:52 +02:00
h2,
h3,
h4,
h5,
h6 {
2019-08-24 17:41:57 +02:00
padding-top: .8rem;
padding-bottom: .3rem;
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2019-08-18 19:36:52 +02:00
h2::before {
content: "#";
2019-08-24 17:41:57 +02:00
margin-right: .3125rem;
2019-08-18 19:36:52 +02:00
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
h3::before,
h4::before,
h5::before,
h6::before {
2019-08-18 19:36:52 +02:00
content: "|";
2019-08-24 17:41:57 +02:00
margin-right: .3125rem;
2019-08-18 19:36:52 +02:00
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-24 13:32:41 +02:00
p {
2019-08-24 17:41:57 +02:00
font-size: 1rem;
margin: .5rem 0 .5rem 0;
2019-08-24 13:32:41 +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 {
2019-08-24 17:41:57 +02:00
padding-left: 2rem;
2019-08-18 19:36:52 +02:00
}
2019-08-19 07:26:39 +02:00
ruby {
2019-08-19 21:01:15 +02:00
background: $code-background-color;
2019-08-19 07:26:39 +02:00
rt {
color: $global-font-secondary-color;
}
.dark-theme & {
2019-08-19 21:01:15 +02:00
background: $code-background-color-dark;
2019-08-19 07:26:39 +02:00
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
&::-webkit-scrollbar {
background-color: $table-background-color;
.dark-theme & {
background-color: $table-background-color-dark;
}
}
2019-08-18 19:36:52 +02:00
> table {
width: 100%;
max-width: 100%;
2019-08-24 17:41:57 +02:00
margin: .625rem 0;
2019-08-18 19:36:52 +02:00
border-spacing: 0;
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 {
2019-08-24 17:41:57 +02:00
padding: .3rem 1rem;
2019-08-18 19:36:52 +02:00
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;
2019-08-24 17:41:57 +02:00
padding: .625rem;
2019-08-18 19:36:52 +02:00
margin: 0 auto;
border-bottom: 1px solid #d9d9d9;
2019-08-24 17:41:57 +02:00
font-size: .875rem;
2019-08-18 19:36:52 +02:00
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;
2020-01-31 11:46:28 +01:00
&::before {
2019-08-18 19:36:52 +02:00
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
}
2020-01-31 11:46:28 +01:00
&::after {
content: '#blockquote' attr(cite);
2019-08-18 19:36:52 +02:00
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
2020-01-31 11:46:28 +01:00
.footnotes {
color: $global-font-secondary-color;
.dark-theme & {
color: $global-font-secondary-color-dark;
}
}
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 {
width: 100%;
margin: 3% auto;
text-align: center;
2019-08-18 19:36:52 +02:00
@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
}
2020-01-29 17:20:09 +01:00
@import "../_aplayer/dark.scss";
2019-08-18 19:36:52 +02:00
.echarts {
2019-08-24 13:32:41 +02:00
width: 100%;
height: 30rem;
2019-08-18 19:36:52 +02:00
margin: 3% auto;
text-align: center;
}
.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
text-align: center;
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;
2019-08-24 17:41:57 +02:00
line-height: 1.25rem;
2019-08-18 19:36:52 +02:00
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 {
2019-08-24 17:41:57 +02:00
padding: .375rem;
font-size: .875rem;
2020-01-31 11:46:28 +01:00
font-family: $code-font-family;
2019-08-18 19:36:52 +02:00
font-weight: bold;
word-break: break-all;
2019-08-11 19:36:19 +02:00
}
}
2019-08-24 13:32:41 +02:00
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
2019-08-18 19:36:52 +02:00
}
2019-08-11 19:36:19 +02:00
2020-01-31 15:53:04 +01:00
@import "../_partial/_post/footer";
2019-08-11 19:36:19 +02:00
2020-01-31 15:53:04 +01:00
@import "../_partial/_post/comment";