Skip to content

Commit

Permalink
fix: Add "documention" text to other parts of header
Browse files Browse the repository at this point in the history
  • Loading branch information
tillywoodfield committed Feb 13, 2025
1 parent 136f668 commit a1b2db3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 21 deletions.
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@
"fr": "Français",
"es": "Español",
},
# Uncomment below lines to display tool navigation
"tool_name": _("IATI Example Tool"),
"tool_url": "https://example.com/",
"tool_name": _("IATI Sphinx Theme"),
"tool_url": "https://github.com/IATI/sphinx-theme",
}

todo_include_todos = True
Expand Down
4 changes: 2 additions & 2 deletions iati_sphinx_theme/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

{% set tool_nav_items = [
{"text": theme_tool_name, "link": theme_tool_url},
{"text": theme_header_title_text, "link": pathto('', 1)},
{"text": theme_header_title_text + ": " + _("Documentation"), "link": pathto('', 1)},
] if theme_tool_name else [
{"text": theme_header_title_text, "link": pathto('', 1)},
{"text": theme_header_title_text + ": " + _("Documentation"), "link": pathto('', 1)},
]%}

<div class="iati-mobile-nav js-iati-mobile-nav">
Expand Down
8 changes: 7 additions & 1 deletion iati_sphinx_theme/locale/es/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-01-29 14:38+0200\n"
"POT-Creation-Date: 2025-02-13 10:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: es\n"
Expand Down Expand Up @@ -66,6 +66,12 @@ msgstr "Publicar datos"
msgid "Contact"
msgstr "Contacto"

#: iati_sphinx_theme/header.html:10 iati_sphinx_theme/header.html:12
#: iati_sphinx_theme/page.html:8 iati_sphinx_theme/page.html:18
#, fuzzy
msgid "Documentation"
msgstr "Documentación"

#: iati_sphinx_theme/header.html:19 iati_sphinx_theme/header.html:73
msgid "Menu"
msgstr "Menú"
Expand Down
8 changes: 7 additions & 1 deletion iati_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-01-29 14:38+0200\n"
"POT-Creation-Date: 2025-02-13 10:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: fr\n"
Expand Down Expand Up @@ -66,6 +66,12 @@ msgstr "Publier les données"
msgid "Contact"
msgstr "Contact"

#: iati_sphinx_theme/header.html:10 iati_sphinx_theme/header.html:12
#: iati_sphinx_theme/page.html:8 iati_sphinx_theme/page.html:18
#, fuzzy
msgid "Documentation"
msgstr "Documentation"

#: iati_sphinx_theme/header.html:19 iati_sphinx_theme/header.html:73
msgid "Menu"
msgstr "Menu"
Expand Down
7 changes: 6 additions & 1 deletion iati_sphinx_theme/locale/sphinx.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-01-29 14:38+0200\n"
"POT-Creation-Date: 2025-02-13 10:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -63,6 +63,11 @@ msgstr ""
msgid "Contact"
msgstr ""

#: iati_sphinx_theme/header.html:10 iati_sphinx_theme/header.html:12
#: iati_sphinx_theme/page.html:8 iati_sphinx_theme/page.html:18
msgid "Documentation"
msgstr ""

#: iati_sphinx_theme/header.html:19 iati_sphinx_theme/header.html:73
msgid "Menu"
msgstr ""
Expand Down
22 changes: 9 additions & 13 deletions iati_sphinx_theme/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

{%- block body %}
<nav class="iati-breadcrumb">
{% if theme_tool_name %}
{% if (pathto('', 1) != './') %}
<span class="iati-breadcrumb__previous">
<i class="iati-icon iati-icon--chevron-left"></i>
<a href="#" class="iati-breadcrumb-link">{{ theme_tool_name }}</a>
<a href="{{ pathto('', 1) }}" class="iati-breadcrumb-link">{{ theme_header_title_text }}: {{ _("Documentation") }}</a>
</span>
{% endif %}
<ol class="iati-breadcrumb__list">
{% if theme_tool_name %}
<li class="iati-breadcrumb-item">
<a href="{{ theme_tool_url }}" class="iati-breadcrumb-link">
{{ theme_tool_name }}
</a>
</li>
{% endif %}
{% if (theme_header_title_text != title) %}
<li class="iati-breadcrumb-item">
<a href="{{ pathto('', 1) }}" class="iati-breadcrumb-link">{{ _(theme_header_title_text) }}</a>
<a href="{{ theme_tool_url }}" class="iati-breadcrumb-link">
{{ theme_tool_name }}
</a>
</li>
{% endif %}
{% if (theme_header_title_text != title) or theme_tool_name %}
<li class="iati-breadcrumb-item">
<a href="{{ pathto('', 1) }}" class="iati-breadcrumb-link">{{ theme_header_title_text }}: {{ _("Documentation") }}</a>
</li>
{% if (pathto('', 1) != './') %}
<li class="iati-breadcrumb-item iati-breadcrumb-item--current">
<a aria-current="page" class="iati-breadcrumb-link">{{ title }}</a>
</li>
Expand Down

0 comments on commit a1b2db3

Please sign in to comment.