Files
Gainsight/Custom_Templates/customer_templates/G2/_cards_course.html.liquid

104 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-03-02 13:59:50 -05:00
{% assign activities_count = 0 %}
{% for course_section in course.sections %}
{% for course_activity in course_section.activities %}
{% assign activities_count = activities_count | plus: 1 %}
{% endfor %}
{% endfor %}
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
<div class="np-card">
<div class="np-card-container">
<a href="{{ course_path }}">
<img
class="np-card-image"
alt="{{ course.name }}"
src="{{ course.image_url }}"
>
</a>
<div class="np-card-content np-card-content-vertical np-card-padding">
<a class="np-card-content-title" href="{{ course_path }}">
{{ course.name }}
</a>
<div class="np-card-content-subtitle">
2022-09-16 15:43:56 -04:00
{{ course.short_description }}
2022-03-02 13:59:50 -05:00
</div>
2023-01-24 15:30:29 -05:00
<a class="np-card-content-lessons" href="{{course_path}}#course-overview">
2022-03-02 13:59:50 -05:00
{{ activities_count }} {% if activities_count == 1 %}Lesson{% else %}Lessons{% endif %}
2023-01-24 15:30:29 -05:00
</a>
2022-03-02 13:59:50 -05:00
</div>
</div>
</div>
<style>
.np-card {
padding: 25px 30px !important;
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
.np-card-content {
2022-08-23 09:53:51 -04:00
padding: 16px 25px 25px;
}
.np-card-container {
box-shadow: 0px 0px 0px 1px #d8d8d8 inset;
border-radius:8px;
2022-03-02 13:59:50 -05:00
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
.np-card-content-title {
color: rgb(38, 49, 61);
2022-08-23 09:53:51 -04:00
font-size: 24px;
line-height:26px;
2022-03-02 13:59:50 -05:00
font-weight: 800;
text-decoration: none;
2022-08-23 09:53:51 -04:00
margin: 10px 0 20px;
2022-03-02 13:59:50 -05:00
overflow: clip;
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
.np-card-content-subtitle {
font-size: 18px;
font-weight: 400;
color: rgba(0,0,0,.75);
height: 100px;
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
.np-card-content-lessons {
color: rgb(38, 49, 61);
font-weight: 800;
2022-08-23 09:53:51 -04:00
font-size: 16px;
2022-03-02 13:59:50 -05:00
margin-top: 20px;
2022-08-23 09:53:51 -04:00
line-height: 22px;
2023-01-24 15:30:29 -05:00
text-decoration: none;
2022-03-02 13:59:50 -05:00
}
2022-08-23 09:53:51 -04:00
/*.np-card-content-footer {
2022-03-02 13:59:50 -05:00
margin-top: 40px;
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
.np-button {
height: 53px;
border-radius: 100px;
padding: 12px 45px;
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
.np-card-content-progress {
font-size: 18px;
margin: auto 0;
2022-08-23 09:53:51 -04:00
}*/
@media (min-width:768px) {
.np-card-content-title {
font-size: 28px;
line-height:26px;
}
.np-card-content-lessons {
font-size: 21px;
line-height: 29px;
}
2022-03-02 13:59:50 -05:00
}
2022-08-23 09:53:51 -04:00
2022-03-02 13:59:50 -05:00
</style>