fix: fix article regresssion (#250)

* refactor: output article element when needed

* refactor: refactor container styles and media queries

- Add the `$tablet` variable to `_container.scss`
- Add a media query to `_container.scss`
- Import `_container.scss` in `critical.scss`
- Remove the import of `_container.scss` in `style.scss`
This commit is contained in:
Spedon
2024-01-22 20:35:15 +08:00
committed by GitHub
parent 1a3fade5fc
commit 49e9f904e2
4 changed files with 25 additions and 19 deletions

View File

@@ -1,3 +1,6 @@
$tablet: map-get($breakpoints, 'tablet') - 1;
@media (max-width: $tablet), (hover: none) {
.container { .container {
position: fixed; position: fixed;
top: 0; top: 0;
@@ -17,3 +20,4 @@
.disableScroll { .disableScroll {
pointer-events: none; pointer-events: none;
} }
}

View File

@@ -9,3 +9,4 @@
@import '_partial/nav'; @import '_partial/nav';
@import '_partial/article'; @import '_partial/article';
@import '_partial/container';

View File

@@ -6,6 +6,5 @@
@import '_partial/collection'; @import '_partial/collection';
@import '_partial/gallery'; @import '_partial/gallery';
@import '_partial/container';
@import 'node_modules/swiper/swiper.scss'; @import 'node_modules/swiper/swiper.scss';

View File

@@ -7,8 +7,10 @@
</script> </script>
<div class="container"> <div class="container">
{{- partial "nav.html" . -}} {{- partial "nav.html" . -}}
{{- with .Content -}}
<article class="info"> <article class="info">
{{ .Content }} {{- . -}}
</article> </article>
{{- end -}}
</div> </div>
{{- end -}} {{- end -}}