218 lines
6.5 KiB
Plaintext
218 lines
6.5 KiB
Plaintext
<script>
|
|
const defaultPageTitle = document.title
|
|
|
|
if (window.location.pathname == "/app/dashboard") {
|
|
document.title = `${defaultPageTitle} | My Courses `
|
|
} else if (window.location.pathname == "/app/learning_paths") {
|
|
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`
|
|
}
|
|
</script>
|
|
|
|
<header class="np-header np-header-color">
|
|
<div class="np-header-content np-max-width">
|
|
<div class="np-hidden-desktop np-header-mobile-menu-nav">
|
|
{% if current_person.signed_in? %}
|
|
<button
|
|
data-toggle-class="np-hidden"
|
|
class="np-header-mobile-menu-nav-button fal fa-times np-hidden np-header-font-color"
|
|
data-toggle-target=".np-header-mobile-avatar-menu,.np-header-mobile-menu-content, .np-main, .np-footer"></button>
|
|
<button
|
|
data-test="open-mobile-menu"
|
|
data-toggle-class="np-hidden"
|
|
class="np-header-mobile-menu-nav-button np-header-mobile-avatar-menu"
|
|
data-toggle-target=".fa-times, .np-header-mobile-menu-content, .np-main, .np-footer">
|
|
<img
|
|
alt="{{ current_person.name }}"
|
|
class="np-header-avatar-image"
|
|
src="{{ current_person.avatar_url }}" />
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
{% if current_school.logo_url %}
|
|
<h1 class="np-header-logo">
|
|
<a href="{% route home %}">
|
|
<img
|
|
alt="{{ current_school.name }}"
|
|
class="np-header-logo-image"
|
|
src="{{ current_school.logo_url }}" />
|
|
</a>
|
|
</h1>
|
|
{% else %}
|
|
<a href="{% route home %}" class="np-school-name np-header-font-color">
|
|
{{ current_school.name }}
|
|
</a>
|
|
{% endif %}
|
|
|
|
<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 == "Events" %}
|
|
{% assign link_url = "" %}
|
|
{% if link.label == "Dashboard" %}
|
|
<li class="np-header-desktop-nav-item">
|
|
<a href="{{ link.url }}" class="np-header-desktop-nav-link np-header-font-color"> My Courses </a></li>
|
|
{% elsif link.label == "Learning Paths" %}
|
|
<li class="np-header-desktop-nav-item">
|
|
<a href="{{ link.url }}" class="np-header-desktop-nav-link np-header-font-color" style="visibility:hidden"></a></li>
|
|
{% else %}
|
|
<li class="np-header-desktop-nav-item" >
|
|
<a href="{{ link.url }}" class="np-header-desktop-nav-link np-header-font-color" >{{ link.label }}</a></li>
|
|
{% endif %}
|
|
{% endunless %}
|
|
{% endfor %}
|
|
<li class="np-header-desktop-nav-item">
|
|
<a href="/app/upcoming-trainings" class="np-header-desktop-nav-link np-button button-purple">
|
|
Live trainings
|
|
</a>
|
|
</li>
|
|
{% for website_navigation in navigations.header_navigations_external %}
|
|
<li class="np-header-desktop-nav-item">
|
|
<a
|
|
href="{{ website_navigation.path }}"
|
|
class="np-header-desktop-nav-link np-header-font-color"
|
|
target="_blank">
|
|
Live Sessions
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% if current_person.signed_in? %}
|
|
{% else %}
|
|
<a
|
|
class="np-header-sign-in np-header-desktop-nav-link np-header-font-color"
|
|
aria-label="{% t shared.sign_in %}"
|
|
href="{% route login %}">
|
|
{% t shared.sign_in %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</header>
|
|
|
|
<div class="np-hidden-desktop">
|
|
<div class="np-header-mobile-menu-content np-hidden">
|
|
{% if current_person.signed_in? %}
|
|
<img
|
|
alt="{{ current_person.name }}"
|
|
class="np-header-mobile-menu-content-avatar"
|
|
src="{{ current_person.avatar_url }}" />
|
|
<div class="np-header-mobile-menu-content-name">
|
|
{{ current_person.name }}
|
|
</div>
|
|
{% endif %}
|
|
<div class="np-header-mobile-menu-content-nav">
|
|
<form
|
|
class="np-header-search"
|
|
data-test="mobile-search"
|
|
method="get"
|
|
action="{% route search %}">
|
|
<input
|
|
aria-label="{% t .search %}"
|
|
class="np-header-search-input"
|
|
type="text"
|
|
name="q"
|
|
placeholder="{% t .search %}" />
|
|
<i class="np-header-search-icon far fa-search"></i>
|
|
</form>
|
|
{% for website_navigation in navigations.header_navigations %}
|
|
<a
|
|
href="{{ website_navigation.path }}"
|
|
class="np-header-mobile-menu-content-button"
|
|
{% if website_navigation.external? %}
|
|
target="_blank"
|
|
{% endif %}>
|
|
{{ website_navigation.name }}
|
|
</a>
|
|
{% endfor %}
|
|
<div class="np-header-mobile-menu-content-line"></div>
|
|
{% unless current_school.sso_active? %}
|
|
<a class="np-header-mobile-menu-content-button" href="{% route account %}">
|
|
{% t.profile_settings %}
|
|
</a>
|
|
{% endunless %}
|
|
<a class="np-header-mobile-menu-content-button np-danger" href="{% route logout %}">
|
|
{% t.sign_out %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% include "messages" %}
|
|
|
|
<style>
|
|
|
|
.np-header-desktop-nav-list {
|
|
align-items: center;
|
|
}
|
|
|
|
.np-header-desktop-nav-item {
|
|
position: relative;
|
|
}
|
|
|
|
.np-header-desktop-nav-item .np-header-desktop-nav-link {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
line-height: 24px;
|
|
letter-spacing: -0.18px;
|
|
position: relative;
|
|
}
|
|
|
|
.np-header-desktop-nav-link.np-button {
|
|
display: inline-flex;
|
|
color: #fff;
|
|
}
|
|
|
|
.np-header-desktop-nav-link.link-dropdown i.np-hidden {
|
|
display: inline-block !important;
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.np-catalog-dropdown-content {
|
|
position: absolute;
|
|
top: 78px;
|
|
background-color: #011638;
|
|
z-index: 50;
|
|
padding: 24px;
|
|
width: 209px;
|
|
right: 0;
|
|
border-radius: 8px;
|
|
color: #fff;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.np-dropdown-search-input {
|
|
padding: 10px 14px 10px 34px;
|
|
border-radius: 8px;
|
|
width: 100%;
|
|
border: none;
|
|
}
|
|
|
|
.dropdown-category-link {
|
|
color: #E7E9F5;
|
|
text-decoration: none;
|
|
display: block;
|
|
margin: 14px 0 6px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.np-header-search svg {
|
|
position: absolute;
|
|
top: 8px;
|
|
left: 8px;
|
|
}
|
|
|
|
@media screen and (min-width: 768px) {
|
|
.np-header {
|
|
height: 100px;
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
}
|
|
}
|
|
</style>
|