Remove article class

This commit is contained in:
Helen Chong 2024-06-06 19:22:08 +08:00
parent 53b6e27905
commit 81853183a4
2 changed files with 9 additions and 21 deletions

View File

@ -39,15 +39,11 @@
{% include "global/toc.njk" %} {% include "global/toc.njk" %}
{% endif %} {% endif %}
{% if isArticle or isStatement %} {% set contentEl = "article" if isArticle or isStatement else "div" %}
<article class="article">
<{{contentEl}} class="content{{' content--divided' if isContentDivided }}">
{{ content | safe }} {{ content | safe }}
</article> </{{contentEl}}>
{% else %}
<div class="content{{' content--divided' if isContentDivided }}">
{{ content | safe }}
</div>
{% endif %}
{% if {% if
tags and tags.includes("articles") tags and tags.includes("articles")

View File

@ -13,7 +13,6 @@
justify-self: center; justify-self: center;
} }
.article,
.content:not(.content--divided), .content:not(.content--divided),
.content__section { .content__section {
padding: 1.5rem var(--sz-main-padding); padding: 1.5rem var(--sz-main-padding);
@ -25,7 +24,6 @@
display: grid; display: grid;
} }
.article,
.content:not(.content--divided), .content:not(.content--divided),
.content__section { .content__section {
background-color: var(--clr-content-bg); background-color: var(--clr-content-bg);
@ -38,25 +36,20 @@
} }
.content > * + .h2, .content > * + .h2,
.content__section > * + .h2, .content__section > * + .h2 {
.article > * + .h2 {
margin-top: 2em; margin-top: 2em;
} }
.content > * + :not([class]), .content > * + :not([class]),
.content__section > * + :not([class]), .content__section > * + :not([class]) {
.article > * + :not([class]) {
margin-top: var(--sz-paragraph-margin); margin-top: var(--sz-paragraph-margin);
} }
.article ul:not([class]), .article ol:not([class]),
.content ul:not([class]), .content ol:not([class]) { .content ul:not([class]), .content ol:not([class]) {
display: grid; display: grid;
gap: 0.7em; gap: 0.7em;
} }
.article ul ul, .article ol ol,
.article ul ol, .article ol ul,
.content ul ul, .content ol ol, .content ul ul, .content ol ol,
.content ul ol, .content ol ul { .content ul ol, .content ol ul {
margin-top: 0.7em; margin-top: 0.7em;
@ -71,13 +64,12 @@
@media only screen and (min-width: 60rem) { @media only screen and (min-width: 60rem) {
.content__wrapper { .content__wrapper {
padding: 0 var(--sz-main-padding); padding: 0 var(--sz-main-padding);
grid-template-areas: 'leftbar article rightbar'; grid-template-areas: 'leftbar content rightbar';
grid-template-columns: minmax(0, 20%) minmax(0, 2.5fr) minmax(0, 20%); grid-template-columns: minmax(0, 20%) minmax(0, 2.5fr) minmax(0, 20%);
} }
.article,
.content { .content {
grid-area: article; grid-area: content;
} }
.left-sidebar { .left-sidebar {