Moved around some Ghost Notes and reorged. Updated Humly's templates. Added Walmart notes.

This commit is contained in:
Norm Rasmussen
2023-10-04 17:45:15 -04:00
parent 363f83ef61
commit a610b52c6e
21 changed files with 311 additions and 380 deletions

View File

@ -0,0 +1,68 @@
<div class="np-card np-no-horizontal-padding">
<div class="np-card-container">
<div class="np-learning-path">
<img
alt="{{ learning_path.name }}"
class="np-card-image np-learning-path-image"
src="{{ learning_path.image_url }}"
/>
<div class="np-card-text-wrapper">
<div class="np-hidden-desktop np-card-header">
<i class="np-card-header-icon far fa-road"></i>
<div class="np-card-header-type">{% t shared.learning_path.title %}</div>
<div class="np-hidden-desktop np-card-header-items-count">
{{ learning_path.items.count }} {% t .items %}
</div>
</div>
<div class="np-hidden-mobile np-card-header">
<div class="np-card-header-type">{% t shared.learning_path.title %}</div>
<i class="np-card-header-icon far fa-road"></i>
</div>
<div class="np-card-content np-card-padding np-card-content-vertical">
<h3 class="np-card-content-title">
{{ learning_path.name }}
</h3>
<div class="np-card-content-subtitle">
{{ learning_path.instructor_names }}
</div>
<div class="np-hidden-mobile np-card-content-description">
{{ learning_path.description }}
</div>
<div class="np-hidden-mobile np-card-content-progress
np-button-color">
{% t shared.progress, count: learning_path.progress %}
</div>
<div class="np-hidden-mobile np-card-progress-bar-container">
<div
style="width: {{ learning_path.progress }}%"
class="np-button-background-color np-card-progress-bar">
</div>
</div>
<div class="np-card-content-footer">
<div class="np-hidden-desktop np-card-content-progress
np-button-color">
{% t shared.progress, count: learning_path.progress %}
</div>
<a class="np-button" href="{% route learning_path, id: learning_path.id %}">
{% t shared.view %}
</a>
<span class="np-hidden-mobile np-learning-path-items">
<i class="np-button-color np-learning-path-items-icon far fa-graduation-cap"></i>
<span class="np-learning-path-items-count">
{{ learning_path.items.count }} {% t .items %}
</span>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="np-card-stack">
<div class="np-card-stack-level-1"></div>
<div class="np-card-stack-level-2"></div>
</div>
</div>

View File

@ -0,0 +1,10 @@
{% assign all_courses = "047b6bad-756a-481f-8d1b-7be7425420e7,50718fac-6f3e-4684-aeab-ad5cfebfc295,c5612801-4d64-44af-a575-4cd08d344214,e23fd4a0-ed77-45e7-8ca9-99aefdb7b65f,626466d4-aea1-4a83-a0af-cd675936fd3f,2626061b-4335-4e93-9a65-a71581514411,22f1ac6f-b9c5-4d09-94c9-88c63c9b346d,92578497-a67a-45da-8969-ab9af432b5ea,811a63f2-1ad8-468e-ae73-18765ac03150,605cfca3-c0ce-42a5-913c-7f79389cdd6e" | split: "," %}
{% unless all_courses contains course.id %}
<h3 class="np-card-heading">
{% t .header, key: current_school.course_vocabulary %}
</h3>
{% endunless %}
<div class="np-card-text">
{{ course.full_description }}
</div>

View File

@ -0,0 +1,30 @@
<h3 class="np-card-heading">
{% t .header %}
</h3>
<div class="np-flex row">
{% for instructor in course.instructors %}
<div class="np-content-instructors-content-item col-xs-12 col-md-6">
<img
src="{{ instructor.avatar_url }}"
class="np-content-instructors-content-image"
alt="{{ instructor.name }}"
/>
<div class="np-content-instructors-content-description">
<div class="np-content-instructors-content-name">
{{ instructor.name }}
</div>
<div class="np-content-instructors-content-info np-text-light">
{{ instructor.title }}
</div>
</div>
</div>
{% endfor %}
</div>
<style>
@media screen and (min-width: 768px) {
.np-content-instructors-content-item {
margin-right: 0;
}
}
</style>

View File

