Hugo-theme-stack/assets/scss/partials/layout/article.scss

299 lines
6.3 KiB
SCSS
Raw Normal View History

2020-08-22 07:20:08 -04:00
@import "variables.scss";
.article-page {
.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%;
}
}
article {
background: var(--card-background);
border-radius: var(--card-border-radius);
@include box_shadow(1);
overflow: hidden;
&.main-article {
margin-bottom: var(--section-separation);
2020-08-22 07:20:08 -04:00
}
.article-header {
.article-image {
img {
height: auto;
width: 100%;
max-height: 500px;
width: 100%;
object-fit: cover;
}
}
.article-details {
padding: var(--content-padding);
padding-bottom: 0;
2020-08-22 07:20:08 -04:00
}
}
.article-content {
margin: var(--content-padding) 0;
2020-08-22 07:20:08 -04:00
color: var(--card-text-color-main);
img {
max-width: 100%;
height: auto;
}
}
.article-footer {
padding: var(--content-padding);
2020-08-24 07:28:32 -04:00
padding-top: 0;
2020-08-22 07:20:08 -04:00
.article-copyright {
margin-top: var(--content-padding);
2020-08-22 07:20:08 -04:00
color: var(--card-text-color-tertiary);
text-transform: uppercase;
display: flex;
align-items: center;
svg {
margin-right: 15px;
stroke-width: 1.33;
}
}
}
}
}
#TableOfContents {
background: var(--card-background);
border-radius: var(--card-border-radius);
@include box_shadow(1);
ul {
padding: 0;
margin: 0;
list-style: none;
li {
padding: 15px 30px;
padding-right: 50px;
position: relative;
&:not(:last-of-type) {
border-bottom: 1px solid var(--card-separator-color);
}
a {
color: var(--accent-color);
}
ul {
border-top: 1px solid var(--card-separator-color);
margin-top: 15px;
}
}
}
}
#article-toolbar {
background: var(--card-background);
@include box_shadow(1);
border-radius: var(--card-border-radius);
margin-bottom: 20px;
padding: 15px 20px;
display: flex;
align-items: center;
@media (max-width: $on-phone) {
margin-top: 15px;
}
@media (min-width: $on-tablet) {
display: none;
}
.back-home {
color: var(--card-text-color-secondary);
margin-right: 30px;
display: inline-flex;
align-items: center;
svg {
margin-right: 5px;
}
span {
font-weight: 500;
}
}
}
.related-contents--wrapper {
margin-bottom: var(--section-separation);
2020-08-22 07:20:08 -04:00
.widget-title {
//padding-left: 15px;
}
}
.related-contents {
overflow-x: auto;
//padding: 0 15px;
padding-bottom: 15px;
& > .flex {
float: left;
}
article {
margin-right: 15px;
flex-shrink: 0;
overflow: hidden;
@media (max-width: $on-phone) {
height: 250px;
width: 200px;
}
@media (min-width: $on-phone) {
height: 200px;
width: 300px;
}
.article-title {
font-size: 1.8rem;
}
.article-details {
transition: background-color 0.5s ease;
}
}
}
.article-content {
font-family: var(--article-font-family);
font-size: var(--article-font-size);
line-height: var(--article-line-height);
2020-08-22 07:20:08 -04:00
& > p {
2020-08-22 07:20:08 -04:00
margin: 1.5em 0;
padding: 0 var(--content-padding);
}
h1,
h2,
h3,
h4,
h5,
h6 {
padding: 0 calc(var(--content-padding) - var(--heading-border-size));
border-left: var(--heading-border-size) solid var(--accent-color);
2020-08-22 07:20:08 -04:00
}
figure {
margin: 0 auto;
text-align: center;
figcaption {
font-size: 1.4rem;
color: var(--card-text-color-secondary);
2020-08-22 07:20:08 -04:00
}
}
blockquote {
position: relative;
margin: 10px 0;
border-left: var(--blockquote-border-size) solid var(--card-separator-color);
padding: 0 calc(var(--content-padding) - var(--blockquote-border-size));
}
2020-08-24 07:28:32 -04:00
& > ul {
margin: 0 var(--content-padding);
2020-08-22 07:20:08 -04:00
}
hr {
width: 100px;
margin: 40px 0;
background: var(--card-text-color-tertiary);
height: 4px;
border: 0;
}
code {
color: #808080;
font-size: 0.96em;
background-color: #f9f9f7;
padding: 1px 2px;
border: 1px solid #eee;
border-radius: 3px;
font-family: var(--code-font-family);
2020-08-22 07:20:08 -04:00
word-wrap: break-word;
}
.gallery {
position: relative;
display: flex;
flex-direction: row;
justify-content: center;
margin: 20px 0;
figure {
margin: 0;
2020-08-22 07:20:08 -04:00
& + figure {
margin-left: 10px;
2020-08-22 07:20:08 -04:00
}
}
}
pre {
overflow-x: auto;
display: block;
background-color: var(--pre-background);
color: var(--pre-text-color);
font-family: var(--code-font-family);
2020-08-22 07:20:08 -04:00
line-height: 1.428571429;
word-break: break-all;
padding: var(--content-padding);
2020-08-22 07:20:08 -04:00
code {
color: unset;
border: none;
background: none;
padding: 0;
}
}
2020-08-24 06:07:58 -04:00
a.link {
2020-08-24 07:09:20 -04:00
box-shadow: 0px -2px 0px rgba(var(--link-background-color), var(--link-background-opacity)) inset;
transition: all 0.3s ease;
&:hover {
2020-08-24 07:09:20 -04:00
box-shadow: 0px -10px 0px rgba(var(--link-background-color), var(--link-background-opacity-hover)) inset;
2020-08-22 07:20:08 -04:00
}
}
}