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.
175 lines
2.5 KiB
175 lines
2.5 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) |
|
**/ |
|
|
|
|
|
|
|
|
|
/* Layout Container */ |
|
.layout { |
|
max-width: 100%; |
|
width: 1200px; |
|
margin: 0 auto; |
|
display: flex; |
|
flex-grow: 1; |
|
} |
|
|
|
nav { |
|
width: 21vw; |
|
min-width: 150px; |
|
max-width: 280px; |
|
flex-shrink: 0; |
|
padding: 1em; |
|
overflow-y: auto; /* Ensure the menu is scrollable if content is too long */ |
|
} |
|
|
|
nav ul { |
|
list-style-type: none; |
|
padding: 0; |
|
} |
|
|
|
nav li { |
|
margin: 0.5em 0; |
|
} |
|
|
|
nav a { |
|
color: var(--color-primary); |
|
text-decoration: none; |
|
} |
|
|
|
nav a:hover { |
|
color: var(--color-text-mid); |
|
text-decoration: none; |
|
} |
|
|
|
header { |
|
position: fixed; |
|
width: 100vw; |
|
top: 0; |
|
left: 0; |
|
} |
|
|
|
/* Hamburger button */ |
|
.hamburger { |
|
cursor: pointer; |
|
display: none; /* Hidden on desktop */ |
|
} |
|
|
|
.header__logo { |
|
display: flex; |
|
width: 100%; |
|
justify-content: center; |
|
} |
|
|
|
/* Mobile Styles */ |
|
@media (max-width: 768px) { |
|
.header__logo { |
|
justify-content: space-around; |
|
} |
|
|
|
.header__categories { |
|
display: none; |
|
flex-direction: column; |
|
padding-top: 1rem; |
|
} |
|
|
|
.header__categories.active { |
|
display: flex; |
|
} |
|
|
|
.hamburger { |
|
display: block; |
|
align-self: center; |
|
} |
|
|
|
.header__categories ul { |
|
flex-direction: column; |
|
gap: 0.5rem; |
|
} |
|
} |
|
|
|
/* Main content */ |
|
main { |
|
margin-top: 140px; |
|
flex-grow: 1; |
|
padding: 1em; |
|
word-break: break-word; |
|
} |
|
|
|
.user-menu { |
|
position: fixed; |
|
top: 150px; |
|
width: calc(21vw - 10px); |
|
min-width: 150px; |
|
max-width: 270px; |
|
} |
|
|
|
.user-nav { |
|
padding: 10px; |
|
margin: 10px 0; |
|
} |
|
|
|
/* Right sidebar */ |
|
aside { |
|
width: 190px; |
|
min-width: 150px; |
|
flex-shrink: 0; |
|
flex-grow: 0; |
|
padding: 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; |
|
} |
|
|
|
/* Responsive adjustments */ |
|
@media (max-width: 768px) { |
|
nav, aside { |
|
display: none; /* Hide the sidebars on small screens */ |
|
} |
|
main { |
|
margin-top: 120px; |
|
width: 100%; |
|
} |
|
} |
|
|
|
/* Footer */ |
|
footer { |
|
background-color: #333; |
|
color: white; |
|
text-align: center; |
|
padding: 1em 0; |
|
position: relative; |
|
width: 100%; |
|
} |
|
|
|
footer .footer-links { |
|
margin: 24px 0; |
|
} |
|
|
|
.search input { |
|
flex-grow: 1; |
|
}
|
|
|