478 lines
9.1 KiB
SCSS
478 lines
9.1 KiB
SCSS
.single {
|
|
padding: 1rem;
|
|
position: relative;
|
|
width: 100%;
|
|
|
|
&__title {
|
|
font-size: 2.5rem;
|
|
font-weight: 900;
|
|
font-family: $title-font;
|
|
line-height: 3rem;
|
|
overflow-wrap: break-word;
|
|
|
|
//@include animation('slide-in-down .3s .1s 1 ease both');
|
|
@include themify($themes) {
|
|
color: themed("single-header-title-color");
|
|
}
|
|
}
|
|
|
|
&__meta {
|
|
font-size: 0.8rem;
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
//@include animation('slide-in-down .3s .4s 1 ease both');
|
|
|
|
@include respond-to(sm) {
|
|
@include flexbox();
|
|
@include flex-direction(column);
|
|
@include align-items(flex-start);
|
|
}
|
|
@include themify($themes) {
|
|
color: themed('meta-color');
|
|
}
|
|
}
|
|
|
|
&__contents {
|
|
//@include animation('slide-in-down-3 .3s .7s 1 ease both');
|
|
&--gallery {
|
|
overflow: hidden;
|
|
//@include animation('slide-in-down-3 .6s .0s 1 ease both');
|
|
}
|
|
|
|
&--about {
|
|
//@include animation('slide-in-down-3 .6s .2s 1 ease both');
|
|
}
|
|
|
|
&>p>a {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
font-size: 1rem;
|
|
font-family: $content-font;
|
|
margin: 1rem 0;
|
|
line-height: 1.7rem;
|
|
width: inheirt;
|
|
max-width: inherit;
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
position: relative;
|
|
@include themify($themes) {
|
|
color: themed("single-contents-title-color");
|
|
}
|
|
line-height: 1.25;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2.6rem;
|
|
margin: 3.5rem 0 1.75rem 0;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 2.2rem;
|
|
margin: 3.2rem 0 1.5rem 0;
|
|
padding: 0;
|
|
color: inherit;
|
|
font-weight: 900;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.8rem;
|
|
margin: 2.8rem 0 1.25rem 0;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.5rem;
|
|
margin: 2.4rem 0 1rem 0;
|
|
}
|
|
|
|
h5 {
|
|
font-size: 1.2rem;
|
|
margin: 2rem 0 0.8rem 0;
|
|
}
|
|
|
|
h6 {
|
|
font-size: 1rem;
|
|
margin: 1.5rem 0 0.5rem 0;
|
|
}
|
|
|
|
pre {
|
|
padding: 34px 12px 8px;
|
|
position: relative;
|
|
overflow: auto;
|
|
border-radius: 0.34rem;
|
|
position: relative;
|
|
|
|
&::after {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
//padding: 50px 7px;
|
|
font-size: $code-font-size;
|
|
font-family: $title-font;
|
|
font-weight: bold;
|
|
content: attr(data-lang);
|
|
|
|
@include themify($themes) {
|
|
color: themed('content-pre-header-color');
|
|
background: themed('content-pre-header-background-color');
|
|
}
|
|
}
|
|
}
|
|
|
|
code + .copy-to-clipboard {
|
|
position: absolute;
|
|
right: 4px;
|
|
top: 5px;
|
|
border-radius: 2px;
|
|
z-index: 1;
|
|
@include transition(all, 0.2s, ease);
|
|
}
|
|
|
|
.copy-to-clipboard {
|
|
@include clippy();
|
|
background-position: 50% 50%;
|
|
background-size: 16px 16px;
|
|
background-repeat: no-repeat;
|
|
width: 27px;
|
|
height: 1.45rem;
|
|
top: -1px;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
position: relative;
|
|
margin-left: -0.2rem;
|
|
cursor: pointer;
|
|
border-radius: 0 2px 2px 0;
|
|
margin-bottom: 1px;
|
|
@include transition(all, 0.2s, ease);
|
|
}
|
|
.copy-to-clipboard:hover {
|
|
@include translateY(-0.1rem);
|
|
}
|
|
.chroma .copy-to-clipboard {
|
|
position: absolute;
|
|
right: 4px;
|
|
top: 5px;
|
|
border-radius: 2px;
|
|
z-index: 1;
|
|
@include transition(all, 0.2s, ease);
|
|
}
|
|
.chroma .copy-to-clipboard:hover {
|
|
@include translateY(-0.1rem);
|
|
}
|
|
|
|
blockquote {
|
|
margin: 0 1.75rem 1.75rem 1.5rem;
|
|
padding: 0 0 0 1.42188rem;
|
|
font-size: 1.05rem;
|
|
line-height: 1.75rem;
|
|
color: inherit;
|
|
opacity: 0.8;
|
|
position: relative;
|
|
|
|
@include themify($themes) {
|
|
border-left: 0.32813rem solid themed("single-blockquote-border-color");
|
|
}
|
|
|
|
code {
|
|
margin: 0 0.25rem;
|
|
}
|
|
}
|
|
|
|
img {
|
|
display: block;
|
|
border-radius: 0.25rem;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
p {
|
|
margin: 0 0 1.75rem 0;
|
|
padding: 0;
|
|
|
|
code {
|
|
margin: 0 0.25rem;
|
|
}
|
|
}
|
|
|
|
ul {
|
|
margin-right: 0;
|
|
margin-top: 0;
|
|
padding: 0;
|
|
list-style: disc outside none;
|
|
}
|
|
|
|
li {
|
|
margin-left: 2rem;
|
|
margin-bottom: calc(1rem / 2);
|
|
|
|
code {
|
|
margin: 0 0.25rem;
|
|
}
|
|
}
|
|
|
|
hr {
|
|
margin: 0 0 calc(1.25rem - 1px) 0;
|
|
padding: 0;
|
|
border: none;
|
|
height: 1px;
|
|
@include themify($themes) {
|
|
background: themed("single-hr-background-color");
|
|
}
|
|
}
|
|
|
|
dl dt::after {
|
|
content: ':';
|
|
}
|
|
|
|
dd {
|
|
display: block;
|
|
margin-inline-start: 40px;
|
|
}
|
|
|
|
.anchor {
|
|
cursor: pointer;
|
|
}
|
|
|
|
a.footnote-ref {
|
|
font-size: 0.75rem;
|
|
font-weight: bold;
|
|
margin-left: 3px;
|
|
|
|
&::before {
|
|
content: "[";
|
|
}
|
|
|
|
&::after {
|
|
content: "]";
|
|
}
|
|
}
|
|
|
|
.table-wrapper {
|
|
overflow-x: auto;
|
|
|
|
> table {
|
|
max-width: 100%;
|
|
margin: 10px 0;
|
|
border-spacing: 0;
|
|
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.125);
|
|
|
|
|
|
@include themify($themes) {
|
|
thead {
|
|
background: themed('content-pre-header-background-color');
|
|
}
|
|
|
|
th {
|
|
color: themed('content-pre-header-color');
|
|
}
|
|
|
|
th, td {
|
|
padding: 5px 15px;
|
|
font-size: 0.9rem;
|
|
border: 1px double themed('content-pre-border-background-color');
|
|
}
|
|
|
|
tr:hover {
|
|
background-color: themed('content-pre-header-background-color');
|
|
}
|
|
}
|
|
}
|
|
|
|
code {
|
|
margin: 0 0.25rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
&__tags {
|
|
margin: 0 0.5rem;
|
|
list-style-type: none;
|
|
@include flexbox();
|
|
@include align-items(center);
|
|
@include flex-wrap(wrap);
|
|
|
|
@include respond-to(sm) {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
&__tag {
|
|
padding: 0 0.25rem;
|
|
}
|
|
}
|
|
|
|
code, pre {
|
|
padding: .5rem 0;
|
|
line-height: 1.5em;
|
|
font-size: $code-font-size;
|
|
font-family: $code-font-stack;
|
|
position: relative;
|
|
|
|
@include themify($themes) {
|
|
background: themed('content-pre-background-color');
|
|
}
|
|
|
|
a {
|
|
text-decoration: none !important;
|
|
}
|
|
}
|
|
|
|
code {
|
|
padding: 3px 5px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
pre:not(.chroma) {
|
|
overflow: auto;
|
|
}
|
|
|
|
.single__contents > .language-code {
|
|
overflow: auto;
|
|
position: relative;
|
|
margin: 1em 0;
|
|
|
|
&::after {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
padding: 2px 7px;
|
|
font-size: $code-font-size;
|
|
font-family: $title-font;
|
|
font-weight: bold;
|
|
border-top-left-radius: 0.25rem;
|
|
border-top-right-radius: 0.25rem;
|
|
content: attr(data-lang);
|
|
|
|
@include themify($themes) {
|
|
color: themed('content-pre-header-color');
|
|
background: themed('content-pre-header-background-color');
|
|
}
|
|
}
|
|
|
|
.copy-to-clipboard {
|
|
position: absolute;
|
|
right: 4px;
|
|
top: 5px;
|
|
border-radius: 2px;
|
|
z-index: 1;
|
|
@include transition(all, 0.2s, ease);
|
|
}
|
|
|
|
.copy-to-clipboard:hover {
|
|
@include translateY(-0.1rem);
|
|
}
|
|
|
|
.chroma .copy-to-clipboard {
|
|
position: absolute;
|
|
right: 4px;
|
|
top: 5px;
|
|
border-radius: 2px;
|
|
z-index: 1;
|
|
@include transition(all, 0.2s, ease);
|
|
}
|
|
|
|
.chroma .copy-to-clipboard:hover {
|
|
@include translateY(-0.1rem);
|
|
}
|
|
}
|
|
|
|
// chroma
|
|
div.chroma {
|
|
overflow: auto;
|
|
}
|
|
|
|
.highlight > .chroma {
|
|
margin: 1em 0;
|
|
border-radius: 5px;
|
|
overflow-x: auto;
|
|
box-shadow: 1px 1px 2px rgba(0,0,0,0.125);
|
|
position: relative;
|
|
@include themify($themes) {
|
|
color: themed('content-pre-color');
|
|
background: themed('content-pre-background-color');
|
|
}
|
|
|
|
code {
|
|
padding: 0;
|
|
}
|
|
|
|
table {
|
|
position: relative;
|
|
|
|
&::after {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
padding: 2px 7px;
|
|
font-size: $code-font-size;
|
|
font-family: $title-font;
|
|
font-weight: bold;
|
|
@include themify($themes) {
|
|
color: themed('content-pre-header-color');
|
|
background: themed('content-pre-header-background-color');
|
|
}
|
|
content: attr(data-lang);
|
|
}
|
|
}
|
|
|
|
.lntd {
|
|
// Fix code block null line height and
|
|
// Synchronous gutter and code line highly.
|
|
line-height: round($code-font-size * 1.5);
|
|
|
|
&:first-child {
|
|
width: 10px;
|
|
|
|
pre {
|
|
margin: 0;
|
|
padding: 34px 4px 6px;
|
|
}
|
|
}
|
|
|
|
&:last-child {
|
|
vertical-align: top;
|
|
position: relative;
|
|
|
|
pre {
|
|
margin: 0;
|
|
padding: 34px 4px 6px;
|
|
&::after {
|
|
content: 'Code';
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
height: 31px;
|
|
padding: 5px 7px;
|
|
font-size: $code-font-size;
|
|
font-family: $title-font;
|
|
font-weight: bold;
|
|
border-top-left-radius: 0.34rem;
|
|
border-top-right-radius: 0.34rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
table, tr, td {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
/* LineNumbersTable */
|
|
.lnt {
|
|
@include themify($themes) {
|
|
color: themed('content-pre-number-color');
|
|
}
|
|
}
|
|
}
|