Skip to content

Commit 2c1f7c0

Browse files
Theme upgrade (#413)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Redesigned homepages (main and student) with hero header and accessible card grid. - Automatic light/dark theme based on saved preference or system setting. - Split “Preview” into separate Instructor and Student links. - Improved search readiness with DocSearch configuration and deferred initialization. - Style - Comprehensive CSS refresh: responsive layout, transparent cards, logo sizing, color-scheme-aware backgrounds. - Documentation - Deeper navigation (maxdepth increased) across multiple sections; updated captions. - Simplified install instructions and expanded cross-links. - Chores - Updated CI/docs build dependencies and theme. - Run command now clears before building. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents f558f1a + 4809ec2 commit 2c1f7c0

31 files changed

Lines changed: 698 additions & 261 deletions

.codio

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// This file is used to configure the three buttons along Codio's top menu.
33
// Run button configuration
44
"commands": {
5-
"Make": "make html",
5+
"Make": "clear && make html",
66
"Start Ungit":"ungit --port=4000 --ungitBindIp 0.0.0.0"
77
},
88
// Preview button configuration
99
"preview": {
10-
"Preview": "https://{{domain}}/build/html/index.html",
10+
"Instructor": "https://{{domain}}/build/html/index.html",
11+
"Student": "https://{{domain}}/build/html/student.html",
1112
"Visit Ungit": "https://{{domain4000}}/#/repository?path=%2Fhome%2Fcodio%2Fworkspace"
1213

1314

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Setup env
13-
run: pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphinx==4.2.0 sphinx-sitemap sphinx_code_tabs recommonmark git+https://github.com/codio/pydata-sphinx-theme.git@master
13+
run: pip install sphinx==8.2.0 sphinxawesome-theme==5.3.2 sphinx-docsearch sphinx-sitemap sphinx_code_tabs recommonmark
1414

1515
- name: Checkout
1616
uses: actions/checkout@v1

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ If using Codio, put on the certified Python stack `Python Ubuntu 22.04 (pyenv)`.
88
### Install
99

1010
```
11-
pip install sphinx==4.2.0 sphinx-sitemap sphinx_code_tabs recommonmark git+https://github.com/codio/pydata-sphinx-theme.git@master
12-
```
13-
14-
Due to some versions being outdated, temporarily you will need to use this command to install dependencies:
15-
16-
```
17-
pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sphinx==4.2.0 sphinx-sitemap sphinx_code_tabs recommonmark git+https://github.com/codio/pydata-sphinx-theme.git@master
11+
pip install sphinx==8.2.0 sphinxawesome-theme==5.3.2 sphinx-docsearch sphinx-sitemap sphinx_code_tabs recommonmark
1812
```
1913

2014
### Build

source/_static/css/codio.css

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,32 @@
225225
.bd-content a.reference {
226226
font-weight: 600;
227227
}
228+
228229
.small-text {
229230
font-size: 0.85em;
230231
}
232+
231233
.tiny {
232234
font-size: 0.75em;
233-
}
235+
}
234236

235237
.float-right {
236238
float: right; width: 300px; margin-left: 50px;
237-
}
239+
}
240+
241+
header img[src$="logo-white.svg"],
242+
header img[src$="logo-dark.svg"] {
243+
height: 32px !important;
244+
width: auto !important;
245+
}
246+
247+
header span.font-bold {
248+
display: none !important;
249+
}
250+
251+
@media (prefers-color-scheme: dark) {
252+
html { background: #0b0d17; }
253+
}
254+
@media (prefers-color-scheme: light) {
255+
html { background: #ffffff; }
256+
}

source/_static/css/custom_body.css

Lines changed: 129 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,138 @@
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;
315
}
416

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;
724
}
825

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);
1137
}
1238

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);
1591
}
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; } }
16133

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%; }
19138
}
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
/* Slight width nudge only (kept minimal) */
2+
.index-page .home-container { max-width: 100%; }
3+
4+
/* Ensure any Bootstrap-like main column stays centered on the homepage */
15
@media (min-width: 1200px) {
2-
.col-xl-8 {
3-
flex: 0 0 91.66667% !important;
4-
max-width: 91.66667% !important;
5-
}
6+
.index-page .col-xl-8 {
7+
flex: 0 0 91.66667% !important;
8+
max-width: 91.66667% !important;
9+
margin-left: auto !important;
10+
margin-right: auto !important;
11+
}
612
}

source/_static/favicon.ico

-1.63 KB
Binary file not shown.

source/_static/js/algolia.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
docsearch({
2-
// Your apiKey and indexName will be given to you once
3-
// we create your config
4-
apiKey: '7e59277e32050e11c2e8915f1b09d6e2',
5-
indexName: 'CodioDocs',
6-
appId: '0MJO9504F8', // Should be only included if you are running DocSearch on your own.
7-
container: '#docsearch',
8-
// Set debug to true to inspect the dropdown
9-
searchParameters: {
10-
hitsPerPage: 20,
11-
}
1+
window.addEventListener('DOMContentLoaded', () => {
2+
docsearch({
3+
// Your apiKey and indexName will be given to you once
4+
// we create your config
5+
apiKey: '7e59277e32050e11c2e8915f1b09d6e2',
6+
indexName: 'CodioDocs',
7+
appId: '0MJO9504F8', // Should be only included if you are running DocSearch on your own.
8+
container: '#docsearch',
9+
// Set debug to true to inspect the dropdown
10+
searchParameters: {
11+
hitsPerPage: 20,
12+
}
13+
});
1214
});

source/_static/logo-dark.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)