Luminate's templates for Mexico school. Todos. Hid the Register button in Sandata.

This commit is contained in:
Norm Rasmussen
2024-05-24 18:35:02 -04:00
parent 02d463cf00
commit a65ad4740c
15 changed files with 203 additions and 178 deletions

View File

@ -20,6 +20,7 @@
{% t .no_seats %}
</div>
{% endif %}
{% comment %}
<div class="np-training-session-cta">
<div class="np-training-session-cta-buttons">
<form
@ -51,3 +52,4 @@
</form>
</div>
</div>
{% endcomment %}

View File

@ -0,0 +1,23 @@
{% capture settings_path %}{% route account %}{% endcapture %}
{% capture transcript_path %}{% route transcript %}{% endcapture %}
{% if current_person.signed_in? %}
{% unless current_school.sso_active? %}
<nav class="np-tabs np-account-tabs">
<div class="np-tabs-content">
<div class="np-tab{% if page.path == settings_path %} np-tab-active{% endif %}">
<a class="np-tab-link" href="{{ settings_path}}">
{% t .profile_settings %}
</a>
<div class="np-tab-indicator np-button-background-color"></div>
</div>
<div class="np-tab{% if page.path == transcript_path %} np-tab-active{% endif %}">
<a class="np-tab-link" href="{{ transcript_path }}">
{% t .transcript %}
</a>
<div class="np-tab-indicator np-button-background-color"></div>
</div>
</div>
</nav>
{% endunless %}
{% endif %}

View File

@ -34,7 +34,14 @@
{% endif %}
<div class="np-card-content-footer">
<div class="np-card-content-progress np-button-color">
{% t shared.progress, count: course.progress %}
{% if course.progress > 0 and course.progress < 100 %}
{{course.progress }}% Completo
{% elsif course.progress == 100 %}
{{course.progress }}% Completo
{% else %}
No empezado
{% endif %}
</div>
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
{% if course.has_to_restart? %}

View File

@ -24,7 +24,13 @@
</div>
<div class="np-card-content-footer">
<div class="np-card-content-progress np-button-color">
{% t shared.progress, count: course.progress %}
{% if course.progress > 0 and course.progress < 100 %}
{{course.progress }}% Completo
{% elsif course.progress == 100 %}
{{course.progress }}% Completo
{% else %}
No empezado
{% endif %}
</div>
<div class="np-card-progress-bar-container">
<div style="width: {{ course.progress }}%" class="np-button-background-color np-card-progress-bar">

View File

@ -1,28 +1,9 @@
{% if courses.enrolled.any? %}
<div class="row row-with-thumbnails">
{% for course in courses.enrolled %}
{% unless course.properties.is_article_course %}
{% if course.id == "6cc26c57-34db-4b8e-a38b-ad321ce18add" or course.id == "ac4fbf2e-ed8f-404d-b995-f0ef73481466" %}
{% if current_person.properties.hide_api_certification_exam_course == false %}
<div class="{{ class }}">
{% include "cards_course" with course %}
</div>
{% endif %}
{% else %}
{% if course.id == "b3225a47-448d-4988-962a-18d37d6616d0" or course.id == "fdc8acdc-0b7c-4064-a52b-1955379d411b" %}
{% unless course.progress == 100 %}
<div class="{{ class }}">
{% include "cards_course" with course %}
</div>
{% endunless %}
{% else %}
<div class="{{ class }}">
{% include "cards_course" with course %}
</div>
{% endif %}
{% endif %}
{% endunless %}
<div class="{{ class }}">
{% include "cards_course" with course %}
</div>
{% endfor %}
</div>
{% else %}

View File

