Skip to content

Commit 5286679

Browse files
heikkitoivonencodex
andcommitted
Update: Move repo badge to footer
Co-Authored-By: Codex <codex@openai.com>
1 parent 4c8c9c5 commit 5286679

3 files changed

Lines changed: 82 additions & 3 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div class="md-copyright footer-meta">
2+
<div class="footer-meta__left">
3+
{% if config.copyright %}
4+
<div class="md-copyright__highlight">
5+
{{ config.copyright }}
6+
</div>
7+
{% endif %}
8+
9+
{% if config.extra.generator is not defined or config.extra.generator != false %}
10+
<div class="md-copyright__highlight">
11+
Made with
12+
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
13+
Material for MkDocs
14+
</a>
15+
</div>
16+
{% endif %}
17+
</div>
18+
19+
<div class="footer-meta__right">
20+
{% include "partials/source.html" %}
21+
</div>
22+
</div>

docs/stylesheets/extra.css

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/* Hide header repo badge; show repo in footer right via override */
2+
.md-header__source {
3+
display: none;
4+
}
5+
6+
.footer-meta {
7+
align-items: center;
8+
display: flex;
9+
flex-wrap: wrap;
10+
gap: 0.5rem 1rem;
11+
width: 100%;
12+
}
13+
14+
.footer-meta__left {
15+
display: flex;
16+
flex-direction: column;
17+
gap: 0.25rem;
18+
}
19+
20+
.footer-meta__right {
21+
margin-left: auto;
22+
flex: 0 0 auto;
23+
}
24+
25+
.footer-meta__right .md-source {
26+
max-width: none;
27+
overflow: visible;
28+
white-space: nowrap;
29+
width: auto;
30+
display: inline-flex;
31+
}
32+
33+
.footer-meta__right .md-source__repository,
34+
.footer-meta__right .md-source__facts {
35+
white-space: nowrap;
36+
max-width: none;
37+
}
38+
39+
.footer-meta__right .md-ellipsis {
40+
overflow: visible;
41+
text-overflow: clip;
42+
}
43+
44+
@media screen and (max-width: 44em) {
45+
.footer-meta {
46+
flex-direction: column;
47+
align-items: stretch;
48+
}
49+
50+
.footer-meta__right {
51+
display: flex;
52+
justify-content: flex-end;
53+
margin-left: 0;
54+
}
55+
}

mkdocs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
site_name: Python Time & Space Complexity
22
site_description: Comprehensive documentation of time and space complexity for Python built-ins and standard library
33
site_url: https://pythoncomplexity.com
4+
repo_url: https://github.com/heikkitoivonen/python-time-space-complexity
5+
repo_name: GitHub
46

57
theme:
68
name: material
9+
custom_dir: docs/overrides
710
features:
811
- navigation.instant
912
- navigation.tracking
@@ -384,8 +387,7 @@ extra:
384387
analytics:
385388
provider: google
386389
property: G-7QJ6R1ZTRV
387-
social:
388-
- icon: fontawesome/brands/github
389-
link: https://github.com/heikkitoivonen/python-time-space-complexity
390+
extra_css:
391+
- stylesheets/extra.css
390392

391393
copyright: Copyright &copy; 2026

0 commit comments

Comments
 (0)