Figured out Workato recipe with Python node to reduce the scope of the original anthology flow.

This commit is contained in:
Norm Rasmussen
2023-11-05 20:52:25 -05:00
parent 2912377102
commit 1342c10ac8
29 changed files with 2040 additions and 595 deletions

View File

@ -1,3 +1,26 @@
{% if current_person.signed_in? == false %}
<script>
if (localStorage.getItem('registered') == true) {
localStorage.removeItem('registered')
} else {
window.location.href = '/app/sign-up-follow-up'
}
</script>
{% endif %}
{% if current_person.signed_in? and current_person.properties.learner_completed_additional_info == false %}
{% unless current_person.email contains '+preview-' %}
<script>
if (localStorage.getItem('learnerCompletedAdditionalInfo') != null) {
window.location.href = '/app/dashboard'
} else {
window.location.href = '/app/sign-up-follow-up'
}
</script>
{% endunless %}
{% endif %}
{%- comment -%} Desktop Header {%- endcomment -%}
<header class="np-header np-header-color">
<div class="np-header-content">
@ -58,7 +81,7 @@
</ul> {%- endcomment -%}
<div class="np-sub-navigation-content">
{% for link in navigations.sub_navigation %}
{% unless link.label == 'Catalog' %}
{% unless link.label == 'Catalog' or link.label == 'Learning Paths' %}
<div class="np-sub-navigation-content-item {{ link.active_class }}">
<a class="np-sub-navigation-content-item-link" href="{{ link.url }}">
<i class="{{ link.icon }} np-button-color np-sub-navigation-content-item-icon"></i>
@ -86,8 +109,14 @@
</form>
</div> {%- endcomment -%}
{%- 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">
Tell Us What You Think!
</a>
<button
class="np-header-avatar-button desktop-avatar-button"
data-test="open-desktop-menu"
@ -149,7 +178,7 @@
{%- comment -%} Mobile Header {%- endcomment -%}
<div class="np-hidden-desktop">
<div class="np-header-mobile-menu-content np-hidden">
{% if current_person.signed_in? %}
{%- comment -%} {% if current_person.signed_in? %}
<img
alt="{{ current_person.name }}"
class="np-header-mobile-menu-content-avatar"
@ -158,7 +187,7 @@
<div class="np-header-mobile-menu-content-name">
{{ current_person.name }}
</div>
{% endif %}
{% endif %} {%- endcomment -%}
<div class="np-header-mobile-menu-content-nav">
<form
class="np-header-search"
@ -184,6 +213,12 @@
{{ website_navigation.name }}
</a>
{% endfor %}
<a
href="https://baseline.campuslabs.com/htu/beta" target="_blank"
class="np-header-mobile-menu-content-button"
>
Survey
</a>
<div class="np-header-mobile-menu-content-line"></div>
{% unless current_school.sso_active? %}
<a
@ -204,3 +239,35 @@
</div>
{% include "messages" %}
<script>
let nameAdjuster = () => {
let allCardNames = document.querySelectorAll('.course-card-title');
for(let i = 0; i < allCardNames.length; i++){
let base = allCardNames[i].textContent.slice(0, 95);
if(base.length > 94){
allCardNames[i].textContent = base.trim() + '...'
}
}
}
$( document ).ready(function() {
nameAdjuster();
});
</script>
<style>
@media screen and (min-width: 678px){
.header-survey-link{
color: #000;
cursor: pointer;
font-size: 16px;
font-weight: 400;
line-height: 25px;
padding-right: 15px;
text-decoration: none;
}
}
</style>