A few notes and template changes.

This commit is contained in:
Norm Rasmussen
2023-07-07 15:51:41 -04:00
parent 58dd40bf99
commit c6b0c5682f
27 changed files with 692 additions and 221 deletions

View File

@ -5,7 +5,7 @@
Zenjob Testing" or group.id == "940a5d24-32af-45f1-8ed4-8a6b4689d9c9" %}
{% assign isAuthenticatedUser = true %}
{% endif %}
{% endfor %}
{% endfor %}
{% if current_person.email contains "+preview" %}
{% assign isAuthenticatedUser = true %}
@ -17,7 +17,7 @@
<div class="np-homepage-hero-content">
<div class="np-homepage-headline" style="color: #fff">
{{ homepage.headline }}
</div>
</div>
<div class="np-homepage-subheadline">
Entschuldigung! Es scheint, dass deine E-Mail-Adresse {{current_person.email}} nicht den richtigen Zugang erhalten hat. Es kann nach der Registrierung bis zu 24h dauern, bis du freigeschalten wirst. Sollte das Problem danach weiterhin bestehen, wende dich an talents@zenjob.com, um den Zugang zu den vollständigen Lerninhalten anzufragen.
</div>
@ -34,21 +34,31 @@
<div class="np-homepage-content">
<div class="np-homepage-hero-content">
<div class="np-homepage-headline" style="color: #fff">
{{ homepage.headline }}
</div>
<span data-lang="DE">{{ homepage.headline }}</span>
<span data-lang="EN">Welcome to our Zenjob Online Campus!</span>
</div>
<div class="np-homepage-subheadline">
<span>Hallo {{ current_person.first_name }}, hier bereiten wir dich auf alles vor, was du für deine erste Schicht als
<span data-lang="DE">Hallo {{ current_person.first_name }}, hier bereiten wir dich auf alles vor, was du für deine erste Schicht als
<div class="dropdown homepage-content-dropdown">
<button class="dropbtn">Job auswählen</button>
<div class="dropdown-content">
<a href="#kassierer-in" data-category="087ea56d-888b-4e0f-af1f-68627318c841">Kassierer*in</a>
<a href="#kellner-in" data-category="9be55234-19c5-4df4-bd1d-03e93f0faf83">Kellner*in</a>
<a href="#warenverräumer-in" data-category="6580e10e-eacf-402d-a330-51d202721cce">Warenverräumer*in</a>
{% comment %} <a href="#" data-category="a63019c7-0a46-40bd-bc1b-935c887a4380">Logistikhelfer*in</a> {% endcomment %}
<a href="#kassierer-in" data-category-name="Kassierer/in">Kassierer*in</a>
<a href="#kellner-in" data-category-name="Kellner/in">Kellner*in</a>
<a href="#warenverräumer-in" data-category-name="Warenverräumer/in">Warenverräumer*in</a>
</div>
</div>
wissen musst.
</span>
<span data-lang="EN">Hello {{ current_person.first_name }}, here we prepare you for everything you need to know for your first shift as a
<div class="dropdown homepage-content-dropdown">
<button class="dropbtn">select job</button>
<div class="dropdown-content">
<a href="#kassierer-in" data-category-name="Kassierer/in">Cashier</a>
<a href="#kellner-in" data-category-name="Kellner/in">Waitress</a>
<a href="#warenverräumer-in" data-category-name="Warenverräumer/in">Goods mover</a>
</div>
</div>
</span>
</div>
</div>
@ -56,10 +66,10 @@
{% for course in catalog_courses %}
{% if course.properties.homepage_course %}
{% for cat in course.categories %}
{% if cat.id == "087ea56d-888b-4e0f-af1f-68627318c841" or cat.id == "9be55234-19c5-4df4-bd1d-03e93f0faf83" or cat.id == "6580e10e-eacf-402d-a330-51d202721cce" or cat.id == "a63019c7-0a46-40bd-bc1b-935c887a4380" %}
<div class="col-xs-12 col-sm-6 col-md-3 homepage-card-column" style="display:none;" data-category="{{cat.id}}">
{% if cat.id == "087ea56d-888b-4e0f-af1f-68627318c841" or cat.id == "9be55234-19c5-4df4-bd1d-03e93f0faf83" or cat.id == "6580e10e-eacf-402d-a330-51d202721cce" or cat.id == "a63019c7-0a46-40bd-bc1b-935c887a4380" or cat.name == "Warenverräumer/in" or cat.name == "Kellner/in" or cat.name == "Kassierer/in" %}
<div class="col-xs-12 col-sm-6 col-md-3 homepage-card-column" style="display:none;" data-category="{{cat.id}}" data-category-name="{{cat.name}}" data-lang="{{course.properties.course_language}}">
<a href="{% route course, id: course.id %}" class="homepage-card">
<div class="homepage-card-content">
<div class="homepage-card-content">
<div class="homepage-card-img">
<img src="https://s3.amazonaws.com/static.northpass.com/zenjob/FINAL+-+Zenjob+(Purple+Cashier).png" alt="">
</div>
@ -75,11 +85,17 @@
{% endfor %}
{% for learning_path in learning_paths.available %}
{% assign learning_path_lang = "DE" %}
{% for learning_path_cat in learning_path.categories %}
{% if learning_path_cat.id == "087ea56d-888b-4e0f-af1f-68627318c841" or learning_path_cat.id == "9be55234-19c5-4df4-bd1d-03e93f0faf83" or learning_path_cat.id == "6580e10e-eacf-402d-a330-51d202721cce" or learning_path_cat.id == "a63019c7-0a46-40bd-bc1b-935c887a4380" %}
<div class="col-xs-12 col-sm-6 col-md-3 homepage-card-column" style="display:none;" data-category="{{learning_path_cat.id}}">
{% if learning_path_cat.name == "English" %}
{% assign learning_path_lang = "EN" %}
{% endif %}
{% endfor %}
{% for learning_path_cat in learning_path.categories %}
{% if learning_path_cat.id == "087ea56d-888b-4e0f-af1f-68627318c841" or learning_path_cat.id == "9be55234-19c5-4df4-bd1d-03e93f0faf83" or learning_path_cat.id == "6580e10e-eacf-402d-a330-51d202721cce" or learning_path_cat.id == "a63019c7-0a46-40bd-bc1b-935c887a4380" or learning_path_cat.name == "Warenverräumer/in" or learning_path_cat.name == "Kellner/in" or learning_path_cat.name == "Kassierer/in" %}
<div class="col-xs-12 col-sm-6 col-md-3 homepage-card-column" style="display:none;" data-category="{{learning_path_cat.id}}" data-category-name="{{learning_path_cat.name}}" data-lang="{{learning_path_lang}}">
<a href="{% route learning_path, id: learning_path.id %}" class="homepage-card">
<div class="homepage-card-content">
<div class="homepage-card-content">
<div class="homepage-card-img">
<img src="https://s3.amazonaws.com/static.northpass.com/zenjob/opened-book.png" alt="">
</div>
@ -100,9 +116,9 @@
{% endif %}
<style>
.np-header {
background: transparent;
}
main.np-homepage {
@ -323,33 +339,55 @@
</style>
<script>
$("document").ready(function() {
if (window.location.hash) {
filterCoursesByHash(window.location.hash)
} else {
//$(".homepage-card-column[data-category='087ea56d-888b-4e0f-af1f-68627318c841']").show()
if ($("body").attr("data-lang") == "DE") {
$(".homepage-card-column[data-category-name='Kassierer/in'][data-lang='DE']").show()
} else if ($("body").attr("data-lang") == "EN") {
$(".homepage-card-column[data-category-name='Kassierer/in'][data-lang='EN']").show()
}
if (window.location.hash) {
filterCoursesByHash(window.location.hash)
} else {
$(".homepage-card-column[data-category='087ea56d-888b-4e0f-af1f-68627318c841']").show()
}
}
})
$(".dropdown-content a").click(function() {
$(".dropbtn").text($(this).text())
filterCoursesBySelectedJob($(this))
})
function filterCoursesBySelectedJob(selection) {
const selectedCategoryId = $(selection).data("category")
const selectedCategory = $(selection).data("category-name")
$(".homepage-card-column").hide()
$(`.homepage-card-column[data-category='${selectedCategoryId}']`).show()
if ($("body").attr("data-lang") == "DE") {
$(`.homepage-card-column[data-category-name='${selectedCategory}'][data-lang='DE']`).show()
} else if ($("body").attr("data-lang") == "EN") {
$(`.homepage-card-column[data-category-name='${selectedCategory}'][data-lang='EN']`).show()
}
}
function filterCoursesByHash(urlHash) {
$(".dropdown-content a").each(function() {
if ($(this).attr('href') == urlHash) {
$(".dropbtn").text($(this).text())
filterCoursesBySelectedJob($(this))
}
})
if ($("body").attr("data-lang") == "DE") {
$("span[data-lang='DE'] .dropdown-content a").each(function() {
if ($(this).attr('href') == urlHash) {
$("span[data-lang='DE'] .dropbtn").text($(this).text())
filterCoursesBySelectedJob($(this))
}
})
} else if ($("body").attr("data-lang") == "EN") {
$("span[data-lang='EN'] .dropdown-content a").each(function() {
if ($(this).attr('href') == urlHash) {
$("span[data-lang='EN'] .dropbtn").text($(this).text())
filterCoursesBySelectedJob($(this))
}
})
}
}
</script>