Skip to content

Commit bb038e1

Browse files
Merge pull request #19 from OpenScience-Collective/feature/cross-site-nav-footer
Add cross-site footer links and rewrite logo to main site
2 parents af40901 + 29b511f commit bb038e1

4 files changed

Lines changed: 64 additions & 0 deletions

File tree

mkdocs-courses.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ markdown_extensions:
111111
- pymdownx.tilde
112112

113113
extra:
114+
homepage: https://osc.earth
114115
social:
115116
- icon: fontawesome/brands/github
116117
link: https://github.com/OpenScience-Collective

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ markdown_extensions:
135135
- pymdownx.tilde
136136

137137
extra:
138+
homepage: https://osc.earth
138139
social:
139140
- icon: fontawesome/brands/github
140141
link: https://github.com/OpenScience-Collective

overrides/main.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
{{ super() }}
5+
<style>
6+
.md-osc-sitelinks {
7+
display: flex;
8+
flex-wrap: wrap;
9+
justify-content: center;
10+
gap: 0.35rem 0.6rem;
11+
margin: 0 0 0.4rem;
12+
padding: 0;
13+
list-style: none;
14+
font-size: 0.72rem;
15+
font-weight: 500;
16+
}
17+
.md-osc-sitelinks li {
18+
display: inline-flex;
19+
align-items: center;
20+
gap: 0.6rem;
21+
}
22+
.md-osc-sitelinks li + li::before {
23+
content: "·";
24+
opacity: 0.5;
25+
}
26+
.md-osc-sitelinks a {
27+
color: var(--md-footer-fg-color);
28+
text-decoration: none;
29+
border-bottom: 1px solid transparent;
30+
transition: border-color 120ms ease;
31+
}
32+
.md-osc-sitelinks a:hover,
33+
.md-osc-sitelinks a:focus {
34+
border-bottom-color: currentColor;
35+
}
36+
</style>
37+
{% endblock %}

overrides/partials/copyright.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{#-
2+
Shadows Material's partials/copyright.html to add cross-site navigation.
3+
Keep `md-copyright__highlight` and generator markup aligned with upstream:
4+
https://github.com/squidfunk/mkdocs-material/blob/master/material/templates/partials/copyright.html
5+
-#}
6+
<div class="md-copyright">
7+
<nav aria-label="Open Science Collective sites">
8+
<ul class="md-osc-sitelinks">
9+
<li><a href="https://osc.earth">osc.earth</a></li>
10+
<li><a href="https://docs.osc.earth">docs.osc.earth</a></li>
11+
<li><a href="https://courses.osc.earth">courses.osc.earth</a></li>
12+
</ul>
13+
</nav>
14+
{% if config.copyright %}
15+
<div class="md-copyright__highlight">
16+
{{ config.copyright }}
17+
</div>
18+
{% endif %}
19+
{% if not config.extra.generator == false %}
20+
Made with
21+
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
22+
Material for MkDocs
23+
</a>
24+
{% endif %}
25+
</div>

0 commit comments

Comments
 (0)