This commit is contained in:
Norm Rasmussen
2022-08-30 17:15:34 -04:00
parent a48b951b26
commit 486665f48f
71 changed files with 3065 additions and 3244 deletions

Binary file not shown.

View File

@ -9,6 +9,7 @@
class="np-card-image"
alt="{{ course.name }}"
src="{{ course.image_url }}"
style="width: 100%;"
>
</div>
<div class="np-card-text-wrapper" style="border: none !important;">

View File

@ -113,4 +113,11 @@
<script>
$(".np-footer-navigation-link[href='https://change_to_mail.com'").attr("href", "mailto:support@northpass.com")
</script>
</script>
<script>
if(document.referrer == 'https://academy.scenariocloud.com/auth/auth_url_email/login'){
console.log('Redirecting to Homepage');
window.location.href = '/app';
}
</script>

View File

@ -22,7 +22,7 @@
</button>
{% endif %}
</div>
{% comment %}{% if current_school.logo_url %}
{% if current_school.logo_url %}
<h1 class="np-header-logo">
<a href="{% route home %}">
<img
@ -36,7 +36,7 @@
<a href="{% route home %}" class="np-school-name np-header-font-color">
{{ current_school.name }}
</a>
{% endif %}{% endcomment %}
{% endif %}
<div class="np-hidden-mobile np-header-desktop-nav">
<ul class="np-header-desktop-nav-list">
@ -100,7 +100,6 @@
class="np-header-avatar-tooltip-navigation-link"
href="{% route account %}"
>
{% comment %}{% t .profile_settings %}{% endcomment %}
Profile Settings
</a>
{% endunless %}
@ -108,7 +107,6 @@
class="np-header-avatar-tooltip-navigation-link np-danger"
href="{% route logout %}"
>
{% comment %}{% t .sign_out %}{% endcomment %}
Sign Out
</a>
</nav>
@ -168,14 +166,14 @@
class="np-header-mobile-menu-content-button"
href="{% route account %}"
>
{% t .profile_settings %}
Profile Settings
</a>
{% endunless %}
<a
class="np-header-mobile-menu-content-button np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
Sign Out
</a>
</div>
</div>

View File

@ -0,0 +1,17 @@
<header class="np-box-header">
<a class="np-box-header-link" href="{% route home %}">
{% if current_school.logo_url %}
<img
alt="{{ current_school.name }}"
src="{{ current_school.logo_url }}"
class="np-box-header-logo"
/>
{% else %}
<span class="np-school-name np-header-font-color">
{{ current_school.name }}
</span>
{% endif %}
</a>
</header>
{% include "messages" %}

View File

