mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
20c0997cc5
- Restructure SCSS pages directory and rename shared to content - Ensure hr overflow visible for awesome-hr icon - Restore position relative on .page for absolute children
85 lines
1.8 KiB
SCSS
85 lines
1.8 KiB
SCSS
@use "core/mixins" as *;
|
|
@use "variables" as *;
|
|
|
|
// Responsive layout
|
|
.wrapper {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
width: 100%;
|
|
|
|
main {
|
|
flex: 1 0 auto;
|
|
|
|
aside {
|
|
flex: 1;
|
|
padding: 0.5rem;
|
|
max-width: 500px;
|
|
|
|
&:first-of-type:not(:has(~ aside)) {
|
|
display: none;
|
|
}
|
|
|
|
@include media('sm', 'down') {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
&.#{$prefix}container {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
padding-inline: 0.5rem;
|
|
|
|
&[data-reverse] {
|
|
flex-direction: row-reverse;
|
|
}
|
|
|
|
&:has(.home:not(.posts)) {
|
|
align-items: center;
|
|
}
|
|
}
|
|
}
|
|
|
|
@include media('md') {
|
|
main {
|
|
// hide empty aside and expand article when only one aside is empty
|
|
aside:first-child:empty:has(~ aside:not(:empty)),
|
|
aside:first-child:not(:empty) ~ aside#toc-auto:empty {
|
|
display: none;
|
|
}
|
|
|
|
aside:first-child:empty:has(~ aside:not(:empty)) ~ article,
|
|
aside:first-child:not(:empty) ~ article:has(~ aside:empty) {
|
|
flex: 3;
|
|
}
|
|
}
|
|
|
|
// when left aside is hidden: expand content and remove left spacer
|
|
&:has(main > aside:first-child:empty ~ aside:not(:empty)) {
|
|
.breadcrumb-container .breadcrumb,
|
|
#comments .comment {
|
|
flex: 3;
|
|
}
|
|
|
|
.breadcrumb-container::before,
|
|
#comments::before {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
// when right aside is hidden: expand content and remove right spacer
|
|
&:has(main > aside:first-child:not(:empty) ~ aside#toc-auto:empty) {
|
|
.breadcrumb-container .breadcrumb,
|
|
#comments .comment {
|
|
flex: 3;
|
|
}
|
|
|
|
.breadcrumb-container::after,
|
|
#comments::after {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|