Skip to content

Commit 69c4043

Browse files
committed
docs: update to furo theme to match Spack docs
1 parent 8d7d8b8 commit 69c4043

6 files changed

Lines changed: 174 additions & 102 deletions

File tree

_pygments/style.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

_static/css/custom.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,44 @@
22
overflow-y: auto;
33
max-height: 700px;
44
}
5+
6+
div.versionadded {
7+
border-left: 3px solid #0c731f;
8+
color: #0c731f;
9+
padding-left: 1rem;
10+
}
11+
12+
.py.property {
13+
display: block !important;
14+
}
15+
16+
div.version-switch {
17+
text-align: center;
18+
min-height: 2em;
19+
}
20+
21+
div.version-switch>select {
22+
display: inline-block;
23+
text-align-last: center;
24+
background: none;
25+
border: none;
26+
border-radius: 0.5em;
27+
box-shadow: none;
28+
color: var(--color-foreground-primary);
29+
cursor: pointer;
30+
appearance: none;
31+
padding: 0.2em;
32+
-webkit-appearance: none;
33+
-moz-appearance: none;
34+
}
35+
36+
div.version-switch select:active,
37+
div.version-switch select:focus,
38+
div.version-switch select:hover {
39+
color: var(--color-foreground-secondary);
40+
background: var(--color-background-hover);
41+
}
42+
43+
.toc-tree li.scroll-current>.reference {
44+
font-weight: normal;
45+
}

_templates/base.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% extends "!base.html" %}
2+
3+
{%- block extrahead %}
4+
<!-- Google tag (gtag.js) -->
5+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-S0PQ7WV75K"></script>
6+
<script>
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag(){dataLayer.push(arguments);}
9+
gtag('js', new Date());
10+
gtag('config', 'G-S0PQ7WV75K');
11+
</script>
12+
{%- if READTHEDOCS %}
13+
<meta name="readthedocs-addons-api-version" content="1">
14+
<script src="{{ pathto('_static/js/versions.js', 1) }}"></script>
15+
{%- endif %}
16+
{% endblock %}

_templates/sidebar/brand.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ pathto(master_doc) }}">
2+
{%- block brand_content %}
3+
{#- Remember to update the prefetch logic in `block logo_prefetch_links` in base.html #}
4+
{%- if logo_url %}
5+
<div class="sidebar-logo-container">
6+
<img class="sidebar-logo" src="{{ logo_url }}" alt="Logo"/>
7+
</div>
8+
{%- endif %}
9+
{%- if theme_light_logo and theme_dark_logo %}
10+
<div class="sidebar-logo-container">
11+
<img class="sidebar-logo only-light" width="850" height="256" src="{{ pathto('_static/' + theme_light_logo, 1) }}" alt="Spack Logo"/>
12+
<img class="sidebar-logo only-dark" width="850" height="256" src="{{ pathto('_static/' + theme_dark_logo, 1) }}" alt="Spack Logo"/>
13+
</div>
14+
{%- endif %}
15+
{% if not theme_sidebar_hide_name %}
16+
<span class="sidebar-brand-text">{{ docstitle if docstitle else project }}</span>
17+
{%- endif %}
18+
{% endblock brand_content %}
19+
</a>
20+
21+
{%- if READTHEDOCS %}
22+
<div class="version-switch"></div>
23+
{%- endif %}

0 commit comments

Comments
 (0)