From 30f5cfd5e4310e8f738c9608fdd00e1f160d1b43 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Tue, 26 Mar 2024 17:28:59 -0400 Subject: [PATCH] backedup cin7 templates. Cloned more courses. Domains to csv for anthology was completed. new GAS script for cin7 courses within a google sheet. --- .../Cin7 Customer Academy/.DS_Store | Bin 0 -> 6148 bytes .../_cards_course.html.liquid | 8 +- .../_cards_learning_path.html.liquid | 4 +- .../_cards_learning_path_homepage.html.liquid | 4 +- .../_category_cards.html.liquid | 1 + .../_category_cards_core.html.liquid | 25 ++ .../_category_carousel.html.liquid | 4 +- .../_category_carousel_core.html.liquid | 64 +++++ .../_course_desktop_view.html.liquid | 24 ++ .../_course_progress_and_cta.html.liquid | 8 + .../_featured_courses.html.liquid | 4 +- .../_filters_catalog.html.liquid | 12 +- .../Cin7 Customer Academy/_header.html.liquid | 2 - .../_homepage_testimonials.html.liquid | 8 +- .../_learning_path_carousel_core.html.liquid | 49 ++++ ..._learning_path_desktop_content.html.liquid | 24 ++ ...learning_path_progress_and_cta.html.liquid | 9 +- .../_search_result.html.liquid | 59 +++-- .../homepage.html.liquid | 20 +- .../learning_paths.html.liquid | 36 +++ .../Cin7 Customer Academy/login.html.liquid | 4 +- .../reset_password.html.liquid | 2 +- .../Cin7 Customer Academy/search.html.liquid | 20 +- .../Cin7 Customer Academy/styles.css.liquid | 34 +++ Scripts/Anthology/domains_to_csv.py | 6 +- Scripts/GAS_GS/Cin7-Courses-List/.clasp.json | 1 + .../GAS_GS/Cin7-Courses-List/PullCourses.js | 26 +++ .../GAS_GS/Cin7-Courses-List/appsscript.json | 7 + Scripts/clone_courses.js | 219 +++++++++++++++++- Todos.md | 12 +- 30 files changed, 640 insertions(+), 56 deletions(-) create mode 100644 Custom_Templates/customer_templates/Cin7 Customer Academy/.DS_Store create mode 100644 Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards_core.html.liquid create mode 100644 Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel_core.html.liquid create mode 100644 Custom_Templates/customer_templates/Cin7 Customer Academy/_learning_path_carousel_core.html.liquid create mode 100644 Scripts/GAS_GS/Cin7-Courses-List/.clasp.json create mode 100644 Scripts/GAS_GS/Cin7-Courses-List/PullCourses.js create mode 100644 Scripts/GAS_GS/Cin7-Courses-List/appsscript.json diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/.DS_Store b/Custom_Templates/customer_templates/Cin7 Customer Academy/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 + diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path.html.liquid index 30290ac2..a8f171fb 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path.html.liquid @@ -1,11 +1,13 @@ -
+
+
{{ learning_path.name }} +
diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path_homepage.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path_homepage.html.liquid index 85f9daf8..6609a9ee 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path_homepage.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_cards_learning_path_homepage.html.liquid @@ -6,6 +6,7 @@ class="learning-path-card-image" src="{{ learning_path.image_url }}" /> + {% if learning_path.name contains "Omni" or learning_path.name contains "Core"%}
{% if learning_path.name contains "Omni" %} Omni @@ -13,9 +14,10 @@ Core {% endif %}
+ {%endif%}
-
LEARNING PATH
+
LEARNING PATH

{{ learning_path.name }}

diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards.html.liquid index 5e7dad39..4c5bc9d8 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards.html.liquid @@ -9,3 +9,4 @@
+ diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards_core.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards_core.html.liquid new file mode 100644 index 00000000..990b2b16 --- /dev/null +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_cards_core.html.liquid @@ -0,0 +1,25 @@ + + +
+
+ +
+
+

{{category.name | replace: ": Core", " Deep Dives"}}

