Skip to content

Commit 2b6dad3

Browse files
authored
Merge pull request #3 from chrystalchern/master
home page description
2 parents f56025e + 3b380c3 commit 2b6dad3

4 files changed

Lines changed: 117 additions & 16 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: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,64 @@ h2 {
1717
line-height: 1.5;
1818
padding: .5rem .75rem;
1919
position: relative;
20-
}
20+
}
21+
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+
38+
/* Open the "More" dropdown as an overlay instead of pushing content down
39+
(theme CSS sets .dropdown-menu to position: static) */
40+
.bd-navbar-elements .nav-item.dropdown {
41+
position: relative;
42+
}
43+
44+
.bd-navbar-elements .dropdown-menu {
45+
position: absolute;
46+
top: 100%;
47+
right: 0;
48+
}
49+
50+
.bd-footer a:visited {
51+
color: #6f42c1;
52+
}
53+
54+
.bd-footer a:hover,
55+
.bd-footer a:visited:hover {
56+
color: var(--colorPrimaryLight);
57+
}
58+
59+
.bd-footer h5 {
60+
font-weight: 700;
61+
margin-bottom: 1rem;
62+
}
63+
64+
/* enlarge GitHub icon: Bulma's .icon caps it at 1.5rem */
65+
.bd-footer .social-media-icons svg.icon {
66+
width: 2.5rem;
67+
height: 2.5rem;
68+
transition: fill .15s ease-in-out;
69+
}
70+
71+
.bd-footer .social-media-icons svg.icon:hover {
72+
fill: var(--colorPrimaryLight);
73+
}
74+
75+
/* Pull the icon column left (one grid column = 8.3333%) */
76+
@media (min-width: 992px) {
77+
.bd-footer .xara-footer {
78+
margin-left: -5%;
79+
}
80+
}

source/_templates/home.html

Lines changed: 19 additions & 9 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>
@@ -200,7 +199,7 @@ <h2 class="">Gallery</h2>
200199
<h2>Pacific Earthquake Engineering Center</h2>
201200
<div class="col-md-8 mx-auto text-center">
202201
<p>
203-
<em><strong>xara</strong></em> is a free tool developed at the University of California, Berkeley and published by the Pacific Earthquake Engineering Research center.
202+
<em><strong>xara</strong></em> is a free tool developed at the University of California, Berkeley and published by the Pacific Earthquake Engineering Research center (PEER). More free tools from PEER:
204203
</p>
205204
<hr class="my-4">
206205
<div class="row g-3">
@@ -256,10 +255,9 @@ <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-2 text-body-emphasis text-decoration-none" href="/" aria-label="STAIRlab">
260-
<a href="https://stairlab.berkeley.edu">
261-
<img id=footer-logo style="max-width: 50;" src="{{ pathto('_static/images', 1) }}/peer-black-100.png"
262-
alt="STAIRLab logo."></a>
258+
<a class="d-inline-flex align-items-center mb-3 text-body-emphasis text-decoration-none" href="https://stairlab.berkeley.edu" aria-label="STAIRlab">
259+
<img id=footer-logo class="me-2" style="max-width: 50;" src="{{ pathto('_static/images', 1) }}/peer-black-100.png"
260+
alt="STAIRLab logo.">
263261
<span class="fs-5">STAIRLab</span>
264262
</a>
265263
<ul class="list-unstyled small">
@@ -302,5 +300,17 @@ <h5>Projects</h5>
302300
</div>
303301
</div>
304302
</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>
305315
</body>
306316
</html>

source/conf.py

Lines changed: 3 additions & 5 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
}
@@ -224,8 +224,8 @@
224224
# {"title": "Interoperability", "link": f"{g}/examples/cablestayed/", "image": "../_static/images/gallery/CableStayed02-576x324.webp", "description": "Coming soon."},
225225
],
226226
"features": [
227-
{"title": "Fast", "body": "Core components have been refactored to leverage modern C++ features, which has furnished substantial performance improvements over the alternative serial OpenSees interpreters."},
228-
{"title": "Free", "body": "All source code contributed to xara is licensed under a <em>pure</em> BSD."},
227+
{"title": "Fast", "body": "Core components have been refactored to leverage modern C++ features, furnishing substantial performance improvements over the alternative serial OpenSees interpreters."},
228+
{"title": "Free", "body": "All source code contributed to xara is licensed under pure BSD."},
229229
{"title": "Robust", "body": '<em>xara</em> is designed from the ground up for use in production environments like <a href="https://structures.live">structures.live</a>'},
230230
],
231231
"home_image": "_static/images/CableStayed02.png"
@@ -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)