Cin7 Partners instance downloaded. Crossed off a bunch of todos. Finished Anthology's groups to courses extract script.
This commit is contained in:
@ -0,0 +1,84 @@
|
||||
{% assign omni = false %}
|
||||
{% assign core = false %}
|
||||
{% assign log_out = true %}
|
||||
|
||||
{% if current_person.signed_in? %}
|
||||
{% assign log_out = false %}
|
||||
{% 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 %}
|
||||
|
||||
|
||||
<div class="carousel-wrapper">
|
||||
<div class="feature-courses-carousel">
|
||||
{% for course in courses.in_catalog %}
|
||||
{% if core %}
|
||||
{% if course.properties.feature_course_core == true %}
|
||||
<div class="card-wrapper">
|
||||
{% include 'cards_course' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% elsif omni %}
|
||||
{% if course.properties.feature_course_omni == true %}
|
||||
<div class="card-wrapper">
|
||||
{% include 'cards_course' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if course.properties.feature_course_omni == true or course.properties.feature_course_core == true %}
|
||||
<div class="card-wrapper">
|
||||
{% include 'cards_course' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('.feature-courses-carousel').slick({
|
||||
infinite: true,
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 4,
|
||||
prevArrow: "<i class='control-carousel fas fa-chevron-left left-arrow'></i>",
|
||||
nextArrow: "<i class='control-carousel fas fa-chevron-right right-arrow'></i>",
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3,
|
||||
infinite: true
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.slick-track {
|
||||
display: flex;
|
||||
}
|
||||
.card {
|
||||
height: 100%;;
|
||||
}
|
||||
.card-wrapper {
|
||||
padding: 1rem 0;
|
||||
height: auto;
|
||||
}
|
||||
.feature-courses-carousel {
|
||||
margin: 0 1rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user