Scenario JS Snippet and Notes

This commit is contained in:
Norm Rasmussen
2023-01-16 07:18:26 -05:00
parent ebae6f1b05
commit 16bc77ceb7
14 changed files with 522 additions and 427 deletions

View File

@ -1,4 +1,4 @@
<header class="np-header np-header-color" >
<header class="np-header np-header-color">
<div class="np-header-content">
<div class="np-hidden-desktop np-header-mobile-menu-nav">
{% if current_person.signed_in? %}
@ -67,6 +67,9 @@
<i class="np-header-search-icon far fa-search"></i>
</form>
</div>
<div>
<a class='help-guide-link' href="https://help.scenariocloud.com/ENTERPRISE/" target="_blank">Help Guide</a>
</div>
<div class="np-hidden-mobile np-header-avatar">
<button
class="np-header-avatar-button"
@ -122,77 +125,24 @@
{% endif %}
</div>
</header>
<style>
.np-header {
background: #fafafa;
border: none;
height: 3.5rem;
margin-top: 3rem;
position: fixed;
}
<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 %}"
>
Profile Settings
</a>
{% endunless %}
<a
class="np-header-mobile-menu-content-button np-danger"
href="{% route logout %}"
>
Sign Out
</a>
</div>
</div>
</div>
{% include "messages" %}
<script>
if (window.location.pathname === "/app") {
const headerTag = document.querySelector(".np-header");
headerTag.classList.add("np-header-absolute");
}
$(".np-header-desktop-nav-link[href='https://change_to_mail.com'").attr("href", "mailto:support@northpass.com")
/*
function buildURL(path) {
const url = "https://academy.getpixel.io" + path + "?first_name={{current_person.first_name}}&last_name={{current_person.last_name}}&email={{current_person.email}}"
window.location.href = url
}
*/
</script>
.help-guide-link {
color: #2c4265;
font-size: 18px;
font-weight: 500;
margin: 0 15px;
text-decoration: none;
}
.help-guide-link:hover{
color: rgb(4, 173, 240);
}
</style>