Skip to content

Commit

Permalink
Add announcement bar
Browse files Browse the repository at this point in the history
  • Loading branch information
hyandt committed Oct 30, 2023
1 parent 457e7d5 commit 7c25317
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 59 deletions.
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ theme:
features:
- navigation.tabs
- navigation.indexes
- announce.dismiss
- header.autohide
markdown_extensions:
- toc:
permalink: "#"
Expand Down
108 changes: 49 additions & 59 deletions overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,75 +1,65 @@
{% extends "base.html" %}

{% block announce %}
<!-- Add announcement here, including arbitrary HTML -->
{% endblock %}

{% block footer %}
<footer class="md-footer">

<!-- Link to previous and/or next page -->
{% if page.previous_page or page.next_page %}
<nav
class="md-footer__inner md-grid"
aria-label="{{ lang.t('footer.title') }}"
>
<nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}">

<!-- Link to previous page -->
{% if page.previous_page %}
{% set direction = lang.t("footer.previous") %}
<a
href="{{ page.previous_page.url | url }}"
class="md-footer__link md-footer__link--prev"
aria-label="{{ direction }}: {{ page.previous_page.title | e }}"
rel="prev"
>
<div class="md-footer__button md-icon">
{% include ".icons/material/arrow-left.svg" %}
</div>
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.previous_page.title }}
</div>
</div>
</a>
{% endif %}
<!-- Link to previous page -->
{% if page.previous_page %}
{% set direction = lang.t("footer.previous") %}
<a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev"
aria-label="{{ direction }}: {{ page.previous_page.title | e }}" rel="prev">
<div class="md-footer__button md-icon">
{% include ".icons/material/arrow-left.svg" %}
</div>
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.previous_page.title }}
</div>
</div>
</a>
{% endif %}

<!-- Link to next page -->
{% if page.next_page %}
{% set direction = lang.t("footer.next") %}
<a
href="{{ page.next_page.url | url }}"
class="md-footer__link md-footer__link--next"
aria-label="{{ direction }}: {{ page.next_page.title | e }}"
rel="next"
>
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.next_page.title }}
</div>
</div>
<div class="md-footer__button md-icon">
{% include ".icons/material/arrow-right.svg" %}
</div>
</a>
{% endif %}
</nav>
<!-- Link to next page -->
{% if page.next_page %}
{% set direction = lang.t("footer.next") %}
<a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next"
aria-label="{{ direction }}: {{ page.next_page.title | e }}" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.next_page.title }}
</div>
</div>
<div class="md-footer__button md-icon">
{% include ".icons/material/arrow-right.svg" %}
</div>
</a>
{% endif %}
</nav>
{% endif %}
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<a href="https://www.nrel.gov/computational-science/"
title="Computational Science at NREL">Computational Science at NREL</a><br>
<a href="https://www.nrel.gov/hpc/about-hpc.html" target="_blank"
title="About NREL High-Performance Computing">About NREL High-Performance Computing</a><br>
<a href="https://www.nrel.gov/hpc/contact-us.html" target="_blank"
title="Contact Us">Contact Us</a><br>
<a href="https://www.nrel.gov/computational-science/" title="Computational Science at NREL">Computational
Science at NREL</a><br>
<a href="https://www.nrel.gov/hpc/about-hpc.html" target="_blank"
title="About NREL High-Performance Computing">About NREL High-Performance Computing</a><br>
<a href="https://www.nrel.gov/hpc/contact-us.html" target="_blank" title="Contact Us">Contact Us</a><br>
</div>
</div>
</div>
<footer>
{% endblock %}


<footer>
{% endblock %}

0 comments on commit 7c25317

Please sign in to comment.