1_general_forum/docs/stylesheets/extra.css

315 lines
7.1 KiB
CSS
Raw Normal View History

/* === GLOBAL RESETS === */
/* Remove all default spacing that causes the white gap */
.md-main__inner {
margin-top: 0 !important;
padding-top: 0 !important;
}
.md-content__inner {
margin-top: 0 !important;
padding-top: 0 !important;
}
/* Add padding back ONLY for non-homepage content */
body:not(.has-hero) .md-content__inner {
padding-top: 8rem !important; /* Adjust based on your header height */
}
/* === 1. HEADER: Fixed transparent to solid === */
.md-header {
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
transition: all 0.3s ease;
}
/* Force transparent background when not scrolled */
.md-header:not(.scrolled) {
background-color: transparent !important;
backdrop-filter: none !important;
box-shadow: none !important;
}
/* Solid background after scroll */
.md-header.scrolled {
background-color: var(--md-primary-fg-color);
box-shadow: var(--md-shadow-z2);
}
/* === 2. HERO BANNER: Full viewport with proper positioning === */
.hero-banner {
/* Full viewport coverage */
width: 100vw;
min-height: 100vh;
margin: 0;
padding: 0;
/* Reset any container constraints */
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
2025-07-29 22:18:13 +00:00
/* DEFAULT (DESKTOP) BACKGROUND */
background:
linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)),
url('../assets/banner3.png') no-repeat center center;
background-size: cover;
2025-07-29 22:18:13 +00:00
background-attachment: fixed;
/* Content centering */
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
/* Initial state for JS animation */
opacity: 0;
transition: opacity 1s ease-in-out;
/* Ensure it's behind header but above page background */
position: relative;
z-index: 1;
/* Content styling */
color: white;
text-align: center;
padding: 2rem;
box-sizing: border-box;
}
/* Hero text styling */
.hero-banner h1,
.hero-banner p {
color: white !important;
text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
margin: 0;
padding: 0.5rem 0;
}
/* === 3. PAGE OFFSET FIX === */
/* Remove white bar at top */
.md-header + .md-container {
padding-top: 0 !important;
}
/* === 4. HEADER COLORS: Amber when transparent, theme colors when solid === */
/* Transparent state - Amber styling */
.md-header:not(.scrolled) .md-header__title,
.md-header:not(.scrolled) .md-header__button,
.md-header:not(.scrolled) .md-nav__link,
.md-header:not(.scrolled) .md-icon,
.md-header:not(.scrolled) .md-search__icon {
color: #ffb300 !important;
fill: #ffb300 !important;
}
/* Search box in transparent state */
.md-header:not(.scrolled) .md-search__form {
background-color: rgba(255, 179, 0, 0.1) !important;
border: 1px solid rgba(255, 179, 0, 0.3) !important;
box-shadow: none !important;
}
.md-header:not(.scrolled) .md-search__input {
background-color: transparent !important;
color: #ffb300 !important;
}
.md-header:not(.scrolled) .md-search__input::placeholder {
color: rgba(255, 179, 0, 0.7) !important;
}
/* Scrolled state - Default theme colors */
.md-header.scrolled .md-header__title,
.md-header.scrolled .md-header__button,
.md-header.scrolled .md-nav__link,
.md-header.scrolled .md-icon,
.md-header.scrolled .md-search__icon {
color: var(--md-primary-bg-color) !important;
fill: var(--md-primary-bg-color) !important;
}
.md-header.scrolled .md-search__form {
background-color: var(--md-default-bg-color--light) !important;
border: none !important;
}
.md-header.scrolled .md-search__input {
background-color: var(--md-default-bg-color--light) !important;
color: var(--md-default-fg-color) !important;
}
/* === 5. SIDEBAR POSITIONING === */
@media screen and (min-width: 76.25em) {
/* Default positioning for hero pages */
body.has-hero .md-sidebar {
top: 0;
height: 100vh;
}
/* Push sidebars down on non-hero pages */
body:not(.has-hero) .md-sidebar {
top: 5rem !important;
height: calc(100vh - 5rem) !important;
}
/* Sidebar fade transition (managed by JS) */
.md-sidebar--primary,
.md-sidebar--secondary {
transition: opacity 0.3s ease;
}
}
/* === 6. CONTENT AFTER HERO === */
/* Ensure content after hero has proper background */
.md-content__inner > *:not(.hero-banner) {
background-color: var(--md-default-bg-color);
position: relative;
z-index: 2;
}
2025-07-16 01:15:58 +00:00
/* === 7. GRID SETTINGS === */
.grid-1 {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
}
.grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
.grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.grid-4 {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
}
.grid-item {
text-align: center;
}
.grid-item img {
max-width: 100%;
height: auto;
transition: transform 0.2s ease;
}
.grid-item img:hover {
transform: scale(1.05);
}
/* === 8. MOBILE ADJUSTMENTS === */
@media screen and (max-width: 76.25em) {
.hero-banner {
min-height: 100vh;
2025-07-29 22:18:13 +00:00
/* MOBILE BACKGROUND - Override the desktop image */
background-image:
linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)),
2025-07-29 22:38:57 +00:00
url('../assets/banner3m2.png');
2025-07-29 22:18:13 +00:00
background-attachment: scroll; /* Disable parallax on mobile for performance */
}
body:not(.has-hero) .md-content__inner {
padding-top: 3.5rem !important; /* Smaller header on mobile */
}
}
/* Force inline admonitions to work on desktop */
@media screen and (min-width: 76.25em) {
.md-typeset .admonition.inline,
.md-typeset details.inline {
float: right;
margin-left: 1rem;
margin-top: 0;
max-width: 20rem;
}
}
/* === 9. HEADER FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Fira+Mono&family=Source+Sans+Pro&display=swap');
/* Apply Montserrat to all headers */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
font-family: 'Montserrat', sans-serif;
font-weight: 600;
letter-spacing: 0.02em;
}
/* Body text uses Source Sans Pro by theme config */
/* Code blocks and inline code */
code, pre {
font-family: 'Fira Mono', monospace;
font-size: 0.9em;
background-color: var(--md-code-bg, #f5f5f5);
border-radius: 4px;
padding: 0.15em 0.3em;
}
/* Optional: code blocks slightly distinct background */
pre {
padding: 1em;
overflow-x: auto;
background-color: #272822;
color: #f8f8f2;
border-radius: 6px;
font-size: 0.9em;
}
/* === 10. CARD, BLOCKQUOTES, STLYES === */
/* Universal quote card styling */
blockquote {
font-family: 'Source Sans Pro', Arial, sans-serif;
font-style: italic;
padding: 1em 1.5em;
margin: 1em 0;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Light mode */
[data-md-color-scheme="default"] blockquote {
background-color: #fff8e1; /* light amber */
border-left: 4px solid #ffd600; /* amber accent */
color: #333;
}
/* Dark mode */
[data-md-color-scheme="slate"] blockquote {
background-color: #424242; /* dark grey background */
border-left: 4px solid #ffd600; /* amber accent still */
color: #fff; /* white text in dark mode */
}