75 lines
2.8 KiB
HTML
75 lines
2.8 KiB
HTML
## mako
|
|
|
|
<%page expression_filter="h"/>
|
|
|
|
<%namespace name='static' file='../static_content.html'/>
|
|
<%namespace file='../main.html' import="login_query"/>
|
|
|
|
<%!
|
|
from django.conf import settings
|
|
from django.urls import reverse
|
|
from django.utils.translation import ugettext as _
|
|
from six import text_type
|
|
|
|
from openedx.core.djangoapps.user_authn.toggles import should_redirect_to_authn_microfrontend
|
|
%>
|
|
|
|
<%
|
|
mktg_site_enabled = static.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False))
|
|
courses_are_browsable = settings.FEATURES.get('COURSES_ARE_BROWSABLE')
|
|
allows_login = not settings.FEATURES['DISABLE_LOGIN_BUTTON'] and not combined_login_and_register
|
|
can_discover_courses = settings.FEATURES.get('ENABLE_COURSE_DISCOVERY')
|
|
allow_public_account_creation = static.get_value('ALLOW_PUBLIC_ACCOUNT_CREATION', settings.FEATURES.get('ALLOW_PUBLIC_ACCOUNT_CREATION'))
|
|
should_redirect_to_authn_mfe = should_redirect_to_authn_microfrontend()
|
|
%>
|
|
<nav class="nav-links" aria-label=${_("Supplemental Links")}>
|
|
<div class="main">
|
|
% if mktg_site_enabled:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a href="${marketing_link('HOW_IT_WORKS')}">${_("How it Works")}</a>
|
|
</div>
|
|
% if courses_are_browsable:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a href="${marketing_link('COURSES')}">${_("Courses")}</a>
|
|
</div>
|
|
% endif
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a href="${marketing_link('SCHOOLS')}">${_("Schools")}</a>
|
|
</div>
|
|
% endif
|
|
% if allows_login:
|
|
% if can_discover_courses:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a href="/courses">${_('Explore courses')}</a>
|
|
</div>
|
|
%endif
|
|
% endif
|
|
</div>
|
|
<div class="secondary">
|
|
<div>
|
|
% if allows_login:
|
|
% if allow_public_account_creation:
|
|
% if should_redirect_to_authn_mfe:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a class="register-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/register${login_query()}">${_("Register")}</a>
|
|
</div>
|
|
% else:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a class="register-btn btn" href="/register${login_query()}">${_("Register")}</a>
|
|
</div>
|
|
% endif
|
|
% endif
|
|
% if should_redirect_to_authn_mfe:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a class="sign-in-btn btn" href="${settings.AUTHN_MICROFRONTEND_URL}/login${login_query()}">${_("Sign in")}</a>
|
|
</div>
|
|
% else:
|
|
<div class="mobile-nav-item hidden-mobile nav-item">
|
|
<a class="sign-in-btn btn" href="/login${login_query()}">${_("Sign in")}</a>
|
|
</div>
|
|
% endif
|
|
% endif
|
|
</div>
|
|
</div>
|
|
</nav>
|