Skip to content

Commit 48bc641

Browse files
authored
Fix footer display (#168)
I did not notice before, but the recent pydata sphinx theme versions had unset our footer. I will send a PR later to fix the 0.5.0 docs in napari.github.io, but this fixes the immediate issues and changes the wording on the footer items as requested in #12 .
1 parent f58b7b0 commit 48bc641

File tree

6 files changed

+64
-43
lines changed

6 files changed

+64
-43
lines changed

napari_sphinx_theme/footer.html

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
1-
<footer class="napari-footer">
2-
{% for footer_item in theme_footer_items %}
3-
<div class="footer-item">
4-
{% include footer_item %}
1+
{% if theme_footer_start or theme_footer_center or theme_footer_end %}
2+
<div class="bd-footer__inner bd-page-width">
3+
{% if theme_footer_start %}
4+
<div class="footer-items__start">
5+
{% for item in theme_footer_start %}
6+
<div class="footer-item">{% include item %}</div>
7+
{% endfor %}
58
</div>
6-
{% endfor %}
7-
</footer>
9+
{% endif %}
10+
{% if theme_footer_center %}
11+
<div class="footer-items__center">
12+
{% for item in theme_footer_center %}
13+
<div class="footer-item">{% include item %}</div>
14+
{% endfor %}
15+
</div>
16+
{% endif %}
17+
{% if theme_footer_end %}
18+
<div class="footer-items__end">
19+
{% for item in theme_footer_end %}
20+
<div class="footer-item">{% include item %}</div>
21+
{% endfor %}
22+
</div>
23+
{% endif %}
24+
</div>
25+
{% endif %}

napari_sphinx_theme/layout.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{%- extends "pydata_sphinx_theme/layout.html" %}
2+
3+
{%- block footer %}
4+
<footer class="napari-footer">
5+
{%- include "footer.html" %}
6+
</footer>
7+
{%- endblock %}
+11-11
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
<a class="footer-icon__hover-blue" href="https://napari.org" target="_blank" rel="noreferrer">
1+
<a class="footer-icon__hover-blue" href="https://napari.org" title="napari.org" target="_blank" rel="noreferrer">
22
{% include "partials/napari.html" %}
33
<span>napari</span>
44
</a>
55

6-
<a class="footer-icon__hover-blue" href="https://napari-hub.org" target="_blank" rel="noreferrer">
6+
<a class="footer-icon__hover-blue" href="https://napari-hub.org" title="napari hub" target="_blank" rel="noreferrer">
77
{% include "partials/napari-hub.html" %}
88
{% include "partials/napari-hub-light-blue.html" %}
9-
<span>napari hub</span>
9+
<span>Plugins</span>
1010
</a>
1111

12-
<a class="footer-icon__hover-blue" href="https://github.com/napari/napari" target="_blank" rel="noreferrer">
12+
<a class="footer-icon__hover-blue" href="https://github.com/napari/napari" title="GitHub" target="_blank" rel="noreferrer">
1313
{% include "partials/github.html" %}
1414
{% include "partials/github-light-blue.html" %}
15-
<span>GitHub</span>
15+
<span>Code</span>
1616
</a>
1717

18-
<a class="footer-icon__hover-blue" href="https://fosstodon.org/@napari" target="_blank" rel="noreferrer">
18+
<a class="footer-icon__hover-blue" href="https://fosstodon.org/@napari" title="Mastodon" target="_blank" rel="noreferrer">
1919
{% include "partials/mastodon.html" %}
2020
{% include "partials/mastodon-light-blue.html" %}
2121
<span>Mastodon</span>
2222
</a>
2323

24-
<a class="footer-icon__hover-blue" href="https://twitter.com/napari_imaging" target="_blank" rel="noreferrer">
24+
<a class="footer-icon__hover-blue" href="https://twitter.com/napari_imaging" title="Twitter" target="_blank" rel="noreferrer">
2525
{% include "partials/twitter.html" %}
2626
{% include "partials/twitter-light-blue.html" %}
2727
<span>Twitter</span>
2828
</a>
2929

30-
<a class="footer-icon__hover-blue" href="https://forum.image.sc/tag/napari" target="_blank" rel="noreferrer">
30+
<a class="footer-icon__hover-blue" href="https://forum.image.sc/tag/napari" title="image.sc" target="_blank" rel="noreferrer">
3131
{% include "partials/image-sc.html" %}
3232
{% include "partials/image-sc-light-blue.html" %}
33-
<span>image.sc</span>
33+
<span>Forum</span>
3434
</a>
3535

36-
<a class="footer-icon__hover-blue" href="https://napari.zulipchat.com" target="_blank" rel="noreferrer">
36+
<a class="footer-icon__hover-blue" href="https://napari.zulipchat.com" title="Zulip" target="_blank" rel="noreferrer">
3737
{% include "partials/zulip.html" %}
3838
{% include "partials/zulip-light-blue.html" %}
39-
<span>Zulip</span>
39+
<span>Chat</span>
4040
</a>

napari_sphinx_theme/napari-layout.html

-23
This file was deleted.

napari_sphinx_theme/static/css/napari-sphinx-theme.css

+17-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ h1 {
8383
align-items: center;
8484
justify-content: space-between;
8585
background-color: black;
86-
padding-left: 1.5rem;
87-
padding-right: 1.5rem;
8886
padding-top: 1.5rem;
8987
padding-bottom: 0.5rem;
9088
margin-top: 75px;
@@ -206,6 +204,23 @@ h1 {
206204
display: block;
207205
}
208206

207+
/* Recommended by PST */
208+
.footer-items__start, .footer-items__end {
209+
flex-direction: row;
210+
}
211+
212+
.bd-footer__inner {
213+
display: flex;
214+
flex-shrink: 0;
215+
flex-direction: row;
216+
flex-wrap: wrap;
217+
width: 100%;
218+
max-width: 100%;
219+
align-items: center;
220+
justify-content: space-between;
221+
background-color: black;
222+
}
223+
209224
/****************************
210225
Nav bar section
211226
*****************************/

napari_sphinx_theme/theme.conf

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,9 @@ navbar_align = content
2020
navbar_start = navbar-logo.html
2121
navbar_center = navbar-nav.html
2222
navbar_end = navbar-icon-links.html
23-
footer_items = napari-footer-links.html, napari-copyright.html
2423
page_sidebar_items = page-toc.html
24+
article_footer_items =
25+
content_footer_items =
26+
footer_start = napari-footer-links.html
27+
footer_center =
28+
footer_end = napari-copyright.html

0 commit comments

Comments
 (0)