Datasnipper templates - redoing their header navigation.

This commit is contained in:
Norm Rasmussen
2024-09-26 17:32:26 -04:00
parent 691a199006
commit c61c1e4410
4 changed files with 58 additions and 39 deletions

View File

@ -7,8 +7,8 @@
document.title = `${defaultPageTitle} | Learning Paths`
} else if (window.location.pathname == "/app/training_events") {
document.title = `${defaultPageTitle} | Training Events`
} else if (window.location.pathname == "/app/upcoming-trainings") {
document.title = `${defaultPageTitle} | Upcoming Trainings`
//} else if (window.location.pathname == "/app/upcoming-trainings") {
// document.title = `${defaultPageTitle} | Upcoming Trainings`
}
</script>
@ -50,15 +50,20 @@
<div class="np-hidden-mobile np-header-desktop-nav">
<ul class="np-header-desktop-nav-list">
{% for link in navigations.sub_navigation %}
{% unless link.label == "Catalog" %}
{% comment %} {% unless link.label == "Catalog" %} {% endcomment %}
{% assign link_url = "" %}
{% comment %} {% if link.label == "Dashboard" %}
{% assign link_url = "/app/courses" %}
{% else %}
{% assign link_url = link.url %}
{% endif %} {% endcomment %}
<li class="np-header-desktop-nav-item">
<a href="{{ link.url }}" class="np-header-desktop-nav-link {% if link.label == "Events" %}np-button{% else %}np-header-font-color{% endif %} {% if link.label == "Catalog" %}link-dropdown{% endif %}">
<a href="{{ link.url }}" class="np-header-desktop-nav-link
{% if link.label == "Events" %}
TODO: This whole file needs to be cleaned up like cray.
TODO: Hide Events (/app/training_events) and only show /app/upcoming-trainings. Label should be Live Trainings.
np-button
{% else %}
np-header-font-color
{% endif %}
{% if link.label == "Catalog" %}
link-dropdown
{% endif %}">
{% if link.label == "Courses" or link.label == "Dashboard" %}
My Courses
{% elsif link.label == "Catalog" %}
@ -70,6 +75,7 @@
class="far fa-chevron-down"></i>
{% elsif link.label == "Events" %}
Live events
{% elsif link.label == "Learning Paths"}
{% else %}
{{ link.label }}
{% endif %}
@ -108,8 +114,9 @@
</div>
{% endif %} {% endcomment %}
</li>
{% endunless %}
{% comment %} {% endunless %} {% endcomment %}
{% endfor %}
{% comment %}
{% for website_navigation in navigations.header_navigations_external %}
<li class="np-header-desktop-nav-item">
<a
@ -119,7 +126,8 @@
{{ website_navigation.name }}
</a>
</li>
{% endfor %}
{% endfor %}
{% endcomment %}
</ul>
</div>
@ -255,4 +263,4 @@
padding-right: 0;
}
}
</style>
</style>