fix: sketch cards

This commit is contained in:
pateljannat
2021-08-10 16:39:17 +05:30
parent d5067a4bcd
commit aedb3d3d45
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<div class="common-card-style sketch-teaser">
<div class="sketch-image">
<a href="/sketches/{{sketch.sketch_id}}">
<img src="/s/{{sketch.sketch_id}}.svg" />
</a>
</div>
<div class="sketch-footer">
<div class="sketch-title">
{{sketch.title}}
</div>
<div class="card-divider"></div>
{% set owner = sketch.get_owner() %}
<div>
<span class="">
{{ widgets.Avatar(member=owner, avatar_class="avatar-small") }}
<a class="button-links" href="/{{owner.username}}">
<span class="course-instructor">
{{ owner.full_name }}
</span>
</a>
</span>
<!-- below html would require changes based on if the user has liked the sketch or not -->
{% if show_likes %}
<span class="course-student-count">
<span>
<img class="icon-background" src="/assets/community/icons/like.svg" />
{{ likes }}
</span>
</span>
{% endif %}
</div>
</div>
<a class="stretched-link" href="sketches/{{sketch.sketch_id}}"></a>
</div>