Figured out Workato recipe with Python node to reduce the scope of the original anthology flow.
This commit is contained in:
@ -9,6 +9,9 @@
|
||||
<div class="dashboard-main-title">
|
||||
Dashboard
|
||||
</div>
|
||||
<div class="dashboard-subtitle">
|
||||
Track Progress and Continue Learning
|
||||
</div>
|
||||
|
||||
<div class='dashboard-control-panel' style="
|
||||
">
|
||||
@ -37,11 +40,15 @@
|
||||
|
||||
{%- comment -%} =============== THIS IS WHERE THE PRODUCT FILTER WILL LIVE =============== {%- endcomment -%}
|
||||
<div class="filter-buttons-container">
|
||||
<div class="dashboard-filter-label">Filter By: </div>
|
||||
{% include "filter_by_product", page: 'Dashboard' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dashboard-resources-pane">
|
||||
<div class="np-dashboard-resources-title">
|
||||
Your Resources
|
||||
</div>
|
||||
{% assign ipCourseFound = false %}
|
||||
{% if courses.enrolled.any? %}
|
||||
{% for course in courses.enrolled %}
|
||||
@ -88,119 +95,6 @@
|
||||
</main>
|
||||
{% include "footer" %}
|
||||
|
||||
{%- comment -%} {% assign totalCountEnrolledDash = 0 %}
|
||||
{% assign totalCountInProgDash = 0 %}
|
||||
{% assign totalCountCompletedDash = 0 %}
|
||||
{% if courses.enrolled.any? %}
|
||||
{% for course in courses.enrolled %}
|
||||
{% assign totalCountEnrolledDash = totalCountEnrolledDash | plus: 1 %}
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
{% assign totalCountInProgDash = totalCountInProgDash | plus: 1 %}
|
||||
{% elsif course.progress == 100 %}
|
||||
{% assign totalCountCompletedDash = totalCountCompletedDash | plus: 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if totalCountEnrolledDash > 3 %}
|
||||
<script>
|
||||
var indexSlider = tns({
|
||||
container: '.courses-index-carousel',
|
||||
controls: false,
|
||||
items: 1,
|
||||
nav: false,
|
||||
navPosition: 'bottom',
|
||||
responsive: {
|
||||
768: {
|
||||
items: 3
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if totalCountInProgDash > 3 %}
|
||||
<script>
|
||||
var sliderInProg = tns({
|
||||
container: '.courses-in-prog-carousel',
|
||||
controls: false,
|
||||
items: 1,
|
||||
nav: false,
|
||||
navPosition: 'bottom',
|
||||
responsive: {
|
||||
768: {
|
||||
items: 3
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if totalCountCompletedDash > 3 %}
|
||||
<script>
|
||||
var sliderCompleted = tns({
|
||||
container: '.courses-in-prog-carousel',
|
||||
controls: false,
|
||||
items: 1,
|
||||
nav: false,
|
||||
navPosition: 'bottom',
|
||||
responsive: {
|
||||
768: {
|
||||
items: 3
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% assign availableEventsDash = 0 %}
|
||||
{% if training_events.available.any? %}
|
||||
{% for training_event in training_events.available %}
|
||||
{% assign availableEventsDash = availableEventsDash | plus: 1 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% assign enrolledEventsDash = 0 %}
|
||||
{% if training_events.enrolled.any? %}
|
||||
{% for training_event in training_events.enrolled %}
|
||||
{% assign enrolledEventsDash = enrolledEventsDash | plus: 1 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if availableEventsDash > 3 %}
|
||||
<script>
|
||||
var eventsASlider = tns({
|
||||
container: '.events-available-carousel',
|
||||
controls: false,
|
||||
items: 1,
|
||||
nav: false,
|
||||
navPosition: 'bottom',
|
||||
responsive: {
|
||||
768: {
|
||||
items: 3
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if enrolledEventsDash > 3 %}
|
||||
<script>
|
||||
var eventsESlider = tns({
|
||||
container: '.events-enrolled-carousel',
|
||||
controls: false,
|
||||
items: 1,
|
||||
nav: false,
|
||||
navPosition: 'bottom',
|
||||
responsive: {
|
||||
768: {
|
||||
items: 3
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %} {%- endcomment -%}
|
||||
|
||||
<script>
|
||||
let swapView = () => {
|
||||
console.log(event.target.classList);
|
||||
@ -218,7 +112,6 @@
|
||||
document.getElementById('dashboard-completed-pane').style.display = 'none';
|
||||
document.getElementById('dashboard-resources-pane').style.display = 'block';
|
||||
|
||||
|
||||
} else if(event.target.id == 'events-view-button'){
|
||||
document.getElementById('dashboard-view-button').classList.remove('view-swapper-button-active');
|
||||
if(document.getElementById('completed-view-button')){
|
||||
@ -242,44 +135,61 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{%- comment -%} {% assign swapper_spacer = 0 %}
|
||||
{% for course in courses.enrolled %}
|
||||
{% unless course.progress == 0 %}
|
||||
{% assign swapper_spacer = 1 %}
|
||||
{% endunless %}
|
||||
{% endfor %} {%- endcomment -%}
|
||||
|
||||
<style>
|
||||
.dashboard-main-title{
|
||||
color: #000000;
|
||||
font-size: 32px;
|
||||
color: #0a0a0a;
|
||||
font-size: 2em;
|
||||
font-weight: 900;
|
||||
line-height: 2.375REM;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.dashboard-subtitle{
|
||||
color: #595959;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 400;
|
||||
line-height: 25px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.np-dashboard-resources-title{
|
||||
color: #000000;
|
||||
font-size: 24px;
|
||||
font-size: 1.5em;
|
||||
font-weight: 600;
|
||||
line-height: 25px;
|
||||
margin-bottom: 25px;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.dashboard-control-panel{
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #000000;
|
||||
border-bottom: 1px solid #F2F4F5;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
justify-content: center;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.view-swapper-container{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 50px;
|
||||
height: 40px;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view-swapper-button{
|
||||
align-items: center;
|
||||
color: #595959;
|
||||
display: flex;
|
||||
font-size: 18px;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
@ -287,7 +197,10 @@
|
||||
}
|
||||
|
||||
.view-swapper-button-active{
|
||||
border-bottom: 2px solid #000000;
|
||||
background: #f2f4f5;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
/* border-bottom: 2px solid #000000; */
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
@ -295,6 +208,19 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.filter-buttons-container{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dashboard-filter-label{
|
||||
color: #595959;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#dashboard-events-pane,
|
||||
#dashboard-completed-pane{
|
||||
display: none;
|
||||
@ -302,7 +228,6 @@
|
||||
|
||||
.product-filter-container{
|
||||
margin: 0;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px){
|
||||
@ -314,10 +239,6 @@
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.np-dashboard-resources-title{
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.dashboard-control-panel{
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
@ -325,12 +246,8 @@
|
||||
}
|
||||
|
||||
.view-swapper-container{
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
|
||||
.product-filter-container{
|
||||
margin: 0;
|
||||
margin-bottom: 6px;
|
||||
margin-bottom: -38px;
|
||||
width: unset;
|
||||
}
|
||||
|
||||
.dashboard-learning-content{
|
||||
@ -340,7 +257,15 @@
|
||||
|
||||
.dashboard-courses-index{
|
||||
margin: 0;
|
||||
margin-left: -6px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
{%- comment -%} {% if swapper_spacer == 0 %}
|
||||
<style>
|
||||
.view-swapper-container{
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
</style>
|
||||
{% endif %} {%- endcomment -%}
|
||||
Reference in New Issue
Block a user