refactor(layout/article.scss): delete unused SCSS and migrate to @include respond

This commit is contained in:
Jimmy 2021-06-19 23:19:23 +02:00
parent fe038557cc
commit ebfe496295
3 changed files with 8 additions and 45 deletions

View File

@ -1,43 +1,9 @@
.keep-sidebar {
@media (min-width: $on-phone) and (max-width: $on-tablet) {
--main-top-padding: 50px;
}
}
.article-page { .article-page {
&.with-toolbar { &.hide-sidebar-sm .left-sidebar {
@media (max-width: $on-tablet) {
--main-top-padding: 0;
}
}
&:not(.keep-sidebar) .left-sidebar {
@media (max-width: $on-tablet) {
display: none; display: none;
}
}
.article-sidebar { @include respond(md) {
position: sticky; display: inherit;
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%;
} }
} }
@ -111,12 +77,9 @@
#article-toolbar { #article-toolbar {
display: flex; display: flex;
align-items: center; align-items: center;
@media (max-width: $on-tablet) {
margin: 20px 0; margin: 20px 0;
}
@media (min-width: $on-tablet) { @include respond(md) {
display: none; display: none;
} }

View File

@ -1,4 +1,4 @@
{{ define "body-class" }}article-page keep-sidebar{{ end }} {{ define "body-class" }}article-page{{ end }}
{{ define "main" }} {{ define "main" }}
{{ partial "article/article.html" . }} {{ partial "article/article.html" . }}

View File

@ -1,4 +1,4 @@
{{ define "container-class" }}article-page with-toolbar{{ end }} {{ define "container-class" }}article-page with-toolbar hide-sidebar-sm{{ end }}
{{ define "main" }} {{ define "main" }}
<div id="article-toolbar"> <div id="article-toolbar">
<a href="{{ .Site.BaseURL }}" class="back-home"> <a href="{{ .Site.BaseURL }}" class="back-home">