@ -4,22 +4,34 @@
<div class="np-footer-navigation">
<ul class="np-footer-navigation-list">
{% for website_navigation in navigations.footer_navigations %}
{% if website_navigation.external? %}
<li class="np-footer-navigation-item">
<a
class="np-footer-navigation-link np-button-color"
href="{{ website_navigation.path }}"
{% if website_navigation.external? %} target="_blank" {% endif %}
>
{{ website_navigation.name }}
</a>
</li>
{% endif %}
<li class="np-footer-navigation-item">
<a
class="np-footer-navigation-link np-button-color"
href="{{ website_navigation.path }}"
{% if website_navigation.external? %} target="_blank" {% endif %}
>
{{ website_navigation.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="copyright">© 2023 Walmart Inc.</div>
{% if current_school.logo_url %}
<h2 class="np-footer-logo">
<a href="{% route home %}">
<img
alt="{{ current_school.name }}"
class="np-footer-logo-image"
src="{{ current_school.logo_url }}"
/>
</a>
</h2>
{% else %}
<div class="np-school-name np-header-font-color">
{{ current_school.name }}
</div>
{% endif %}
</div>
<div class="np-footer-bottom">
@ -63,51 +75,4 @@
</div>
{% endif %}
</div>
{% if current_person.signed_in? %}
{% if current_person.properties.language == "es" %}
{% include "spanish_lang" %}
{% endif %}
{% endif %}
</footer>
<style>
.np-footer {
max-width:1380px;
margin:auto;
border-top: 1px solid #DADCE0;
padding: 24px 16px 48px;
}
.np-footer-top {
justify-content:center;
flex-direction:column;
}
.np-footer-navigation-list {
flex-direction:row;
flex-wrap:wrap;
margin:0;
justify-content:center;
}
.np-footer-navigation {
min-height:auto;
}
.np-footer-navigation-link {
font-size:16px;
line-height:30px;
margin: 0 12px 16px;
padding: 0;
}
@media (min-width:1381px) {
.np-footer {
margin: 0 auto;
}
.np-footer-navigation-link {
margin: 0 16px 16px;
}
}
</style>

View File

@ -2,82 +2,63 @@
{% styles colors %}
{% styles custom %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.4/tiny-slider.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.2/min/tiny-slider.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script>
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<!-- language scripts -->
{% if current_person.signed_in? %}
{% assign lang = current_person.properties.language %}
{% case lang %}
{% when "es" %}
{% include "spanish_lang" %}
{% endcase %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
// changing language
function changeLanguage(newLanguage, sendRequest=true) {
document.querySelector(".languages-dropdown").classList.remove('show');
if (!window.current_language || window.current_language !== newLanguage) {
window.current_language = newLanguage
} else {
console.log('language already selected')
return null
function setLang(lang) {
if (localStorage.getItem('language') == null || localStorage.getItem('language') != lang) {
localStorage.setItem('language', lang)
}
var data = {
uuid : '{{current_person.id}}',
language : lang
};
$.ajax({
type : 'POST',
url : 'https://webhooks.workato.com/webhooks/rest/06186897-993c-458b-a8e6-394db4151bd0/langchange',
data: JSON.stringify(data),
success:function (data) {
console.log(data);
setTimeout(location.reload.bind(location), 1200);
},
error: function(xhr, status, error) {
console.log(error)
}
});
}
document.querySelectorAll('.current-lang').forEach(activeElement => {
activeElement.classList.remove('current-lang');
});
document.querySelectorAll(`[data-lang="${newLanguage}"]`).forEach(newLanguageElement => {
newLanguageElement.classList.add('current-lang');
});
{% if current_person.signed_in? and current_school.properties.sandbox == false %}
if (sendRequest) {
let xhr = new XMLHttpRequest();
{% if current_school.sso_active? %}
var url = "https://www.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/pipedrive-sso-change-user-language";
{% else %}
var url = "https://www.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/pipedrive-open-change-user-language";
{% endif %}
xhr.open("POST", url, true);
xhr.send(JSON.stringify({
user_id: '{{ current_person.id }}',
language: newLanguage
}));
}
{% endif %}
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
window.localStorage.setItem('academy-language', newLanguage);
document.querySelector('body').className = `lang-${newLanguage}`;
}
</script>
<!--Function to display proper courses based on language value-->
<script>
function filterCoursesByLanguage() {
var selectedLanguage = localStorage.getItem('academy-language');
var courses = document.querySelectorAll('.homepage-card-wrapper, .course-card');
if (!courses.length) {
return; // Nie ma żadnych kursów na stronie
}
for (var i = 0; i < courses.length; i++) {
var course = courses[i];
var courseLanguage = course.getAttribute('language');
if (selectedLanguage && courseLanguage !== selectedLanguage) {
course.style.display = 'none'; // Ukryj kursy o nieodpowiednim języku
} else {
course.style.display = 'block'; // Pokaż kursy o wybranym języku
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
// Wywołanie funkcji po załadowaniu strony
window.addEventListener('DOMContentLoaded', filterCoursesByLanguage);
// Wywołanie funkcji po zmianie wartości w local storage
window.addEventListener('storage', filterCoursesByLanguage);
}
</script>
{% endif %}

View File

@ -45,21 +45,13 @@
<div class="header-dropdown-container np-hidden-mobile">
<div class="dropdown-arrow"></div>
<div class="header-dropdown">
<a class="Home header-dropdown" href="https://www.walmartluminate.com/apps">Walmart Luminate</a>
<a class="lang-en" href="https://www.walmartluminate.com/shopperbehavior/dh.clientportal.web/web/#/">Shopper Behavior</a>
<a class="lang-en" href="https://www.walmartluminate.com/customerperception">Customer Perception</a>
<a class="lang-en" href="https://www.walmartluminate.com/reportbuilder">Report Builder</a>
<a class="lang-en" href="https://www.walmartluminate.com/channelperformance/selectcategories">Insights</a>
<a class="lang-en" href="https://www.walmartluminate.mx/shopperbehavior">Shopper Behavior</a>
</div>
</div>
<div class="header-dropdown-container np-hidden-desktop">
<div class="dropdown-arrow"></div>
<div class="header-dropdown">
<a href="https://www.walmartluminate.com/apps">Walmart Luminate</a>
<a href="https://www.walmartluminate.com/shopperbehavior/dh.clientportal.web/web/#/">Shopper Behavior</a>
<a href="https://www.walmartluminate.com/customerperception">Customer Perception</a>
<a href="https://www.walmartluminate.com/reportbuilder">Report Builder</a>
<a href="https://www.walmartluminate.com/channelperformance/selectcategories">Insights</a>
<a href="https://www.walmartluminate.mx/shopperbehavior">Shopper Behavior</a>
</div>
</div>
<div class="header-text np-hidden-desktop">Learn</div>
@ -94,8 +86,8 @@
<i class="fal fa-angle-down"></i>
</div>
<ul class="languages-dropdown">
<li data-lang="en" class="current-lang" onclick="changeLanguage(this.getAttribute('data-lang')), redirectToLanguageHomepage(this.value)">English</li>
<li data-lang="es" onclick="changeLanguage(this.getAttribute('data-lang')), redirectToLanguageHomepage(this.value)">Español</li>
<li data-lang="en" class="current-lang" onclick="setLang(this.getAttribute('data-lang'))">English</li>
<li data-lang="es" onclick="setLang(this.getAttribute('data-lang'))">Español</li>
</ul>
</div>
@ -139,10 +131,10 @@
</div>
</div>
<nav class="np-header-avatar-tooltip-navigation">
<a class="Profile np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.com/profile">Profile</a>
<a class="Admin np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.com/admin">Admin</a>
<a class="Resources np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.com/resources">Resources</a>
<a class="Support np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.com/support">Support</a>
<a class="Profile np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.mx/profile">Profile</a>
<a class="Admin np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.mx/admin">Admin</a>
<a class="Resources np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.mx/resources">Resources</a>
<a class="Support np-header-avatar-tooltip-navigation-link" href="https://www.walmartluminate.mx/support">Support</a>
<a
class="np-header-avatar-tooltip-navigation-link np-danger"
href="{% route logout %}"

View File

@ -79,11 +79,32 @@
.Articles.np-resource-subtitle,
.Certifications.np-resource-title,
.Certifications.np-resource-subtitle,
#desktop_upload_avatar
#desktop_upload_avatar,
body > main > div.np-homepage-ongoing.np-max-width > div.ongoing-see-more-wrapper > a,
body > footer > div.np-footer-top > div > ul > li:nth-child(1) > a,
body > footer > div.np-footer-top > div > ul > li:nth-child(2) > a,
body > footer > div.np-footer-top > div > ul > li:nth-child(3) > a,
body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-resource-title,
body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-resource-subtitle
{
text-indent: -9999999px;
}
/* CATALOG */
body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-resource-title::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Catálogo de cursos";
}
body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-resource-subtitle::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Grandes cursos desde la comodidad de tu casa u oficina";
}
/* HEADER */
.np-header-avatar-tooltip-navigation-link::after {
@ -329,7 +350,7 @@
.Home.np-homepage-headline::after {
/* Headline */
text-indent: 0;
line-height: 0;
line-height: .5;
display: block;
content: "Benvenida a Luminate Mexico";
}
@ -482,7 +503,7 @@
text-indent: 0;
line-height: inherit;
display: block;
content: "¡Gorrón! No se le asignó ninguna ruta de aprendizaje.";
content: "No se le asignó ninguna ruta de aprendizaje.";
margin-top: -10px;
}
@ -708,4 +729,30 @@
display: block;
content: "Sobre el modulo";
}
body > main > div.np-homepage-ongoing.np-max-width > div.ongoing-see-more-wrapper > a::after {
/* See More */
text-indent: 0;
line-height: 0;
display: block;
content: "Ver más";
}
body > footer > div.np-footer-top > div > ul > li:nth-child(1) > a::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Página de Inicio";
}
body > footer > div.np-footer-top > div > ul > li:nth-child(2) > a::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Panel";
}
body > footer > div.np-footer-top > div > ul > li:nth-child(3) > a::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Mis Rutas";
}
</style>

View File

@ -9,7 +9,7 @@
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
{% endfor %}
<div class="np-sub-navigation-content-item articles-link">
{% comment %} <div class="np-sub-navigation-content-item articles-link">
<a class="np-sub-navigation-content-item-link" href="/app/articles">
<i class="far fa-file-alt np-button-color np-sub-navigation-content-item-icon"></i>
Blog
@ -22,7 +22,7 @@
Certifications
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
</div> {% endcomment %}
</div>
</nav>

View File

@ -0,0 +1,6 @@
<div class="np-training-session-cta-note np-training-session-tile-badge np-training-session-tile-badge-{{ training_session.status.type }}">
{% if training_session.approved? %}
<i class="far fa-check np-training-session-icon"></i>
{% endif %}
{{ training_session.status.label }}
</div>

View File

@ -4,8 +4,8 @@
<main class="np-main np-catalog np-subpage-container np-max-width">
<div class="np-catalog-header-wrapper">
<div class="np-catalog-header">
<div class="Catalog np-resource-title">{{ catalog.headline }}</div>
<div class="Catalog np-resource-subtitle">{{ catalog.subheadline }}</div>
<div class="np-resource-title">{{ catalog.headline }}</div>
<div class="np-resource-subtitle">{{ catalog.subheadline }}</div>
</div>
{% capture label %}{% t shared.filters.by_category %}{% endcapture %}

View File

@ -0,0 +1,8 @@
{% include "header" %}
{% include "account_tabs" %}
<main class="np-main np-subpage-container np-transcript">
{% transcript %}
</main>
{% include "footer" %}

View File

@ -1,7 +1,7 @@
{% if courses.in_catalog.any? %}
<div class="np-catalog-courses row row-with-thumbnails">
{% for course in courses.in_catalog %}
{% unless course.properties.is_article_course %}
{% unless course.properties.is_article_course %}
{% if course.id == "6cc26c57-34db-4b8e-a38b-ad321ce18add" or course.id == "ac4fbf2e-ed8f-404d-b995-f0ef73481466" %}
{% if current_person.properties.hide_api_certification_exam_course == false %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
@ -20,7 +20,7 @@
{% include "cards_course" with course %}
</div>
{% endif %}
{% endif %}
{% endif %}
{% endunless %}
{% endfor %}
</div>
@ -31,4 +31,4 @@
%}
{% endcapture %}
{% include "courses_zero_state", message: message %}
{% endif %}
{% endif %}

View File

@ -305,4 +305,11 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th
## 05-22-2024
- [ ] Cin7 - Update Footer Links
- [ ] HowardHanna - Update menu items for HH and AT.
- [X] HowardHanna - Update menu items for HH and AT.
## 05-24-2024
- [ ] Anthology - CSQL & CAM for Additional Instance - Spanish
- [ ] Anthology - Hero & Subnavigation can be updated whenever
- [ ] Anthology - Remind Katie about the load time plan & message
- [ ] Anthology - Remind KC about the email to Locked Anthology users