@ -0,0 +1,208 @@
<header class="np-header np-header-color" style="background: #fafafa; border: none; height: 3.5rem;">
<div class="np-header-content">
<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 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"
>
{{ website_navigation.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% if current_person.signed_in? %}
<div class="np-hidden-mobile np-header-search np-header-search-expanded">
<form action="{% route search %}" method="get" data-test="desktop-search">
<input
aria-label="{% t .search %}"
class="np-header-search-input np-header-font-background-color"
type="text"
name="q"
placeholder="{% t .search %}"
/>
<i class="np-header-search-icon far fa-search"></i>
</form>
</div>
<div class="np-hidden-mobile np-header-avatar">
<button
class="np-header-avatar-button"
data-test="open-desktop-menu"
data-toggle-class-on-target="np-hidden"
data-toggle-target=".np-header-avatar-tooltip"
data-toggle-outside
>
<img
alt="{{ current_person.name }}"
class="np-header-avatar-image"
src="{{ current_person.avatar_url }}"
>
</button>
<div class="np-header-avatar-tooltip np-hidden" role="tooltip">
<span class="np-header-avatar-tooltip-arrow-up"></span>
<div class="np-header-avatar-tooltip-learner">
<div class="np-header-avatar-tooltip-learner-name">
{{ current_person.name }}
</div>
<div class="np-header-avatar-tooltip-learner-email">
{{ current_person.email }}
</div>
</div>
<nav class="np-header-avatar-tooltip-navigation">
<a class="np-header-avatar-tooltip-navigation-link" onclick="buildURL(window.location.pathname)" style="cursor:pointer">
Default
</a>
{% unless current_school.sso_active? %}
<a
class="np-header-avatar-tooltip-navigation-link"
href="{% route account %}"
>
Profile Settings
</a>
{% endunless %}
<a
class="np-header-avatar-tooltip-navigation-link np-danger"
href="{% route logout %}"
>
Sign Out
</a>
</nav>
</div>
</div>
{% else %}
<a
class="np-header-sign-in np-header-desktop-nav-link np-header-font-color"
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 %}"
>
Profile Settings
</a>
{% endunless %}
<a
class="np-header-mobile-menu-content-button np-danger"
href="{% route logout %}"
>
Sign Out
</a>
</div>
</div>
</div>
<div class="np-homepage-hero" style="background: #34abe2; z-index: -1; margin-top: -8rem; padding-top: 0.5rem;">
<img class="np-homepage-hero-image"
src="#"
alt="{{ homepage.headline }}"
/>
<div class="np-homepage-hero-content">
<div class="np-homepage-headline np-header-font-color">
{{ homepage.headline }}
</div>
<div class="np-homepage-subheadline np-header-font-color">
{{ homepage.subheadline }}
</div>
</div>
</div>
<main class="np-main np-subpage-container np-account">
<div class="np-hidden-desktop">
{% include "account_mobile_view", form: form %}
</div>
<div class="np-hidden-mobile np-flex np-flex-center">
{% include "account_desktop_view", form: form %}
</div>
</main>
{% include "footer" %}

View File

@ -0,0 +1,101 @@
<main class="np-box-container np-open-access">
<div class="np-box">
{% include "header_minimal" %}
<div class="np-box-content-container">
<form class="np-form np-box-content" action="{{ form.url }}" method="get" novalidate>
{% form_authenticity_token %}
<div class="np-form-headline">
{% t shared.welcome_to_school, school_name: current_school.name %}
</div>
<div class="np-form-subheadline">
{% t .headline, key: current_school.course_vocabulary %}
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_first_name">
{% t shared.first_name %}
</label>
<input
class="np-input"
autofocus="autofocus"
type="text"
name="first_name"
id="learner_first_name"
value="{{ form.first_name }}"
/>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_last_name">
{% t shared.last_name %}
</label>
<input
class="np-input"
type="text"
name="last_name"
id="learner_last_name"
value="{{ form.last_name }}"
/>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_email">
Company Email
</label>
<input
class="np-input"
type="text"
name="email"
id="learner_email"
value="{{ form.email }}"
/>
</div>
<p style="display: none;" id="bad_email_alert">PLEASE ENTER YOUR COMPANY EMAIL</p>
<input
type="submit"
name="commit"
value="{% t shared.enter %}"
id="submit_button"
class="np-button np-button-big np-form-action"
/>
</form>
</div>
</div>
</main>
<script>
// document.getElementById("header").scrollIntoView();
function checkIfInputsExist (){
window.setTimeout(function(){
// Regular expression to check if string is email
const regexExp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
// Grabs Email Address Value
const learnerEmail = $("#learner_email")[0].value;
if ($("#learner_email")[0].value.length > 0){
if(regexExp.test(learnerEmail) == true){
if ($("#learner_email")[0].value.includes('@scenariocloud.com')){
$("#learner_email").css("background", "#f2f4f5");
$("#bad_email_alert").css("display", "none");
$("#submit_button").css("pointer-events", "auto");
}
else {
$("#learner_email").css("background", "salmon");
$("#bad_email_alert").css("color", "#f2f4f5");
$("#bad_email_alert").css("display", "block");
$("#submit_button").css("pointer-events","none");
}
} else {
$("#learner_email").css("background", "#f2f4f5");
$("#bad_email_alert").css("display", "none");
$("#submit_button").css("pointer-events", "auto");
}
}
}, 500)
}
document.addEventListener('keyup', checkIfInputsExist);
console.log(123213213);
</script>
<style>
.np-input-label{
color: #ffffff;
}
</style>

View File

