Skip to content

Commit f91e982

Browse files
fix(theme): correct topbar brand link and enforce no underline
- Updated the topbar brand anchor to use a static relative path (`../../index.html`) to ensure the link works correctly in the generated documentation. - Modified CSS for `.topbar-brand` to force `text-decoration: none!important` and added explicit rules for all link states, preventing underlines and ensuring consistent styling.
1 parent a44f836 commit f91e982

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

docs/python/source/_themes/ctoon/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
{# ── Topbar ───────────────────────────────────────────────────────────────── #}
2626
{%- block header %}
2727
<header class="topbar">
28-
<a class="topbar-brand" href="{{ pathto(master_doc|default('index')) }}">
28+
<a class="topbar-brand" href="../../index.html">
2929
{%- if logo_url %}
3030
<div class="topbar-logo"><img src="{{ logo_url|e }}" alt="CToon" width="36" height="36"></div>
3131
{%- endif %}

docs/python/source/_themes/ctoon/static/ctoon-sphinx.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ body {
7171
backdrop-filter: blur(12px);
7272
-webkit-backdrop-filter: blur(12px);
7373
}
74-
.topbar-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--fg); }
74+
.topbar-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none!important; color: var(--fg); }
75+
.topbar-brand a:link, .topbar-brand a:visited, .topbar-brand a:hover, .topbar-brand a:active { text-decoration: none!important; text-decoration-line: none!important; -moz-text-decoration-line: none!important;}
7576
.topbar-logo { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
7677
.topbar-logo svg { width: 100%; height: 100%; }
7778
.topbar-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; }

0 commit comments

Comments
 (0)