+
Level up your expertise and enhance your operations with {{category.name | replace: ": Core", " Deep Dives"}}.
+
+
+
+ diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel.html.liquid index ec7cc6f0..cc7f9cee 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel.html.liquid @@ -24,7 +24,7 @@ $('.category-carousel').slick({ infinite: true, slidesToShow: 4, - slidesToScroll: 5, + slidesToScroll: 4, prevArrow: "", nextArrow: "", responsive: [ @@ -58,7 +58,7 @@ padding: 1rem 0; height: auto; } - .my-courses-carousel { + .category-carousel { margin: 0 1rem; } \ No newline at end of file diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel_core.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel_core.html.liquid new file mode 100644 index 00000000..18a1f61c --- /dev/null +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_category_carousel_core.html.liquid @@ -0,0 +1,64 @@ +{% assign unique_category = "" %} +{% assign category_images = 'https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images+core+/Accounting+Deep+Dives+-+Thumbnails.png, https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images+core+/Administrative+Deep+Dives+-+Thumbnail.png, https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images+core+/Product+Management+Deep+Dives+-+Thumbnail.png, https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images+core+/Simple+Manufacturing+Deep+Dives+-+Thumbnail.png, https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images+core+/Warehouse+Operations+Deep+Dives+-+Thumbnail.png' | split: ', ' %} +{% assign category_counter = 0 %} +{% assign core_categories = 'Warehouse Operations: Core, Admin: Core, Product Management: Core, Accounting: Core, Simple Manufacturing: Core' | split: ", " %} + + + + + + \ No newline at end of file diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_desktop_view.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_desktop_view.html.liquid index 570ef46c..6e30d32c 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_desktop_view.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_desktop_view.html.liquid @@ -1,3 +1,27 @@ +{% assign omni = false %} +{% assign core = false %} +{% assign redirect = false %} + +{% if current_person.signed_in? %} + {% for group in current_person.groups %} + {% if group.name contains 'Core' %} + {% assign core = true %} + {% elsif group.name contains 'Omni' %} + {% assign omni = true %} + {% endif %} + {% endfor %} +{% endif %} + +{% if core and course.name contains 'Omni' %} + {% assign redirect = true %} +{% elsif omni and course.name contains 'Core' %} + {% assign redirect = true %} +{% endif %} + +{% if redirect %} + +{% endif %} +
{{ course.name }}
diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_progress_and_cta.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_progress_and_cta.html.liquid index 29da778b..4d712024 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_progress_and_cta.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_course_progress_and_cta.html.liquid @@ -23,6 +23,13 @@ {% t .retake, key: current_school.course_vocabulary %} +{% else %} +{% if current_person.signed_in? == false%} + + Sign In + {% else %} {% endif %} +{% endif %} diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_featured_courses.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_featured_courses.html.liquid index cc7e0a3c..7dcbd8db 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_featured_courses.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_featured_courses.html.liquid @@ -44,7 +44,7 @@ $('.feature-courses-carousel').slick({ infinite: true, slidesToShow: 4, - slidesToScroll: 5, + slidesToScroll: 4, prevArrow: "", nextArrow: "", responsive: [ @@ -78,7 +78,7 @@ padding: 1rem 0; height: auto; } - .my-courses-carousel { + .feature-courses-carousel { margin: 0 1rem; } diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_filters_catalog.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_filters_catalog.html.liquid index eaefc3f5..d87db12a 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_filters_catalog.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_filters_catalog.html.liquid @@ -150,15 +150,17 @@ document.addEventListener("DOMContentLoaded", function() { }); var urlParams = new URLSearchParams(window.location.search); - var categoryFromUrl = urlParams.get('category'); + var categoriesFromUrl = urlParams.getAll('category'); var durationFromUrl = urlParams.get('duration'); - if (categoryFromUrl) { - var categoryCheckbox = document.getElementById(categoryFromUrl); + if (categoriesFromUrl.length > 0) { + categoriesFromUrl.forEach(function(category) { + var categoryCheckbox = document.getElementById(category); if (categoryCheckbox) { categoryCheckbox.click(); } - } + }); +} if (durationFromUrl) { var durationCheckbox = document.getElementById(durationFromUrl); @@ -210,7 +212,7 @@ function getSelectedDurations() { } function matchesCategories(courseCategories, selectedCategories) { - var courseCategoriesArray = courseCategories.split(',').map(function (category) { + var courseCategoriesArray = courseCategories.split('[$]').map(function (category) { return category.trim(); }); diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_header.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_header.html.liquid index 306cd5d5..2365d15e 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_header.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_header.html.liquid @@ -154,7 +154,6 @@
{% else %} - {% unless log_out %} - {% endunless %} {% endif %}
diff --git a/Custom_Templates/customer_templates/Cin7 Customer Academy/_homepage_testimonials.html.liquid b/Custom_Templates/customer_templates/Cin7 Customer Academy/_homepage_testimonials.html.liquid index b1bc9a1f..56031c78 100644 --- a/Custom_Templates/customer_templates/Cin7 Customer Academy/_homepage_testimonials.html.liquid +++ b/Custom_Templates/customer_templates/Cin7 Customer Academy/_homepage_testimonials.html.liquid @@ -25,26 +25,26 @@
- {% elsif core %} + {% elsif core or log_out%}
Transformative education for Connected Inventory Performance