Skip to content

Commit 6672973

Browse files
committed
Add overrides to mkdocs
1 parent 869bb88 commit 6672973

File tree

4 files changed

+142
-2
lines changed

4 files changed

+142
-2
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: modernhpc
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

docs/overrides/main.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "base.html" %}
2+
3+
{% block content %}
4+
{{ super() }}
5+
<!-- Content footer -->
6+
<footer class="tx-content__footer md-typeset" style="margin-top: 70px;">
7+
<a href="{{ config.repo_url }}" title="{{ config.site_name }}" class="md-button" target="_blank">
8+
⭐️ Star {{ config.site_name }}
9+
</a>
10+
<a href="https://www.patreon.com/modernhpc" title="{{ config.site_name }}" class="md-button" target="_blank">
11+
❤️ Contribute to {{ config.site_name }}
12+
</a>
13+
</footer>
14+
{% endblock %}

docs/overrides/partials/footer.html

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<!--
2+
Copyright (c) 2016-2020 Martin Donath <[email protected]>
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to
6+
deal in the Software without restriction, including without limitation the
7+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8+
sell copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20+
IN THE SOFTWARE.
21+
-->
22+
23+
{% import "partials/language.html" as lang with context %}
24+
25+
<!-- Application footer -->
26+
<footer class="md-footer">
27+
28+
<!-- Link to previous and/or next page -->
29+
{% if page.previous_page or page.next_page %}
30+
<div class="md-footer-nav">
31+
<nav
32+
class="md-footer-nav__inner md-grid"
33+
aria-label="{{ lang.t('footer.title') }}"
34+
>
35+
36+
<!-- Link to previous page -->
37+
{% if page.previous_page %}
38+
<a
39+
href="{{ page.previous_page.url | url }}"
40+
class="md-footer-nav__link md-footer-nav__link--prev"
41+
rel="prev"
42+
>
43+
<div class="md-footer-nav__button md-icon">
44+
{% include ".icons/material/arrow-left.svg" %}
45+
</div>
46+
<div class="md-footer-nav__title">
47+
<div class="md-ellipsis">
48+
<span class="md-footer-nav__direction">
49+
{{ lang.t("footer.previous") }}
50+
</span>
51+
{{ page.previous_page.title }}
52+
</div>
53+
</div>
54+
</a>
55+
{% endif %}
56+
57+
<!-- Link to next page -->
58+
{% if page.next_page %}
59+
<a
60+
href="{{ page.next_page.url | url }}"
61+
class="md-footer-nav__link md-footer-nav__link--next"
62+
rel="next"
63+
>
64+
<div class="md-footer-nav__title">
65+
<div class="md-ellipsis">
66+
<span class="md-footer-nav__direction">
67+
{{ lang.t("footer.next") }}
68+
</span>
69+
{{ page.next_page.title }}
70+
</div>
71+
</div>
72+
<div class="md-footer-nav__button md-icon">
73+
{% include ".icons/material/arrow-right.svg" %}
74+
</div>
75+
</a>
76+
{% endif %}
77+
</nav>
78+
</div>
79+
{% endif %}
80+
81+
<!-- Further information -->
82+
<div class="md-footer-meta md-typeset">
83+
<div class="md-footer-meta__inner md-grid">
84+
85+
<!-- Copyright and theme information -->
86+
<div class="md-footer-copyright">
87+
{% if config.copyright %}
88+
<div class="md-footer-copyright__highlight">
89+
{{ config.copyright }}
90+
</div>
91+
{% endif %}
92+
Made with
93+
<a
94+
href="https://alandefreitas.github.io/mdsplit/"
95+
target="_blank" rel="noopener"
96+
>
97+
<code style="background-color: #323232;">mdsplit</code>
98+
</a>
99+
and
100+
<a
101+
href="https://squidfunk.github.io/mkdocs-material/"
102+
target="_blank" rel="noopener"
103+
>
104+
Material for MkDocs
105+
</a>
106+
</div>
107+
108+
<!-- Social links -->
109+
{% include "partials/social.html" %}
110+
</div>
111+
</div>
112+
</footer>

mkdocs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ site_description: "Matplot++: A C++ Graphics Library for Data Visualization"
77

88
theme:
99
name: material
10+
custom_dir: docs/overrides
1011
palette:
1112
scheme: preference
1213
features:
1314
# - navigation.instant # this doesn't work well with pymdownx.arithmatex
14-
# - navigation.sections
15+
# - navigation.sections # problems on github pages
1516
- toc.integrate
16-
- header.autohide
17+
# - header.autohide # problems on mobile
1718
icon:
1819
repo: fontawesome/brands/git-alt
20+
logo: fontawesome/solid/code
1921

2022
edit_uri: ""
2123

0 commit comments

Comments
 (0)