Skip to content

Commit abec124

Browse files
committed
homepage
1 parent db7a37e commit abec124

4 files changed

Lines changed: 68 additions & 10 deletions

File tree

source/_static/css/custom.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,37 @@ dl.py-parameter-list .param-type {
3232
.version-changed { background: #e7f1fb; color: #1c5d99; }
3333
.version-deprecated { background: #fdf3e0; color: #9a6b00; }
3434
.version-removed { background: #fbe9e9; color: #a32020; }
35-
.version-fixed { background: #ece9fb; color: #5b3da3; }
35+
.version-fixed { background: #ece9fb; color: #5b3da3; }
36+
37+
/* Home button: 𝜒ara, chi matching the favicon and homepage title */
38+
.navbar-brand .brand-chi {
39+
font-size: 1.5rem;
40+
line-height: 1;
41+
color: var(--pst-color-text-base);
42+
}
43+
44+
.navbar-brand:hover .brand-chi {
45+
color: var(--pst-color-link-hover);
46+
}
47+
48+
/* Dark-mode dark panels for sphinx-tabs */
49+
html[data-theme="dark"] .sphinx-tabs-panel {
50+
color: var(--pst-color-text-base);
51+
background: rgb(50, 50, 50);
52+
border-color: #4a4a4a;
53+
}
54+
55+
html[data-theme="dark"] .sphinx-tabs-tab {
56+
color: var(--pst-color-link);
57+
background-color: rgba(255, 255, 255, 0.05);
58+
}
59+
60+
html[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
61+
border-color: #4a4a4a;
62+
border-bottom: 1px solid rgb(50, 50, 50);
63+
background-color: rgb(50, 50, 50);
64+
}
65+
66+
html[data-theme="dark"] [role="tablist"] {
67+
border-bottom-color: #4a4a4a;
68+
}

source/_static/css/home-css/home.css

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ h2 {
1919
position: relative;
2020
}
2121

22+
/* Header nav: all links inline (no "More" dropdown), wrapping if needed;
23+
stacked vertically in the mobile (hamburger) menu */
24+
.bd-navbar-elements {
25+
display: flex;
26+
flex-direction: row;
27+
flex-wrap: wrap;
28+
list-style: none;
29+
margin: 0;
30+
}
31+
32+
@media (max-width: 1023px) {
33+
.bd-navbar-elements {
34+
flex-direction: column;
35+
}
36+
}
37+
2238
.bd-footer a:visited {
2339
color: #6f42c1;
2440
}
@@ -47,6 +63,6 @@ h2 {
4763
/* Pull the icon column left (one grid column = 8.3333%) */
4864
@media (min-width: 992px) {
4965
.bd-footer .xara-footer {
50-
margin-left: -8.3333%;
66+
margin-left: -5%;
5167
}
5268
}

source/_templates/home.html

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
document.documentElement.dataset.theme = "light"; // localStorage.getItem("theme") || "light";
3939
</script>
4040
<script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.5.0/model-viewer.min.js"></script>
41+
<!-- theme's Bootstrap bundle: makes the "More" nav dropdown work -->
42+
<script src="{{ pathto('_static/scripts/bootstrap.js', 1) }}" defer></script>
4143

4244
<link rel="canonical" href="https://xara.so" >
4345
<link rel="icon" type="image/x-icon" href="_static/images/favicon.ico">
@@ -89,9 +91,6 @@
8991

9092
<div class="container is-max-widescreen">
9193
<div class=navbar-brand>
92-
<a class=navbar-item href="/"><img alt="xara branding" class="navbar-logo" src="{{ pathto('_static/images/peer-black-100.png', 1) }}" >
93-
<div class=navbar-logo-text></div>
94-
</a>
9594
<a role=button class="navbar-burger" aria-label="menu" aria-expanded=false
9695
data-target="navbar-menu"><span aria-hidden="true"></span>
9796
<span aria-hidden=true></span>
@@ -103,7 +102,7 @@
103102
<a href="/install.html" class="navbar-item is-secondary">Install</a>
104103
<a href=https://numpy.org/doc/stable class="navbar-item is-secondary">Documentation</a>
105104
{% endif %}
106-
<ul class="navbar-item bd-navbar-elements " style="display: flex; flex-direction: row;">
105+
<ul class="navbar-item bd-navbar-elements">
107106
{{ generate_header_nav_html(n_links_before_dropdown=theme_header_links_before_dropdown) }}
108107
</ul>
109108
</div>
@@ -256,7 +255,7 @@ <h2>Partners</h2>
256255
<div class="container py-4 py-md-5 px-4 px-md-3 text-body-secondary">
257256
<div class="row">
258257
<div class="col-lg-3 mb-3">
259-
<a class="d-inline-flex align-items-center mb-3 text-body-emphasis text-decoration-none" href="https://stairlab.berkeley.edu" aria-label="STAIRlab">
258+
<a class="d-inline-flex align-items-center mb-3 py-2 text-body-emphasis text-decoration-none" href="https://stairlab.berkeley.edu" aria-label="STAIRlab">
260259
<img id=footer-logo style="max-width: 50;" src="{{ pathto('_static/images', 1) }}/peer-black-100.png"
261260
alt="STAIRLab logo.">
262261
<span class="fs-5">STAIRLab</span>
@@ -301,5 +300,17 @@ <h5>Projects</h5>
301300
</div>
302301
</div>
303302
</footer>
303+
304+
<script>
305+
document.addEventListener('DOMContentLoaded', () => {
306+
document.querySelectorAll('.navbar-burger').forEach(burger => {
307+
burger.addEventListener('click', () => {
308+
const target = document.getElementById(burger.dataset.target);
309+
burger.classList.toggle('is-active');
310+
if (target) target.classList.toggle('is-active');
311+
});
312+
});
313+
});
314+
</script>
304315
</body>
305316
</html>

source/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
# "image_light": html_logo,
188188
# "image_dark": "_static/logo-dark.png",
189189
"link": html_baseurl, # "index.html",
190-
"text": f'<span class="lead display-3">{project}</span>',
190+
"text": '<span class="brand-chi">𝜒ara</span>',
191191
# "alt_text": "xara docs - Home",
192192
}
193193
}
@@ -239,8 +239,6 @@
239239
'css/home-css/'+str(file.name) for file in (Path(__file__).parents[0]/"_static/css/home-css/").glob("vars*.css")
240240
] + [
241241
'css/css/'+str(file.name) for file in (Path(__file__).parents[0]/"_static/css/css/").glob("*.css")
242-
] + [
243-
"css/veux.css",
244242
]
245243

246244
html_secnum_suffix = " "

0 commit comments

Comments
 (0)