thats it. last commit at gainsight. closing this repo soon.

This commit is contained in:
Norm Rasmussen
2026-04-14 17:14:29 -04:00
parent fc1523a89c
commit fa77a69132
5 changed files with 115 additions and 215 deletions

View File

@ -30,7 +30,7 @@
{% endif %}
" onclick="toggleLanguageSelector('{{parentClass}}')">
<span>Language</span>
<div {% if desktopMode %} style="padding-top: 10px;"{% endif %}class="language-selector-dropdown">
<div{% if desktopMode %} style="padding-top: 10px;"{% endif %} class="language-selector-dropdown">
<a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/">English (USA)</a>
<a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/es-us">Español (Estados Unidos)</a>
{% comment %} <a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/fr-ca">Français  (Québec)</a> {% endcomment %}

View File

@ -33,11 +33,13 @@
<a class="np-form-link np-button-color" href="{% route forgot_password_new %}">
{% t .forgot_password %}
</a>
{% comment %}
{% if features.account_creation? %}
<a class="np-form-link np-button-color" href="{% route sign_up %}">
{% t shared.sign_up %}
</a>
{% endif %}
{% endcomment %}
{% if features.request_access? %}
<a
class="np-form-link np-button-color"

View File

@ -1,213 +1,111 @@
{% if courses.enrolled.any? %}
{% comment %} GETTING STARTED {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Getting Started" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/categories-img-label.webp" width="60" height="60" alt="Getting Started Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div></div>
<div class="np-category-title">{{school_category}}
</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} EARNINGS {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Earnings" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-earnings-icon.webp" width="61" height="60" alt="Earnings Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}
</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} SHOPPING & DELIVERY {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Shopping & Delivery" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-shopping-delivery-icon.webp" width="61" height="60" alt="Shopping & Delivery Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} DELIVERY {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Delivery" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-delivery-icon.webp" width="61" height="60" alt="Delivery Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} USING THE APP {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Using the App" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-using-the-app-icon.webp" width="60" height="60" alt="Using the App Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} CONTACTING CUSTOMERS {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Contacting Customers" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-contacting-customers-icon.webp" width="61" height="60" alt="Contacting Customers Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i></div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} SAFETY {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Safety" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-safety-icon.webp" width="61" height="60" alt="Safety Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i></div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} REWARDS {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Rewards" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-rewards-icon.webp" width="61" height="60" alt="Rewards Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i></div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} NON SPECIFIED {% endcomment %}
{% for school_category in school_categories %}
{% unless school_category == "Getting Started" or school_category == "Earnings" or school_category == "Shopping & Delivery" or school_category == "Delivery" or school_category == "Using the App" or school_category == "Contacting Customers" or school_category == "Rewards" %}
{% if school_category == "Resource Bundles" %}
{% if features.learning_paths? and learning_paths.enrolled.any? %}
<div class="np-category-card" data-category='resource-bundles'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-resource-bundles-icon.webp" width="60" height="60" alt="Category Icon">
</div>
<div class="title-wrapper">
<div class="np-category-title">Resource Bundles</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_learning_paths_tray", category_name: "Resource Bundles" %}
{% endif %}
{% else %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
{% if school_category == "Arrival & Pick Up" %}
<img src="https://cdn.northpass.io/walmart/category-arrival-pickup-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Drop Off & Returns" %}
<img src="https://cdn.northpass.io/walmart/category-dropoff-returns-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Troubleshooting" %}
<img src="https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Trust & Safety" %}
<img src="https://cdn.northpass.io/walmart/category-trust-safety-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Offer Acceptance" %}
<img src="https://cdn.northpass.io/walmart/category-offer-acceptance-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Returns" %}
<img src="https://cdn.northpass.io/walmart/category-returns-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Rewards" %}
<img src="https://cdn.northpass.io/walmart/category-rewards-icon.webp" width="61" height="60" alt="Rewards Icon">
{% elsif school_category == "Safety" %}
<img src="https://cdn.northpass.io/walmart/category-safety-icon.webp" width="61" height="60" alt="Safety Icon">
{% else %}
<img src="https://cdn.northpass.io/walmart/category-spark-icon.webp" width="61" height="60" alt="Category Icon">
{% endif %}
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endunless %}
{% endfor %}
{% endif %}
{% if courses.enrolled.any? %}
{% comment %}
============================================================================
CATEGORY CARDS - Refactored for DRY & Maintainability
============================================================================
To add a new category:
1. Add it to 'ordered_categories' in the desired position
2. Add its icon URL to the icon lookup section below
That's it! No more copy-pasting 20 lines of code.
============================================================================
{% endcomment %}
{% comment %} Define the display order for categories {% endcomment %}
{% assign ordered_categories = "Getting Started,Using the App,Earnings,Safety,Offer Acceptance,Arrival & Pick Up,Delivery,Shopping & Delivery,Returns,Rewards,Troubleshooting" | split: "," %}
{% comment %} ==================== ORDERED CATEGORIES ==================== {% endcomment %}
{% for category_name in ordered_categories %}
{% for school_category in school_categories %}
{% if school_category == category_name %}
{% comment %} Icon lookup - add new category icons here {% endcomment %}
{% case school_category %}
{% when "Getting Started" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/categories-img-label.webp" %}
{% assign category_alt = "Getting Started Category Icon" %}
{% when "Using the App" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-using-the-app-icon.webp" %}
{% assign category_alt = "Using the App Category Icon" %}
{% when "Earnings" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-earnings-icon.webp" %}
{% assign category_alt = "Earnings Category Icon" %}
{% when "Safety" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-safety-icon.webp" %}
{% assign category_alt = "Safety Icon" %}
{% when "Offer Acceptance" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-offer-acceptance-icon.webp" %}
{% assign category_alt = "Offer Acceptance Icon" %}
{% when "Arrival & Pick Up" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-arrival-pickup-icon.webp" %}
{% assign category_alt = "Arrival & Pick Up Icon" %}
{% when "Delivery" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-delivery-icon.webp" %}
{% assign category_alt = "Delivery Category Icon" %}
{% when "Shopping & Delivery" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-shopping-delivery-icon.webp" %}
{% assign category_alt = "Shopping & Delivery Category Icon" %}
{% when "Returns" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-returns-icon.webp" %}
{% assign category_alt = "Returns Icon" %}
{% when "Rewards" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-rewards-icon.webp" %}
{% assign category_alt = "Rewards Icon" %}
{% when "Troubleshooting" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" %}
{% assign category_alt = "Troubleshooting Icon" %}
{% endcase %}
<div class="np-category-card" data-category="{{ school_category | replace: ' ', '-' | downcase }}">
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="{{ category_icon }}" width="60" height="60" alt="{{ category_alt }}">
</div>
<div class="title-wrapper">
<div class="labels-wrapper"></div>
<div class="np-category-title">{{ school_category }}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% endfor %}
{% comment %} ==================== REMAINING CATEGORIES ==================== {% endcomment %}
{% comment %} Catches any categories not in the ordered list above {% endcomment %}
{% for school_category in school_categories %}
{% unless ordered_categories contains school_category %}
{% comment %} Icon lookup for non-ordered categories {% endcomment %}
{% case school_category %}
{% when "Drop Off & Returns" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-dropoff-returns-icon.webp" %}
{% when "Special Topics" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" %}
{% when "Trust & Safety" %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-trust-safety-icon.webp" %}
{% else %}
{% assign category_icon = "https://cdn.northpass.io/walmart/category-spark-icon.webp" %}
{% endcase %}
<div class="np-category-card" data-category="{{ school_category | replace: ' ', '-' | downcase }}">
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="{{ category_icon }}" width="60" height="60" alt="{{ school_category }} Category Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper"></div>
<div class="np-category-title">{{ school_category }}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endunless %}
{% endfor %}
{% endif %}