ku-polls/polls/templates/polls/home.html
sosokker e0c7995f28 Add is_published, can_vote to QuestionModel/ Add test for can_vote, is_published
is_published -> Check if the specific question able to be published
can_vote -> Can vote or not, check it from pub time

Delete some unnecessary files
2023-09-05 21:25:04 +07:00

27 lines
914 B
HTML

{% extends 'polls/base.html' %}
{% block content %}
<main>
<section class="hero-section">
<div class="hero-content">
<h1>Welcome to KU Polls</h1>
<p>Explore and participate in our weird poll questions.</p>
</div>
</section>
<section class="polls-section">
<h2>Recent Polls</h2>
<p class="total-polls">Total number of polls: {{ total_open_polls }}</p>
<div class="poll-cards">
{% if latest_question_list %}
{% for question in latest_question_list %}
<div class="poll-card">
<h3><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a></h3>
</div>
{% endfor %}
{% else %}
<p>No polls are available.</p>
{% endif %}
</div>
</section>
{% endblock content %}