You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
298 lines
5.2 KiB
298 lines
5.2 KiB
/** |
|
* Layout styles |
|
* This file contains the layout styles for the application |
|
* Layout has 5 main parts: |
|
* - Header (header) |
|
* - Left menu (nav) |
|
* - Main content (main) |
|
* - Right sidebar (aside) |
|
* - Footer (footer) |
|
**/ |
|
|
|
body { |
|
position: relative; |
|
} |
|
|
|
/* Layout Container */ |
|
.layout { |
|
max-width: 100%; |
|
width: 100%; |
|
margin: 0 auto; |
|
flex-grow: 1; |
|
display: grid; |
|
grid-template-columns: 240px auto 350px; |
|
} |
|
|
|
nav, aside { |
|
position: sticky; |
|
top: 80px; |
|
max-height: calc(100vh - 80px); |
|
overflow: auto; |
|
} |
|
|
|
nav { |
|
padding: var(--spacing-3); |
|
overflow-y: auto; /* Ensure the menu is scrollable if content is too long */ |
|
} |
|
|
|
header { |
|
position: fixed; |
|
width: 100%; |
|
min-height: 60px; |
|
top: 0; |
|
left: 0; |
|
} |
|
|
|
nav ul { |
|
list-style-type: none; |
|
padding: 0; |
|
} |
|
|
|
nav li { |
|
margin: var(--spacing-2) 0; |
|
} |
|
|
|
nav a { |
|
color: var(--color-primary); |
|
text-decoration: none; |
|
} |
|
|
|
nav a:hover { |
|
color: var(--color-text-mid); |
|
text-decoration: none; |
|
} |
|
|
|
#progress-bar { |
|
position: absolute; |
|
left: 0; |
|
bottom: 0; |
|
height: 4px; |
|
width: 0; |
|
background: var(--color-primary); |
|
transition: width 0.4s ease; |
|
z-index: 1000; |
|
} |
|
|
|
/* Main content */ |
|
main { |
|
display: flex; |
|
flex-direction: column; |
|
margin-top: 90px; |
|
flex-grow: 1; |
|
padding: 0 var(--spacing-3); |
|
word-break: break-word; |
|
} |
|
|
|
main.static { |
|
margin-left: auto; |
|
margin-right: auto; |
|
max-width: 960px; |
|
} |
|
|
|
.w-container { |
|
max-width: 960px; |
|
margin-left: auto; |
|
margin-right: auto; |
|
width: 100%; |
|
display: flex; |
|
flex-direction: column; |
|
gap: var(--spacing-3); |
|
} |
|
|
|
.user-menu { |
|
position: fixed; |
|
top: 100px; |
|
min-width: 150px; |
|
max-width: 270px; |
|
} |
|
|
|
.user-nav { |
|
padding: 10px; |
|
margin: 10px 0; |
|
} |
|
|
|
/* Right sidebar */ |
|
aside { |
|
display: flex; |
|
flex-direction: column; |
|
margin-top: 80px; |
|
padding: 0 1em; |
|
} |
|
|
|
table { |
|
width: 100%; |
|
margin: 20px 0; |
|
} |
|
|
|
pre, code { |
|
text-wrap: wrap; |
|
padding: 3px; |
|
background-color: var(--color-bg-light); |
|
font-size: 1rem; |
|
} |
|
|
|
hr { |
|
margin: 20px 0; |
|
} |
|
|
|
dt { |
|
margin-top: 10px; |
|
} |
|
|
|
.mobile-toggles { |
|
display: none; |
|
} |
|
|
|
nav header, |
|
aside header { |
|
display: none; |
|
} |
|
|
|
/* Responsive adjustments */ |
|
@media (max-width: 1200px) { |
|
.layout { |
|
grid-template-columns: 240px auto; |
|
} |
|
aside { |
|
display: none; /* Hide the sidebars on small screens */ |
|
} |
|
} |
|
|
|
/* Responsive adjustments */ |
|
@media (max-width: 768px) { |
|
.layout { |
|
grid-template-columns: auto; |
|
} |
|
|
|
main { |
|
margin-top: 60px; |
|
padding: 0; |
|
} |
|
|
|
article { |
|
padding: 0 var(--spacing-3); |
|
} |
|
|
|
nav header, |
|
aside header { |
|
display: block; |
|
} |
|
|
|
nav, aside { |
|
display: none; /* Hide the sidebars on small screens */ |
|
} |
|
|
|
.mobile-toggles { |
|
display: flex; |
|
z-index: 1050; |
|
padding: .5rem 0; |
|
margin: 0 var(--spacing-2); |
|
} |
|
|
|
.mobile-toggles .toggle { |
|
background: var(--color-primary); |
|
color: var(--color-text-contrast); |
|
border: none; |
|
padding: .4rem .75rem; |
|
cursor: pointer; |
|
font: inherit; |
|
} |
|
|
|
nav.is-open, aside.is-open { |
|
display: block; |
|
position: fixed; |
|
top: 0; |
|
bottom: 0; |
|
width: 80%; |
|
max-width: 260px; |
|
background: var(--color-bg); |
|
box-shadow: 0 0 12px rgba(0,0,0,.4); |
|
overflow-y: auto; |
|
z-index: 1200; |
|
padding: 90px 1em 1em; /* space for global header height */ |
|
animation: slideIn .25s ease; |
|
} |
|
|
|
nav.is-open { left: 0; } |
|
aside.is-open { right: 0; } |
|
|
|
body.no-scroll { overflow: hidden; } |
|
|
|
nav.is-open > header, aside.is-open > header { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
right: 0; |
|
display: flex; |
|
justify-content: flex-end; |
|
padding: .5rem; |
|
background: var(--color-bg); |
|
border-bottom: 1px solid var(--color-border); |
|
} |
|
|
|
nav.is-open button.close, aside.is-open button.close { |
|
background: transparent; |
|
border: none; |
|
font-size: 1.2rem; |
|
cursor: pointer; |
|
color: var(--color-text); |
|
} |
|
|
|
@keyframes slideIn { |
|
from { transform: translateX(-15px); opacity: 0; } |
|
to { transform: translateX(0); opacity: 1; } |
|
} |
|
} |
|
|
|
/* Footer */ |
|
footer { |
|
background-color: #333; |
|
color: white; |
|
text-align: center; |
|
padding: var(--spacing-3) 0; |
|
position: relative; |
|
width: 100%; |
|
} |
|
|
|
footer .footer-links { |
|
margin: var(--spacing-4) 0; |
|
} |
|
|
|
footer a { |
|
color: var(--color-accent, #8FCB7E); |
|
text-decoration: none; |
|
transition: color 0.2s ease; |
|
} |
|
|
|
footer a:hover { |
|
color: white; |
|
text-decoration: underline; |
|
} |
|
|
|
footer p { |
|
margin: var(--spacing-2) 0; |
|
color: rgba(255, 255, 255, 0.8); |
|
} |
|
|
|
nav > header, aside > header { /* prevent global header fixed rules applying to nested headers */ |
|
position: static; |
|
width: auto; |
|
} |
|
|
|
p.measure { |
|
max-width: 65ch; |
|
margin: 1em auto; |
|
} |
|
|
|
section{ position: relative; padding: var(--section-spacing) var(--spacing-3); } |
|
|
|
.katex-display>.katex { |
|
line-height: 2; |
|
white-space: normal !important; |
|
} |
|
|
|
.stat-label { |
|
font-size: 0.9rem; |
|
color: var(--color-text-mid); |
|
font-weight: bold; |
|
}
|
|
|