New talkspace script. Added a bunch of templates as backup.
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if external_course_url != '' %}
|
||||
{% if external_course_url != '' and external_course_url != null %}
|
||||
<a
|
||||
class="np-top-button np-button-font-color np-button np-button-big"
|
||||
href="{{external_course_url}}"
|
||||
|
||||
@ -4,11 +4,11 @@
|
||||
{%- comment -%} Catalog is not used in this school. The "catalog" is the set of unstarted enrolled courses shown at the homepage {%- endcomment -%}
|
||||
<div class="np-catalog-courses row row-with-thumbnails">
|
||||
{% for course in courses.enrolled %}
|
||||
{% unless course.progress > 0 %}
|
||||
<div class="col-xs-12 col-sm-6 col-lg-3 np-stretch-content course-card-wrapper" data-product="{{ course.properties.product_names_for_course_cards}}">
|
||||
{%- comment -%} {% include "cards_course" with course, flag: 'catalog' %} {%- endcomment -%}
|
||||
{% include "cards_course" with course, flag: 'null' %}
|
||||
</div>
|
||||
{% endunless %}
|
||||
{%- comment -%} {% unless course.progress > 0 %}
|
||||
{% endunless %} {%- endcomment -%}
|
||||
<div class="col-xs-12 col-sm-6 col-lg-3 np-stretch-content course-card-wrapper" data-product="{{ course.properties.product_names_for_course_cards}}">
|
||||
{%- comment -%} {% include "cards_course" with course, flag: 'catalog' %} {%- endcomment -%}
|
||||
{% include "cards_course" with course, flag: 'null' %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@ -60,48 +60,46 @@
|
||||
}
|
||||
|
||||
let filterByProduct = () => {
|
||||
let filter = event.target.value.toLowerCase();
|
||||
filter = filter.replaceAll(' ', '+');
|
||||
filter = filter.replaceAll('&', '%26');
|
||||
console.log(filter);
|
||||
//let filter = event.target.value.toLowerCase();
|
||||
//filter = filter.replaceAll(' ', '+');
|
||||
//filter = filter.replaceAll('&', '%26');
|
||||
//console.log(filter);
|
||||
|
||||
//window.location.assign(`https://newacademy.anthology.com/app/search/23777883-6b85-449d-8d25-2e548c6e9ecc?q=${filter}`);
|
||||
|
||||
window.location.assign(`https://newacademy.anthology.com/app/search/23777883-6b85-449d-8d25-2e548c6e9ecc?q=${filter}`);
|
||||
let allLearning = document.querySelector('.np-catalog-courses').children;
|
||||
|
||||
//let allLearning = document.querySelector('.np-catalog-courses').children;
|
||||
for(let i = 0; i < allLearning.length; i++){
|
||||
if(event.target.value == 'Default'){
|
||||
|
||||
//for(let i = 0; i < allLearning.length; i++){
|
||||
// if(event.target.value == 'Default'){
|
||||
if(!allLearning[i].classList.contains('hidden-by-search')){
|
||||
allLearning[i].style.display = 'block';
|
||||
}
|
||||
allLearning[i].classList.remove('filtered')
|
||||
} else {
|
||||
if(allLearning[i].dataset.product != event.target.value){
|
||||
allLearning[i].style.display = 'none';
|
||||
allLearning[i].classList.add('filtered');
|
||||
} else {
|
||||
if(!allLearning[i].classList.contains('hidden-by-search')){
|
||||
allLearning[i].style.display = 'block';
|
||||
}
|
||||
allLearning[i].classList.remove('filtered');
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// if(!allLearning[i].classList.contains('hidden-by-search')){
|
||||
// allLearning[i].style.display = 'block';
|
||||
// }
|
||||
// allLearning[i].classList.remove('filtered')
|
||||
// } else {
|
||||
|
||||
// if(allLearning[i].dataset.product != event.target.value){
|
||||
// allLearning[i].style.display = 'none';
|
||||
// allLearning[i].classList.add('filtered');
|
||||
// } else {
|
||||
// if(!allLearning[i].classList.contains('hidden-by-search')){
|
||||
// allLearning[i].style.display = 'block';
|
||||
// }
|
||||
// allLearning[i].classList.remove('filtered');
|
||||
// };
|
||||
// };
|
||||
//};
|
||||
|
||||
//for(let i = 0; i < popular.length; i++){
|
||||
// if(event.target.value == 'Default'){
|
||||
// popular[i].style.display = 'block';
|
||||
// } else {
|
||||
// if(popular[i].dataset.product != event.target.value){
|
||||
// popular[i].style.display = 'none';
|
||||
// } else {
|
||||
// popular[i].style.display = 'block';
|
||||
// };
|
||||
// };
|
||||
//};
|
||||
for(let i = 0; i < popular.length; i++){
|
||||
if(event.target.value == 'Default'){
|
||||
popular[i].style.display = 'block';
|
||||
} else {
|
||||
if(popular[i].dataset.product != event.target.value){
|
||||
popular[i].style.display = 'none';
|
||||
} else {
|
||||
popular[i].style.display = 'block';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
{% elsif page == 'Dashboard' %}
|
||||
if(allProductTypesDash.length > 1){
|
||||
|
||||
@ -136,9 +136,9 @@
|
||||
|
||||
{%- comment -%} Desktop Profile Button {%- endcomment -%}
|
||||
<div class="np-hidden-mobile np-header-avatar">
|
||||
<a class="header-survey-link" href="https://baseline.campuslabs.com/htu/beta" target="_blank">
|
||||
{%- comment -%} <a class="header-survey-link" href="https://baseline.campuslabs.com/htu/beta" target="_blank">
|
||||
Tell Us What You Think!
|
||||
</a>
|
||||
</a> {%- endcomment -%}
|
||||
|
||||
<button
|
||||
class="np-header-avatar-button desktop-avatar-button"
|
||||
|
||||
@ -63,9 +63,8 @@
|
||||
|
||||
<div class="search-and-filter-component">
|
||||
<div class="catalog-search-component">
|
||||
{%- comment -%} <span style="color: #757575; margin-bottom: 10px; padding-left: 5px;">Search: </span> {%- endcomment -%}
|
||||
{%- comment -%} {% if current_person.email contains "+preview" %}
|
||||
<form data-test="desktop-search" class="catalog-search-wrapper">
|
||||
<span style="color: #757575; margin-bottom: 10px; padding-left: 5px;">Search: </span>
|
||||
<form data-test="desktop-search" class="catalog-search-wrapper">
|
||||
<input
|
||||
aria-label="search_topics"
|
||||
class="np-header-font-background-color catalog-search"
|
||||
@ -76,29 +75,6 @@
|
||||
/>
|
||||
<i class="far fa-search search-icon"></i>
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="{% route search %}" method="get" data-test="desktop-search" class="catalog-search-wrapper">
|
||||
<input
|
||||
aria-label="search_topics"
|
||||
class="np-header-font-background-color catalog-search"
|
||||
type="text"
|
||||
name="q"
|
||||
placeholder=""
|
||||
/>
|
||||
<i class="far fa-search search-icon"></i>
|
||||
</form>
|
||||
{% endif %} {%- endcomment -%}
|
||||
{%- comment -%} <form data-test="desktop-search" class="catalog-search-wrapper">
|
||||
<input
|
||||
aria-label="search_topics"
|
||||
class="np-header-font-background-color catalog-search"
|
||||
type="text"
|
||||
name="q"
|
||||
placeholder=""
|
||||
onkeyup="searchCourses()"
|
||||
/>
|
||||
<i class="far fa-search search-icon"></i>
|
||||
</form> {%- endcomment -%}
|
||||
</div>
|
||||
{%- comment -%} {% if current_person.email contains "+preview" %}
|
||||
<div class="catalog-filter-component">
|
||||
@ -275,6 +251,7 @@
|
||||
}
|
||||
|
||||
.catalog-search-wrapper{
|
||||
max-width: 600px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@ -291,7 +268,7 @@
|
||||
|
||||
.catalog-search{
|
||||
background-color: #fefefe;
|
||||
border: 1px solid #ce9dc7;
|
||||
border: 1px solid #aa7fb9;
|
||||
border-radius: 30px;
|
||||
font-weight: 400;
|
||||
height: 60px;
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
<main class="np-main np-box-container">
|
||||
<div class="np-box">
|
||||
{% include "header_minimal" %}
|
||||
<div role="alert" class="np-alert np-alert-global np-alert-info" style="background: #CCE9EE; line-height: 1.5;">
|
||||
<div class="np-alert-container uk-container uk-container-center" style="color: #066D84; font-size: 15px; font-weight: 700;">
|
||||
First Time Here? Sign Up for Your New Account!
|
||||
</div>
|
||||
<div class="np-alert-container uk-container uk-container-center" style="color: #066D84; font-size: 15px;">
|
||||
If you’ve had an account on our previous platforms, a new account must be created to join the updated Anthology Academy site. Click the 'Sign Up' link below to get started.
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
{% t shared.email_address %}
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
autofocus="autofocus"
|
||||
type="email"
|
||||
name="learner[email]"
|
||||
id="learner_email"
|
||||
>
|
||||
</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>
|
||||
@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
<label class="np-input-label" for="learner_email">
|
||||
{% t shared.email_address %}
|
||||
Campus or Work Email
|
||||
</label>
|
||||
<input
|
||||
class="np-input"
|
||||
@ -98,13 +98,13 @@
|
||||
} else {
|
||||
if(!document.querySelector('.invalid-domain-error')){
|
||||
let errorMessage = document.createElement('span');
|
||||
errorMessage.textContent = 'Please enter your work email'
|
||||
errorMessage.textContent = 'Please enter your Campus or Work email'
|
||||
errorMessage.classList.add('np-form-terms');
|
||||
errorMessage.classList.add('invalid-domain-error')
|
||||
|
||||
document.getElementById('sign-up-form').children[3].appendChild(errorMessage);
|
||||
document.getElementById('sign-up-button').classList.add('disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -121,4 +121,4 @@
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user