Adjust main container and article grid layout

This commit is contained in:
Helen Chong 2024-04-15 00:13:57 +08:00
parent 7cb4ea6baa
commit f0971e2971
2 changed files with 39 additions and 52 deletions

View File

@ -17,6 +17,7 @@ eleventyComputed:
</div>
</header>
<div class="article__wrapper">
{% if toc %}
{% include "toc.njk" %}
{% endif %}
@ -24,8 +25,4 @@ eleventyComputed:
<article>
{{ content | safe }}
</article>
<aside class="right-sidebar">
<h3>Title</h3>
<p>Right sidebar content</p>
</aside>
</div>

View File

@ -247,11 +247,8 @@ dd {
}
/* MAIN CONTENT */
main {
width: 100%;
}
main {
main,
.article__wrapper {
font-size: 1.2rem;
display: grid;
gap: 0.8rem;
@ -282,39 +279,44 @@ article,
.left-sidebar,
.right-sidebar {
font-size: 0.9rem;
background-color: var(--clr-content-bg);
}
.left-sidebar:empty,
.right-sidebar:empty {
display: none;
}
/* Tablet main content layout */
@media only screen and (min-width: 43.75rem) {
/* main {
width: 43.75rem;
} */
}
/* Desktop main content layout */
@media only screen and (min-width: 60rem) {
/* main {
width: 60rem;
grid-template-areas:
'mheadr mheadr mheadr mheadr'
'leftsb articl articl rightb';
} */
.article__wrapper {
grid-template-areas: 'a b c';
grid-template-columns: minmax(0,15rem) minmax(0,2.5fr) minmax(0,15rem);
}
article {
grid-area: b;
}
.left-sidebar {
grid-area: a;
}
.right-sidebar {
grid-area: c;
}
}
@media only screen and (min-width: 80rem) {
/* main {
width: 75rem;
main {
max-width: 80rem;
}
}
aside {
width: 15rem;
} */
/* FOOTER COMPONENT */
.main-footer {
background: var(--clr-main-footer-bg);
width: 100%;
padding: 0.8rem;
text-align: center;
}
.main-footer p {
padding: 0;
}
/* HEADING WRAPPER AND ANCHOR */
@ -668,15 +670,3 @@ article,
#5bcefa 0 100%
);
}
/* FOOTER COMPONENT */
.main-footer {
background: var(--clr-main-footer-bg);
width: 100%;
padding: 0.5rem;
text-align: center;
}
.main-footer p {
padding: 0;
}