@ -0,0 +1,32 @@
{% if courses.in_catalog.any? %}
{% assign person_groups = current_person.groups | map: "name" %}
{% assign language = "English" %}
<div class="np-catalog-courses row row-with-thumbnails">
{% for course in courses.in_catalog %}
{% if person_groups.any? %}
{% if person_groups contains "UK applicants" or person_groups contains "UK teachers" %}
{% assign language = "English" %}
{% elsif person_groups contains "SWE applicants" or person_groups contains "SWE teachers" %}
{% assign language = "Swedish" %}
{% else %}
{% assign language = "English" %}
{% endif %}
{% else %}
{% assign language = "English" %}
{% endif %}
{% if course.properties.language == language %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_course" with course %}
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
{% capture message %}
{% t shared.zero_state.courses.catalog,
key: current_school.course_vocabulary
%}
{% endcapture %}
{% include "courses_zero_state", message: message %}
{% endif %}

View File

@ -0,0 +1,16 @@
<div class="np-learning-paths-resources">
{% if items.any? %}
{% for learning_path in items %}
{% include "cards_learning_path" with learning_path %}
{% endfor %}
{% else %}
{% comment %}
<div class="np-learning-paths-resources-container">
<div class="np-zero-state-text">
{% t .empty %}
</div>
<img class="np-zero-state-learning-paths" alt="{% t .empty %}" />
</div>
{% endcomment %}
{% endif %}
</div>

View File

@ -0,0 +1,21 @@
{%- comment -%} {% if messages.alert.size > 0 %}
{% unless message.alert contains "You need to log in or sign up before continuing." %}
<div class="np-alert np-alert-error">
<div class="np-alert-wrapper">
{% for message in messages.alert %}
<div>{{ message }}</div>
{% endfor %}
</div>
</div>
{% endunless %}
{% endif %} {%- endcomment -%}
{% if messages.notice.size > 0 %}
<div class="np-alert np-alert-success">
<div class="np-alert-wrapper">
{% for message in messages.notice %}
<div>{{ message }}</div>
{% endfor %}
</div>
</div>
{% endif %}

View File

@ -0,0 +1,15 @@
<nav class="np-sub-navigation">
<div class="np-sub-navigation-content">
{% for link in navigations.sub_navigation %}
{% unless link.url == "/app/dashboard" %}
<div class="np-sub-navigation-content-item {{ link.active_class }}">
<a class="np-sub-navigation-content-item-link" href="{{ link.url }}">
<i class="{{ link.icon }} np-button-color np-sub-navigation-content-item-icon"></i>
{{ link.label }}
</a>
<div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
</div>
{% endunless %}
{% endfor %}
</div>
</nav>

View File

@ -0,0 +1,3 @@
<script>
window.location.href = "/app"
</script>

View File

@ -0,0 +1,59 @@
{% include "header" %}
{% include "course_version_outdated_alert", courses: courses.featured %}
<main class="np-main np-homepage">
<div class="np-homepage-hero">
<img class="np-homepage-hero-image"
src="{{ homepage.artwork_url }}"
alt="{{ homepage.headline }}"
/>
<div class="np-homepage-hero-content">
<div class="np-homepage-headline np-header-font-color">
{{ homepage.headline }}
</div>
<div class="np-homepage-subheadline np-header-font-color">
{{ homepage.subheadline }}
</div>
<a class="np-homepage-hero-cta np-button" href="{% route catalog %}">
{% t .discover %}
</a>
</div>
</div>
{% include "sub_navigation" %}
</main>
<main class="np-main np-dashboard np-subpage-container np-max-width">
<div class="np-homepage-featured np-max-width">
<div class="row np-flex-center">
<div class="col-xs-12 col-sm-8">
{% if features.learning_paths? %}
{% if learning_paths.enrolled.any? %}
<div class="np-dashboard-resources-title">
{% t shared.learning_paths %}
</div>
{% include "learning_paths_index", items: learning_paths.enrolled %}
{% endif %}
{% else %}
{% endif %}
<div class="np-dashboard-resources-title">
{% t shared.course_vocabulary.plural, key: current_school.course_vocabulary %}
</div>
{% include "courses_index", class: "col-xs-12 col-sm-6 np-stretch-content" %}
</div>
{% if features.training_events? %}
<div class="np-grid-spacing col-xs-12 col-sm-4">
<div class="np-dashboard-resources-title">
UPCOMING EVENTS
</div>
{% include "training_events_dashboard" %}
</div>
{% endif %}
</div>
</div>
</main>
{% include "footer" %}
<style>
.np-homepage {
margin-bottom: 0;
}
</style>