167 lines
2.6 KiB
CSS
167 lines
2.6 KiB
CSS
.page {
|
|
display: grid;
|
|
min-height: 100vh;
|
|
|
|
grid-template-columns: 1fr minmax(auto, 50rem) 1fr;
|
|
grid-template-columns: 1fr min(92%, 50rem) 1fr;
|
|
grid-template-rows: auto 1fr auto;
|
|
|
|
&.wider { /* used on profile.tmpl, giving more space for it's own 2 column layout */
|
|
grid-template-columns: 1fr minmax(auto, 60rem) 1fr;
|
|
grid-template-columns: 1fr min(92%, 65rem) 1fr;
|
|
}
|
|
}
|
|
|
|
.page-header, .page-footer {
|
|
grid-column: 1 / span 3;
|
|
}
|
|
|
|
.page-header {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
padding: 1.5rem;
|
|
gap: 1rem;
|
|
margin: 0.5rem 0;
|
|
|
|
a {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
|
|
img,
|
|
picture {
|
|
align-self: center;
|
|
|
|
/*
|
|
Shrink too-wide / too-tall instance
|
|
icons to sensible proportions. Allow
|
|
pretty wide images but prevent things
|
|
getting too out of hand + looking bad.
|
|
*/
|
|
max-height: 4rem;
|
|
max-width: 16rem;
|
|
}
|
|
|
|
h1 {
|
|
align-self: center;
|
|
text-align: center;
|
|
|
|
font-size: 1.5rem;
|
|
line-height: 1.5rem;
|
|
word-wrap: anywhere;
|
|
color: $fg;
|
|
}
|
|
}
|
|
|
|
aside {
|
|
margin: 0;
|
|
font-style: italic;
|
|
font-weight: normal;
|
|
text-align: center;
|
|
font-size: 1.2rem;
|
|
|
|
.count {
|
|
font-weight: bold;
|
|
color: $fg-accent;
|
|
}
|
|
}
|
|
}
|
|
|
|
.page-header.large {
|
|
margin: 2rem 0;
|
|
a {
|
|
img, picture {
|
|
max-height: 6rem;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2rem;
|
|
line-height: 2rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
.page-content {
|
|
grid-column: 2;
|
|
align-self: start;
|
|
}
|
|
|
|
.page.with-sidebar .page-content {
|
|
grid-column: 1 / span 2;
|
|
display: grid;
|
|
grid-template-columns: 1fr minmax(auto, 50rem);
|
|
grid-template-columns: 1fr min(92%, 50rem);
|
|
|
|
.sidebar {
|
|
display: inline-block;
|
|
align-self: start;
|
|
justify-self: end;
|
|
position: sticky;
|
|
top: 0;
|
|
padding: 0 1.5rem;
|
|
|
|
ol {
|
|
margin-top: 0;
|
|
}
|
|
|
|
h2 {
|
|
margin-top: 1.5rem;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 80rem) {
|
|
.page.with-sidebar .page-content {
|
|
grid-column: 2;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: $bg-accent;
|
|
box-shadow: $boxshadow;
|
|
border: $boxshadow-border;
|
|
border-radius: $br;
|
|
|
|
.sidebar {
|
|
position: static;
|
|
}
|
|
|
|
main.single-page {
|
|
background: initial;
|
|
box-shadow: initial;
|
|
border: initial;
|
|
border-radius: initial;
|
|
}
|
|
}
|
|
}
|
|
|
|
.page-footer {
|
|
align-self: end;
|
|
margin-top: 3rem;
|
|
|
|
nav ul {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: space-around;
|
|
|
|
/* Override list styling */
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
|
|
li {
|
|
text-align: center;
|
|
padding: 1rem;
|
|
flex-grow: 1;
|
|
|
|
a {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 600px) {
|
|
.page-header {
|
|
text-align: center;
|
|
}
|
|
} |