backedup cin7 templates. Cloned more courses. Domains to csv for anthology was completed. new GAS script for cin7 courses within a google sheet.

This commit is contained in:
Norm Rasmussen
2024-03-26 17:28:59 -04:00
parent 299fda0696
commit 30f5cfd5e4
30 changed files with 640 additions and 56 deletions

View File

@ -13,6 +13,12 @@
{% endfor %}
{% endif %}
{% if log_out %}
<script>
window.location.replace('https://academy.cin7.com/learners/sign_in');
</script>
{% endif %}
{% include "header" %}
<div class="hero-homepage">
<div class="np-max-width">
@ -30,3 +36,33 @@
</div>
</main>
{% include "footer" %}
<script>
document.addEventListener('DOMContentLoaded', function() {
const urlParams = new URLSearchParams(window.location.search);
const categoriesFromURL = urlParams.getAll('category');
if (categoriesFromURL.length === 0) {
return;
}
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)) {
card.style.display = 'block';
} else {
card.style.display = 'none';
}
});
};
filterCards();
});
</script>