Prefer HTML over Liquid Templates

While Liquid is powerful, it is completely unreadable for many things, and actively makes documents harder to read. So instead of relying on it for everything, why not just use HTML5 for the page?

The change reduces the parsing overhead for browser by about 30% through reducing the number of useless <div> elements. Additionally the CSS became easier to read as well.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2023-04-03 22:25:08 +02:00
parent d309d1e607
commit 441a8f0655
18 changed files with 151 additions and 104 deletions
+39 -14
View File
@@ -1,19 +1,14 @@
// --------------------------------------------------------------------------------
// Details
// --------------------------------------------------------------------------------
.block-details {
details.block {
margin: 0;
margin-left: -0.75rem;
margin-right: -0.75rem;
padding: 0;
}
.block-details > .content {
margin: 0;
padding: 0.75rem;
}
.block-details > .content > summary {
details.block > summary {
margin-top: -0.75rem;
margin-left: -0.75rem;
margin-right: -0.75rem;
@@ -21,38 +16,68 @@
cursor: pointer;
}
.block-details > .content > summary[data-heading] {
details.block > summary:has(h1),
details.block > summary:has(h2),
details.block > summary:has(h3),
details.block > summary:has(h4),
details.block > summary:has(h5),
details.block > summary:has(h6),
details.block > summary[data-heading] {
width: 100%;
font-variant: small-caps;
font-weight: bold;
padding: 0.5rem 0.75rem;
}
.block-details > .content > summary[data-heading="1"] {
details.block > summary:has(h1),
details.block > summary[data-heading="1"] {
font-size: 2.0rem;
background: $theme-article-heading-h1-background;
}
.block-details > .content > summary[data-heading="2"] {
details.block > summary:has(h2),
details.block > summary[data-heading="2"] {
font-size: 1.8rem;
background: $theme-article-heading-h2-background;
}
.block-details > .content > summary[data-heading="3"] {
details.block > summary:has(h3),
details.block > summary[data-heading="3"] {
font-size: 1.6667rem;
background: $theme-article-heading-h3-background;
}
.block-details > .content > summary[data-heading="4"] {
details.block > summary:has(h4),
details.block > summary[data-heading="4"] {
font-size: 1.45rem;
background: $theme-article-heading-h4-background;
}
.block-details > .content > summary[data-heading="5"] {
details.block > summary:has(h5),
details.block > summary[data-heading="5"] {
font-size: 1.3333rem;
background: $theme-article-heading-h5-background;
}
.block-details > .content > summary[data-heading="6"] {
details.block > summary:has(h6),
details.block > summary[data-heading="6"] {
font-size: 1.2rem;
background: $theme-article-heading-h6-background;
}
details.block > summary > h1,
details.block > summary > h2,
details.block > summary > h3,
details.block > summary > h4,
details.block > summary > h5,
details.block > summary > h6 {
display: inline-block;
margin: 0;
padding: 0;
font-size: inherit;
font-weight: inherit;
font-variant: inherit;
font-style: inherit;
color: inherit;
background-color: transparent;
}