mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 12:03:31 +08:00
refactor(layout/article.scss): delete unused SCSS and migrate to @include respond
This commit is contained in:
parent
fe038557cc
commit
ebfe496295
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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" . }}
|
||||||
|
|
||||||
|
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user