This is an automated email from the ASF dual-hosted git repository.
kamilbregula pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow-site.git
The following commit(s) were added to refs/heads/master by this push:
new 1cc642a Improve navbar customization (#310)
1cc642a is described below
commit 1cc642a4f86f3edf5df98ab8347da97bed241ce2
Author: Kamil BreguĊa <[email protected]>
AuthorDate: Tue Nov 24 13:22:15 2020 +0100
Improve navbar customization (#310)
* Improve navbar customization
* Update sphinx_airflow_theme/README.md
---
sphinx_airflow_theme/README.md | 23 ++++++++++++++++++++++
.../sphinx_airflow_theme/footer.html | 2 +-
.../sphinx_airflow_theme/header.html | 8 ++++----
3 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/sphinx_airflow_theme/README.md b/sphinx_airflow_theme/README.md
index f0f5535..1380d89 100644
--- a/sphinx_airflow_theme/README.md
+++ b/sphinx_airflow_theme/README.md
@@ -55,6 +55,29 @@ pip install
'https://github.com/apache/airflow-site/releases/download/v0.0.1/sph
Python packages for your PRs is available as downloadable artifact in GitHub
Actions after
the CI builds your PR.
+# Configuration
+
+A theme that supports the following configuration options:
+
+## `sphinx_airflow_theme_navbar_links`
+
+The list of links that should be available in the navigation bar at the top of
the pages. The order of items will not be changed.
+
+**Example values:**
+```
+[
+ {'href': '/docs/', 'text': 'Documentation'}
+]
+```
+
+## `sphinx_airflow_theme_hide_website_buttons`
+If ``True``, all links on the same domain but not pointing to this theme's
page (e.g. `/community/`) will be hidden.
+
+**Example values:**
+```
+False
+```
+
# Theme's source files
- `<ROOT DIRECTORY>/sphinx_airflow_theme/sphinx_airflow_theme` - HTML files
diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/footer.html
b/sphinx_airflow_theme/sphinx_airflow_theme/footer.html
index 73c656e..7da1316 100644
--- a/sphinx_airflow_theme/sphinx_airflow_theme/footer.html
+++ b/sphinx_airflow_theme/sphinx_airflow_theme/footer.html
@@ -123,7 +123,7 @@
<a href="https://www.apache.org/security/"
class="footer-section__policies-section--policy-item">
<span>Security</span>
</a>
- {% if hide_website_buttons %}
+ {% if not hide_website_buttons %}
<a href="/docs"
class="footer-section__policies-section--policy-item">
<span>Season of Docs</span>
diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/header.html
b/sphinx_airflow_theme/sphinx_airflow_theme/header.html
index d2cd138..cd533ab 100644
--- a/sphinx_airflow_theme/sphinx_airflow_theme/header.html
+++ b/sphinx_airflow_theme/sphinx_airflow_theme/header.html
@@ -56,13 +56,13 @@
<div class="navbar__links-container">
{% for link in navbar_links %}
- <a class="navbar__text-link" href="{{ link.href }}/">
+ <a class="navbar__text-link" href="{{ link.href }}">
{{ link.text }}
</a>
{% endfor %}
</div>
- {% if hide_website_buttons %}
+ {% if not hide_website_buttons %}
<a href="/docs/stable/start.html">
<button class="btn-filled
bodytext__medium--white">Install</button>
</a>
@@ -111,13 +111,13 @@
<div class="navbar__links-container">
{% for link in navbar_links %}
- <a class="navbar__text-link" href="{{ link.href
}}/">
+ <a class="navbar__text-link" href="{{ link.href
}}">
{{ link.text }}
</a>
{% endfor %}
</div>
- {% if hide_website_buttons %}
+ {% if not hide_website_buttons %}
<a href="/install/">
<button id="" class="btn-filled
bodytext__medium--white ">Install</button>