Some notes and file clean up. JJSV Templates
This commit is contained in:
@ -1,17 +1,32 @@
|
||||
<div class="np-card">
|
||||
{% assign content_expired = false %}
|
||||
{% assign now = "now" | date: "%m/%d/%Y" %}
|
||||
|
||||
{% if now >= course.properties.content_expiration %}
|
||||
{% assign content_expired = true %}
|
||||
{% endif %}
|
||||
|
||||
{% unless content_expired %}
|
||||
<div class="np-card">
|
||||
<div class="np-card-container">
|
||||
<div class="np-card-image-content-top">
|
||||
{% if course.ribbon %}
|
||||
<div class="np-card-ribbon">
|
||||
{{ course.ribbon }}
|
||||
</div>
|
||||
<img
|
||||
class="np-card-image"
|
||||
alt="{{ course.name }}"
|
||||
src="{{ course.image_url }}"
|
||||
>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="np-card-image-content-top"></div>
|
||||
<img
|
||||
class="np-card-image"
|
||||
alt="{{ course.name }}"
|
||||
src="{{ course.image_url }}"
|
||||
>
|
||||
</div>
|
||||
<div class="np-card-content np-card-content-vertical np-card-padding course-card-content">
|
||||
<p class="course-title-vision">
|
||||
<div class="course-title-vision">
|
||||
{{ course.name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="course-desc">
|
||||
{{ course.full_description }}
|
||||
</div>
|
||||
<div class="np-card-content-footer">
|
||||
<div class="np-card-content-progress np-button-color">
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
@ -21,25 +36,24 @@
|
||||
{% else %}
|
||||
Not viewed
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
|
||||
<a
|
||||
class="np-button-font-color np-button" href="{% route course_enrollment, code: course.enrollment_code %}"
|
||||
class="np-button-font-color np-button" href="{{course_path}}"
|
||||
>
|
||||
{% if course.enrolled? == false %}
|
||||
{% t shared.enroll %}
|
||||
{% elsif course.started? == false %}
|
||||
View
|
||||
{% elsif course.completed? %}
|
||||
{% t shared.course.view, key: current_school.course_vocabulary %}
|
||||
{% else %}
|
||||
{% if course.started? == false %}
|
||||
Start
|
||||
{% elsif course.progress > 0 and course.progress < 100 %}
|
||||
{% t shared.continue %}
|
||||
{% elsif course.completed? %}
|
||||
Resume
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endunless %}
|
||||
|
||||
<style>
|
||||
|
||||
@ -54,11 +68,20 @@
|
||||
|
||||
.np-card {
|
||||
margin-bottom: 10px!important;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.course-title-vision {
|
||||
font-family: "PlusJakartaSans-Bold", !important;
|
||||
font-family: "PlusJakartaSans-Bold", sans-serif!important;
|
||||
font-weight: 700;
|
||||
margin-bottom:8px;
|
||||
font-size:18px;
|
||||
}
|
||||
|
||||
.course-desc {
|
||||
flex:2;
|
||||
}
|
||||
|
||||
.np-card .np-card-content-footer .np-button {
|
||||
|
||||
Reference in New Issue
Block a user