@ -1,4 +1,4 @@
<header class="np-header np-header-color" style="background: transparent; border: none;">
<header class="np-header np-header-color" style="background: #fafafa; border: none; height: 3.5rem;">
<div class="np-header-content">
<div class="np-hidden-desktop np-header-mobile-menu-nav">
{% if current_person.signed_in? %}
@ -22,6 +22,21 @@
</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">
@ -85,14 +100,14 @@
class="np-header-avatar-tooltip-navigation-link"
href="{% route account %}"
>
{% t .profile_settings %}
Profile Settings
</a>
{% endunless %}
<a
class="np-header-avatar-tooltip-navigation-link np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
Sign Out
</a>
</nav>
</div>
@ -151,14 +166,14 @@
class="np-header-mobile-menu-content-button"
href="{% route account %}"
>
{% t .profile_settings %}
Profile Settings
</a>
{% endunless %}
<a
class="np-header-mobile-menu-content-button np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
Sign Out
</a>
</div>
</div>
@ -167,7 +182,7 @@
{% include "messages" %}
{% include "course_version_outdated_alert", courses: courses.enrolled %}
<div class="np-homepage-hero" style="background: #34abe2; z-index: -1; margin-top: -8rem;">
<div class="np-homepage-hero" style="background: #34abe2; z-index: -1; margin-top: -8rem; padding-top: 0.5rem;">
<img class="np-homepage-hero-image"
src="{{ homepage.artwork_url }}"
alt="{{ homepage.headline }}"

View File

@ -2,12 +2,12 @@
{% include "course_version_outdated_alert", courses: courses.featured %}
<main class="np-main np-homepage">
{% comment %}<div class="np-homepage-hero" >{% endcomment %}
<div class="np-homepage-hero" style="background: #34abe2; ">
<div class="np-homepage-hero" style="background: #34abe2; top: -1.95rem; height: 14.8rem;">
<img class="np-homepage-hero-image"
src="{{ homepage.artwork_url }}"
alt="{{ homepage.headline }}"
/>
<div class="np-homepage-hero-content">
<div class="np-homepage-hero-content homepage-only-hero">
<div class="np-homepage-headline np-header-font-color">
{{ homepage.headline }}
</div>
@ -29,9 +29,11 @@
{% if courses.in_catalog.any? %}
<div class="np-homepage-featured-courses row">
{% for course in courses.in_catalog %}
<div class="col-xs-12 coul-sm-8 col-md-12" style="margin:auto;">
{% include "cards_featured_course" with course %}
</div>
{% if course.name == 'Scenario Basics' or course.name == 'Core Concepts' %}
<div class="col-xs-12 coul-sm-8 col-md-12" style="margin:auto;">
{% include "cards_featured_course" with course %}
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
@ -155,3 +157,6 @@
<script>
$(".np-sub-navigation-content-item-link:contains('Home')").parent().addClass("np-sub-navigation-content-item-active")
</script>
<script>
console.log(window.location.href);
</script>

View File

@ -0,0 +1,54 @@
<main class="np-main np-box-container">
<div class="np-box">
{% include "header_minimal" %}
<div class="np-box-content-container">
<form class="np-form np-box-content" action="{% route login %}" method="post" novalidate>
{% form_authenticity_token %}
<div class="np-form-field">
<label class="np-input-label" for="learner_email">
Company Email
</label>
<input
class="np-input"
autofocus="autofocus"
type="email"
name="learner[email]"
id="learner_email"
>
<p class="enter-label">Please use the email you use for Scenario</p>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_password">
{% t shared.password %}
</label>
<input
class="np-input"
type="password"
name="learner[password]"
id="learner_password"
>
</div>
<button type="submit" class="np-button np-button-big np-button-large-font np-form-action">
{% t shared.sign_in %}
</button>
<a class="np-form-link np-button-color" href="{% route forgot_password_new %}">
{% t .forgot_password %}
</a>
{% if features.account_creation? %}
<a class="np-form-link np-button-color" href="{% route sign_up %}">
{% t shared.sign_up %}
</a>
{% endif %}
{% if features.request_access? %}
<a
class="np-form-link np-button-color"
target="_blank"
href="{{ current_school.request_access_link }}"
>
{{ current_school.request_access_label }}
</a>
{% endif %}
</form>
</div>
</div>
</main>

