2024-02-14 17:12:33 -05:00
|
|
|
{% assign log_out = true %}
|
2024-01-31 17:32:20 -05:00
|
|
|
|
|
|
|
|
{% if current_person.signed_in? %}
|
2024-02-14 17:12:33 -05:00
|
|
|
{% assign log_out = false %}
|
2024-06-11 16:19:55 -04:00
|
|
|
{% endif %}
|
|
|
|
|
|
2024-03-26 17:28:59 -04:00
|
|
|
{% if log_out %}
|
|
|
|
|
<script>
|
|
|
|
|
window.location.replace('https://academy.cin7.com/learners/sign_in');
|
|
|
|
|
</script>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2024-01-19 19:47:00 -05:00
|
|
|
{% include "header" %}
|
|
|
|
|
<div class="hero-homepage">
|
2024-01-23 16:54:25 -05:00
|
|
|
<div class="np-max-width">
|
|
|
|
|
<div class="hero-text">Learning Paths</div>
|
2024-01-31 17:32:20 -05:00
|
|
|
<div class="hero-subheading">Explore curated learning paths tailored to your function and role.</div>
|
2024-01-23 16:54:25 -05:00
|
|
|
</div>
|
2024-01-19 19:47:00 -05:00
|
|
|
</div>
|
|
|
|
|
<main class="np-main np-learning-paths np-subpage-container ">
|
|
|
|
|
<div class="np-learning-paths-main np-max-width">
|
2024-01-31 17:32:20 -05:00
|
|
|
{% if current_person.signed_in? %}
|
|
|
|
|
{% include "learning_paths_index", items: learning_paths.available %}
|
|
|
|
|
{% else %}
|
|
|
|
|
<div class="hero-subheading"> You must be signed in to view Learning Paths. </div>
|
|
|
|
|
{% endif %}
|
2024-01-19 19:47:00 -05:00
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
{% include "footer" %}
|
2024-03-26 17:28:59 -04:00
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
|
|
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
|
|
const categoriesFromURL = urlParams.getAll('category');
|
|
|
|
|
if (categoriesFromURL.length === 0) {
|
2024-05-08 17:37:17 -04:00
|
|
|
return;
|
2024-03-26 17:28:59 -04:00
|
|
|
}
|
|
|
|
|
const cards = document.querySelectorAll('.lp-card');
|
|
|
|
|
|
|
|
|
|
const cardMatchesCategories = (card, categories) => {
|
|
|
|
|
const cardCategories = card.getAttribute('categories').split('[$]');
|
|
|
|
|
return categories.every(category => cardCategories.includes(category));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const filterCards = () => {
|
|
|
|
|
cards.forEach(card => {
|
|
|
|
|
if (cardMatchesCategories(card, categoriesFromURL)) {
|
2024-05-08 17:37:17 -04:00
|
|
|
card.style.display = 'block';
|
2024-03-26 17:28:59 -04:00
|
|
|
} else {
|
2024-05-08 17:37:17 -04:00
|
|
|
card.style.display = 'none';
|
2024-03-26 17:28:59 -04:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
filterCards();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|