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