{% extends 'base.html' %}
{% load markdownify %}
{% block content %}
<div class="row container">
<div class="section slogan">
<h2 class="center-align" style="font-weight:bold">Challenges<br></h2>
</div>
<div class="row container challenges">
<div class="row">
{% for challenge in challenges %}
<div class="col s12 m4">
<div class="card">
<div class="card-content" style="overflow: hidden; height:200px;">
<div class="card-title"><b>{{ challenge.name }}</b></div>
<p style="text-align: justify;">
{% if challenge.blurb %}
{{ challenge.blurb | markdownify }}
{% else %}
{{ challenge.description|slice:":500" | markdownify }}
{% endif %}
</p>
<div style="padding-top: 15px;">
{% for tag in challenge.tags.all %}
<div class="chip">{{ tag.name }}</div>
{% endfor %}
<div class="card-action">
<a href="/challenge/{{ challenge.id }}" class="btn-large lightlink">I can do it</a>
{% endblock %}