demo-hackernews-with-django.../app/web/templates/pages/list.html

11 lines
377 B
HTML
Raw Permalink Normal View History

2021-06-22 15:43:26 +02:00
{% extends 'layouts/base.html' %}
{% block title %}Welcome{% endblock %}
{% block main %}
2021-06-23 15:10:44 +02:00
<article v-for="item in news">
<h2><span>[[ item.votes ]]</span> - [[ item.title ]]</h2>
2021-06-22 15:43:26 +02:00
<p>
2021-06-23 15:10:44 +02:00
<a :href="item.url" target="_blank">Ver completo</a>
<button @click.prevent="votar(item.id)">Votar</button>
2021-06-22 15:43:26 +02:00
</p>
</article>
{% endblock %}