|
1 | | -body { |
2 | | - background-color: #02064e; |
| 1 | +/* ========================================= |
| 2 | + Codio Docs — Home (index) only |
| 3 | + Pure theme background, centered layout |
| 4 | + ========================================= */ |
| 5 | + |
| 6 | +/* Hide sidebars on the homepage and center content */ |
| 7 | +/* Center & unbox the student page just like the home page */ |
| 8 | +.student-page .bd-sidebar-primary, |
| 9 | +.student-page .bd-sidebar-secondary { display: none !important; } |
| 10 | + |
| 11 | +.student-page .bd-content, |
| 12 | +.student-page .bd-article-container { |
| 13 | + max-width: 1200px; |
| 14 | + margin-inline: auto !important; |
| 15 | + padding-inline: 1rem; |
| 16 | + background: transparent !important; |
| 17 | +} |
| 18 | + |
| 19 | +/* Share the same theme tokens */ |
| 20 | +html[data-theme="dark"] .student-page, |
| 21 | +[data-theme="dark"] .student-page { |
| 22 | + --text: #e6eaf2; |
| 23 | + --muted: #9aa3b2; |
| 24 | + --border: rgba(255,255,255,0.14); |
| 25 | + --surface-hover: rgba(255,255,255,0.06); |
| 26 | + --brand: #6ee7ff; |
| 27 | + --brand-strong: #3dd8ff; |
| 28 | + --ring: #9feaff; |
| 29 | + --shadow: 0 10px 26px rgba(3,8,48,0.35); |
| 30 | +} |
| 31 | +html[data-theme="light"] .student-page, |
| 32 | +[data-theme="light"] .student-page { |
| 33 | + --text: #0b1020; |
| 34 | + --muted: #475569; |
| 35 | + --border: rgba(0,0,0,0.12); |
| 36 | + --surface-hover: rgba(2,132,199,0.05); |
| 37 | + --brand: #0ea5e9; |
| 38 | + --brand-strong: #0284c7; |
| 39 | + --ring: #38bdf8; |
| 40 | + --shadow: 0 10px 24px rgba(2,132,199,0.08); |
| 41 | +} |
| 42 | + |
| 43 | +.index-page .bd-sidebar-primary, |
| 44 | +.index-page .bd-sidebar-secondary { display: none !important; } |
| 45 | + |
| 46 | +.index-page .bd-content, |
| 47 | +.index-page .bd-article-container { |
| 48 | + max-width: 100%; |
| 49 | + margin-inline: auto !important; |
| 50 | + padding-inline: 1rem; |
| 51 | +} |
| 52 | + |
| 53 | +/* Make every wrapper transparent so there is NO boxed panel */ |
| 54 | +.index-page, |
| 55 | +.index-page .bd-main, |
| 56 | +.index-page .bd-content, |
| 57 | +.index-page .bd-article-container, |
| 58 | +.index-page .bd-article { |
| 59 | + background: transparent !important; |
3 | 60 | } |
4 | 61 |
|
5 | | -.footer { |
6 | | - border-top: none; |
| 62 | +/* ------- Theme tokens (only for the homepage components) ------- */ |
| 63 | +html[data-theme="dark"] .index-page, |
| 64 | +[data-theme="dark"] .index-page { |
| 65 | + --text: #e6eaf2; |
| 66 | + --muted: #9aa3b2; |
| 67 | + --border: rgba(255,255,255,0.14); |
| 68 | + --surface-hover: rgba(255,255,255,0.06); |
| 69 | + --brand: #6ee7ff; |
| 70 | + --brand-strong: #3dd8ff; |
| 71 | + --ring: #9feaff; |
| 72 | + --shadow: 0 10px 26px rgba(3,8,48,0.35); |
7 | 73 | } |
8 | 74 |
|
9 | | -.container-xl .row { |
10 | | - justify-content: center; |
| 75 | +html[data-theme="light"] .index-page, |
| 76 | +[data-theme="light"] .index-page { |
| 77 | + --text: #0b1020; |
| 78 | + --muted: #475569; |
| 79 | + --border: rgba(0,0,0,0.12); |
| 80 | + --surface-hover: rgba(2,132,199,0.05); |
| 81 | + --brand: #0ea5e9; |
| 82 | + --brand-strong: #0284c7; |
| 83 | + --ring: #38bdf8; |
| 84 | + --shadow: 0 10px 24px rgba(2,132,199,0.08); |
11 | 85 | } |
12 | 86 |
|
13 | | -.container-xl .no-sidebar { |
14 | | - display: none !important; |
| 87 | +/* Fallback to OS pref if the site doesn't set data-theme */ |
| 88 | +@media (prefers-color-scheme: light) { |
| 89 | + html:not([data-theme="dark"]) .index-page { |
| 90 | + --text: #0b1020; |
| 91 | + --muted: #475569; |
| 92 | + --border: rgba(0,0,0,0.12); |
| 93 | + --surface-hover: rgba(2,132,199,0.05); |
| 94 | + --brand: #0ea5e9; |
| 95 | + --brand-strong: #0284c7; |
| 96 | + --ring: #38bdf8; |
| 97 | + --shadow: 0 10px 24px rgba(2,132,199,0.08); |
| 98 | + } |
15 | 99 | } |
16 | 100 |
|
17 | | -.container-xl .d-none { |
18 | | - display: none !important; |
| 101 | +/* ------- Hero ------- */ |
| 102 | +.home-hero { padding: 5rem 1rem 1.5rem; text-align: center; } |
| 103 | +.home-title { color: var(--text); font-size: clamp(2rem, 2.8vw + 1rem, 3rem); margin: 0 0 .6rem; } |
| 104 | +.home-subtitle { color: var(--muted); margin: 0 auto 1.8rem; max-width: 62ch; } |
| 105 | + |
| 106 | +/* (Search form is commented out in your HTML, but styles left here in case you re-enable) */ |
| 107 | +.home-search { |
| 108 | + display: inline-flex; gap: .5rem; align-items: center; |
| 109 | + background: transparent; /* no panel */ |
| 110 | + border: 1px solid var(--border); |
| 111 | + border-radius: 999px; padding: .5rem; |
| 112 | + box-shadow: none; |
| 113 | +} |
| 114 | +.home-search input[type="search"] { |
| 115 | + min-width: clamp(260px, 42vw, 560px); |
| 116 | + background: transparent; border: none; color: var(--text); |
| 117 | + outline: none; padding: .75rem 1rem; font-size: 1rem; |
| 118 | +} |
| 119 | +.home-search input::placeholder { color: var(--muted); } |
| 120 | +.search-btn { |
| 121 | + display: inline-flex; align-items: center; gap: .5rem; |
| 122 | + border: 1px solid transparent; |
| 123 | + background: linear-gradient(180deg, var(--brand), var(--brand-strong)); |
| 124 | + color: #001; font-weight: 700; padding: .7rem 1rem; |
| 125 | + border-radius: 999px; cursor: pointer; |
| 126 | + box-shadow: 0 10px 24px rgba(0, 190, 255, .18); |
| 127 | +} |
| 128 | +.search-btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; } |
| 129 | +.search-btn .icon { width: 20px; height: 20px; } |
| 130 | + |
| 131 | +/* ------- Sections ------- */ |
| 132 | +.home-main { padding: .5rem 0 3rem; } |
| 133 | +.home-container { max-width: 1100px; margin-inline: auto; padding-inline: 1rem; } |
| 134 | +.section { margin-top: 1.25rem; } |
| 135 | +.section-title { color: var(--muted); font-weight: 600; letter-spacing: .2px; margin: 0 0 1rem; } |
| 136 | + |
| 137 | +/* ------- Cards: transparent by default (no fill), subtle outline ------- */ |
| 138 | +.card-grid { |
| 139 | + --min: 260px; |
| 140 | + display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr)); |
| 141 | + gap: 1rem; align-items: stretch; |
| 142 | +} |
| 143 | +.card { |
| 144 | + display: grid; grid-template-rows: auto auto 1fr auto; gap: .5rem; |
| 145 | + padding: 1rem; border-radius: 16px; text-decoration: none; color: var(--text); |
| 146 | + background: transparent; /* <- no box */ |
| 147 | + border: 1px solid var(--border); |
| 148 | + box-shadow: none; |
| 149 | + transition: transform .2s ease, background-color .15s ease, border-color .15s ease; |
| 150 | +} |
| 151 | +.card:hover { transform: translateY(-2px); background: var(--surface-hover); border-color: var(--brand); } |
| 152 | +.card:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; } |
| 153 | + |
| 154 | +.card-icon { |
| 155 | + width: 36px; height: 36px; display: grid; place-items: center; |
| 156 | + border-radius: 12px; |
| 157 | + background: linear-gradient(180deg, var(--brand), var(--brand-strong)); |
| 158 | + box-shadow: 0 8px 18px rgba(0, 190, 255, .2); |
| 159 | +} |
| 160 | +.card-icon svg { width: 22px; height: 22px; fill: #001; } |
| 161 | + |
| 162 | +.card-title { font-size: 1.05rem; margin: .25rem 0; } |
| 163 | +.card-desc { margin: 0; color: var(--muted); } |
| 164 | +.card-cta { margin-top: .5rem; font-weight: 700; color: var(--brand); display: inline-flex; gap: .35rem; } |
| 165 | +.card-cta::after { content: "›"; font-size: 1.2em; transform: translateY(-1px); } |
| 166 | + |
| 167 | +/* Reduced motion */ |
| 168 | +@media (prefers-reduced-motion: reduce) { .card, .search-btn { transition: none; } } |
| 169 | + |
| 170 | +/* Small screens */ |
| 171 | +@media (max-width: 480px) { |
| 172 | + .home-search { width: 100%; } |
| 173 | + .home-search input[type="search"] { min-width: 0; width: 100%; } |
19 | 174 | } |
0 commit comments