d5268a41e0
* refactor(article): add default padding closes https://github.com/CaiJimmy/hugo-theme-stack/issues/165 * fix(article): video iframe margin * fix: remove youtube iframe border
332 lines
7.1 KiB
SCSS
332 lines
7.1 KiB
SCSS
.keep-sidebar {
|
|
@media (min-width: $on-phone) and (max-width: $on-tablet) {
|
|
--main-top-padding: 50px;
|
|
}
|
|
}
|
|
|
|
.article-page {
|
|
&.with-toolbar {
|
|
@media (max-width: $on-tablet) {
|
|
--main-top-padding: 0;
|
|
}
|
|
}
|
|
|
|
&:not(.keep-sidebar) .left-sidebar {
|
|
@media (max-width: $on-tablet) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.article-sidebar {
|
|
position: sticky;
|
|
top: 50px;
|
|
flex-shrink: 0;
|
|
|
|
@media (max-width: $on-tablet) {
|
|
display: none;
|
|
}
|
|
|
|
@media (min-width: $on-tablet) {
|
|
padding-left: 15px;
|
|
margin-left: 1%;
|
|
}
|
|
|
|
@media (min-width: $on-tablet) {
|
|
width: 25%;
|
|
margin-right: 1%;
|
|
}
|
|
|
|
@media (min-width: $on-desktop) {
|
|
width: 30%;
|
|
}
|
|
}
|
|
|
|
.main-article {
|
|
background: var(--card-background);
|
|
border-radius: var(--card-border-radius);
|
|
box-shadow: var(--shadow-l1);
|
|
overflow: hidden;
|
|
|
|
&.main-article {
|
|
margin-bottom: var(--section-separation);
|
|
}
|
|
|
|
.article-header {
|
|
.article-image {
|
|
img {
|
|
height: auto;
|
|
width: 100%;
|
|
max-height: 50vh;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
|
|
.article-details {
|
|
padding: var(--card-padding);
|
|
padding-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.article-content {
|
|
margin: var(--card-padding) 0;
|
|
color: var(--card-text-color-main);
|
|
|
|
img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
.article-footer {
|
|
margin: var(--card-padding);
|
|
margin-top: 0;
|
|
|
|
section:not(:first-child) {
|
|
margin-top: var(--card-padding);
|
|
}
|
|
|
|
section {
|
|
color: var(--card-text-color-tertiary);
|
|
text-transform: uppercase;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 1.4rem;
|
|
|
|
svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 15px;
|
|
stroke-width: 1.33;
|
|
}
|
|
}
|
|
|
|
.article-tags {
|
|
flex-wrap: wrap;
|
|
text-transform: unset;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#article-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
@media (max-width: $on-tablet) {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
@media (min-width: $on-tablet) {
|
|
display: none;
|
|
}
|
|
|
|
.back-home {
|
|
background: var(--card-background);
|
|
border-radius: var(--tag-border-radius);
|
|
color: var(--card-text-color-tertiary);
|
|
margin-right: 30px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
font-size: 1.4rem;
|
|
text-transform: uppercase;
|
|
padding: 10px 20px 10px 15px;
|
|
|
|
transition: box-shadow 0.3s ease;
|
|
|
|
box-shadow: var(--shadow-l1);
|
|
|
|
&:hover {
|
|
box-shadow: var(--shadow-l2);
|
|
}
|
|
|
|
svg {
|
|
margin-right: 5px;
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
span {
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
}
|
|
|
|
.related-contents--wrapper {
|
|
margin-bottom: var(--section-separation);
|
|
}
|
|
|
|
.related-contents {
|
|
overflow-x: auto;
|
|
padding-bottom: 15px;
|
|
|
|
& > .flex {
|
|
float: left;
|
|
}
|
|
|
|
article {
|
|
margin-right: 15px;
|
|
flex-shrink: 0;
|
|
overflow: hidden;
|
|
width: 250px;
|
|
height: 150px;
|
|
|
|
.article-title {
|
|
font-size: 1.8rem;
|
|
margin: 0;
|
|
}
|
|
|
|
&.has-image {
|
|
.article-details {
|
|
padding: 20px;
|
|
background: linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.75) 100%);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.article-content {
|
|
font-family: var(--article-font-family);
|
|
font-size: var(--article-font-size);
|
|
padding: 0 var(--card-padding);
|
|
line-height: var(--article-line-height);
|
|
|
|
& > p {
|
|
margin: 1.5em 0;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin-left: calc((var(--card-padding)) * -1);
|
|
padding-left: calc(var(--card-padding) - var(--heading-border-size));
|
|
border-left: var(--heading-border-size) solid var(--accent-color);
|
|
}
|
|
|
|
figure {
|
|
text-align: center;
|
|
|
|
figcaption {
|
|
font-size: 1.4rem;
|
|
color: var(--card-text-color-secondary);
|
|
}
|
|
}
|
|
|
|
blockquote {
|
|
position: relative;
|
|
margin: 1.5em 0;
|
|
border-left: var(--blockquote-border-size) solid var(--card-separator-color);
|
|
padding: 15px calc(var(--card-padding) - var(--blockquote-border-size));
|
|
background-color: var(--blockquote-background-color);
|
|
}
|
|
|
|
hr {
|
|
width: 100px;
|
|
margin: 40px auto;
|
|
background: var(--card-text-color-tertiary);
|
|
height: 2px;
|
|
border: 0;
|
|
opacity: 0.55;
|
|
}
|
|
|
|
code {
|
|
color: var(--code-text-color);
|
|
background-color: var(--code-background-color);
|
|
padding: 2px 4px;
|
|
border-radius: var(--tag-border-radius);
|
|
font-family: var(--code-font-family);
|
|
}
|
|
|
|
.gallery {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: center;
|
|
margin: 1.5em 0;
|
|
|
|
figure {
|
|
margin: 0;
|
|
|
|
& + figure {
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
}
|
|
|
|
pre {
|
|
overflow-x: auto;
|
|
display: block;
|
|
background-color: var(--pre-background-color);
|
|
color: var(--pre-text-color);
|
|
font-family: var(--code-font-family);
|
|
line-height: 1.428571429;
|
|
word-break: break-all;
|
|
padding: var(--card-padding);
|
|
|
|
code {
|
|
color: unset;
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
margin-bottom: 1.5em;
|
|
font-size: 0.96em;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
text-align: left;
|
|
padding: 4px 8px 4px 10px;
|
|
border: 1px solid var(--table-border-color);
|
|
}
|
|
|
|
td {
|
|
vertical-align: top;
|
|
}
|
|
|
|
tr:nth-child(even) {
|
|
background-color: var(--tr-even-background-color);
|
|
}
|
|
|
|
.twitter-tweet {
|
|
color: var(--card-text-color-main);
|
|
}
|
|
|
|
.video-wrapper {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 0;
|
|
padding-bottom: 56.25%;
|
|
overflow: hidden;
|
|
|
|
& > iframe {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
left: 0;
|
|
top: 0;
|
|
border: 0;
|
|
}
|
|
}
|
|
|
|
/// Negative margins
|
|
blockquote,
|
|
figure,
|
|
.gallery,
|
|
pre,
|
|
.video-wrapper,
|
|
.s_video_simple {
|
|
margin-left: calc((var(--card-padding)) * -1);
|
|
margin-right: calc((var(--card-padding)) * -1);
|
|
width: calc(100% + var(--card-padding) * 2);
|
|
}
|
|
}
|