fix: icon position on course card

This commit is contained in:
Jannat Patel
2022-03-17 15:17:21 +05:30
parent 9351edebe0
commit 984054f00f

View File

@@ -25,25 +25,27 @@
</div> </div>
{% endif %} {% endif %}
{% set student_count = get_students(course.name) | length %} <div class="vertically-center">
{% if student_count %} {% set student_count = get_students(course.name) | length %}
<div class="vertically-center"> {% if student_count %}
<svg class="icon icon-md"> <div class="vertically-center">
<use class="" href="#icon-users"> <svg class="icon icon-md">
</svg> <use class="" href="#icon-users">
{{ student_count }} </svg>
</div> {{ student_count }}
{% endif %} </div>
{% set avg_rating = get_average_rating(course.name) %}
{% if avg_rating %}
<div class="vertically-center">
<svg class="icon icon-md">
<use href="#icon-star"></use>
</svg>
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
</div>
{% endif %} {% endif %}
{% set avg_rating = get_average_rating(course.name) %}
{% if avg_rating %}
<div class="vertically-center ml-3">
<svg class="icon icon-md">
<use href="#icon-star"></use>
</svg>
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
</div>
{% endif %}
</div>
</div> </div>
<div class="course-card-title">{{ course.title }}</div> <div class="course-card-title">{{ course.title }}</div>