View File

@ -0,0 +1,73 @@
<main class="np-main np-box-container">
<div class="np-box">
{% include "header_minimal" %}
<div class="np-box-content-container">
<form class="np-form np-box-content" action="{% route sign_up %}" method="post" novalidate>
<div class="np-form-title"> {% t .create_account %} </div>
{% form_authenticity_token %}
<div class="np-form-flex-desktop">
<div class="np-form-field">
<label class="np-input-label" for="learner_first_name">
{% t shared.first_name %}
</label>
<input
class="np-input"
autofocus="autofocus"
type="text"
name="learner[first_name]"
id="learner_first_name"
>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_last_name">
{% t shared.last_name %}
</label>
<input
class="np-input"
type="text"
name="learner[last_name]"
id="learner_last_name"
>
</div>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_email">
Company Email
</label>
<input
class="np-input"
autofocus="autofocus"
type="email"
name="learner[email]"
id="learner_email"
>
<p class="enter-label">Please use the email you use for Scenario</p>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_password">
{% t shared.password %}
</label>
<input
class="np-input"
type="password"
name="learner[password]"
id="learner_password"
>
</div>
<button type="submit" class="np-button np-button-big np-button-large-font np-form-action">
{% t shared.sign_up %}
</button>
<span class="np-form-terms">
{% t .terms %}
<a
class="np-form-link np-button-color"
target="_blank"
href="{{ current_school.terms_of_service_url }}"
>
{% t .terms_link %}
</a>
</span>
</form>
</div>
</div>
</main>

View File

@ -197,9 +197,15 @@ div {
}
.np-homepage-hero-content {
padding: 2.25rem 2.5rem;
padding: 5rem 2.5rem;
padding-bottom: 3rem;
bottom: 0;
}
.homepage-only-hero{
padding-bottom: 1.5rem !important;
}
.np-homepage-featured-text {
padding: 0 2rem 2rem;
}
@ -433,6 +439,12 @@ div {
text-transform: uppercase;
}
.enter-label{
margin-top: 0;
font-size: 10px;
font-weight: 700;
}
/*
2.7 - LEARNING PATH COVER PAGE
*/
@ -466,8 +478,13 @@ div {
.np-header.np-header-absolute {
position: absolute;
background: transparent;
background: #fafafa;
border-bottom: none;
height: 3.5rem;
}
.np-header-search-icon{
color: #002532;
}
@media (min-width: 768px) {

View File

@ -1,4 +1,4 @@
<header class="np-header np-header-color" style="background: transparent; border: none;">
<header class="np-header np-header-color" style="background: #fafafa; border: none; height: 3.5rem;">
<div class="np-header-content">
<div class="np-hidden-desktop np-header-mobile-menu-nav">
{% if current_person.signed_in? %}
@ -22,6 +22,21 @@
</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">
@ -85,14 +100,14 @@
class="np-header-avatar-tooltip-navigation-link"
href="{% route account %}"
>
{% t .profile_settings %}
Profile Settings
</a>
{% endunless %}
<a
class="np-header-avatar-tooltip-navigation-link np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
Sign Out
</a>
</nav>
</div>
@ -151,14 +166,14 @@
class="np-header-mobile-menu-content-button"
href="{% route account %}"
>
{% t .profile_settings %}
Profile Settings
</a>
{% endunless %}
<a
class="np-header-mobile-menu-content-button np-danger"
href="{% route logout %}"
>
{% t .sign_out %}
Sign Out
</a>
</div>
</div>
@ -167,7 +182,7 @@
{% include "messages" %}
{% include "course_version_outdated_alert", courses: courses.enrolled %}
<div class="np-homepage-hero" style="background: #34abe2; z-index: -1; margin-top: -8rem;">
<div class="np-homepage-hero" style="background: #34abe2; z-index: -1; margin-top: -8rem; padding-top: 0.5rem;">
<img class="np-homepage-hero-image"
src="{{ homepage.artwork_url }}"
alt="{{ homepage.headline }}"