Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,36 @@
border-bottom-color: var(--zz-muted-color);
}

/* ── Version fact in header source widget ─────────────────────────────────── */

/* Layout: repo name on row 1, stars+version on row 2 side by side */
.md-source__repository {
display: flex;
flex-wrap: wrap;
align-items: center;
row-gap: 0;
}

.zz-repo-name {
width: 100%; /* forces repo name onto its own line */
order: 0;
}

/* JS-injected stars/forks <ul>: row 2, left */
.md-source__repository > .md-source__facts:not(.zz-version-facts) {
order: 1;
margin-top: 0.1rem;
flex-shrink: 0;
}

/* Static version <ul>: row 2, right — separator via gap */
.zz-version-facts {
order: 2;
margin-top: 0.1rem;
margin-left: 0.4rem;
flex-shrink: 0;
}

/* ── Footer copyright ─────────────────────────────────────────────────────── */

.md-copyright__highlight {
Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ theme:
- navigation.indexes
- navigation.path
- navigation.top
- navigation.header.version
- navigation.footer
- search.highlight
- search.suggest
Expand Down Expand Up @@ -141,7 +142,7 @@ extra_css:
extra:
build_date: !ENV [BUILD_DATE, "dev"]
generator: false
project_version: "0.4.0rc4"
version: "0.4.0rc4"
social:
- icon: fontawesome/brands/github
link: https://github.com/PythonWoods/zenzic
Expand Down
23 changes: 23 additions & 0 deletions overrides/partials/source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{# SPDX-FileCopyrightText: 2026 PythonWoods <dev@pythonwoods.dev> #}
{# SPDX-License-Identifier: Apache-2.0 #}
{#
source.html — extends Material's default with a version fact row.
The version fact mirrors .md-source__facts (stars/forks) so it aligns
at the same left edge as those items (inside .md-source__repository).
#}
<a href="{{ config.repo_url }}" title="{{ lang.t('source') }}" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</div>
<div class="md-source__repository">
<span class="zz-repo-name">{{ config.repo_name }}</span>
{% if config.extra.version %}
<ul class="md-source__facts zz-version-facts">
<li class="md-source__fact md-source__fact--version">
{{ config.extra.version }}
</li>
</ul>
{% endif %}
</div>
</a>
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ replace = '__version__ = "{new_version}"'

[[tool.bumpversion.files]]
filename = "mkdocs.yml"
search = 'project_version: "{current_version}"'
replace = 'project_version: "{new_version}"'
search = 'version: "{current_version}"'
replace = 'version: "{new_version}"'

[[tool.bumpversion.files]]
filename = "CITATION.cff"
Expand Down
Loading