Add statics

This commit is contained in:
Andros Fenollosa
2021-06-23 15:10:44 +02:00
parent a901b8d54a
commit 9f6fcf447d
171 changed files with 35808 additions and 14 deletions

View File

@ -1,8 +1,11 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %} | Djanker News</title>
<script src="{% static 'js/vue.min.js' %}"></script>
<script defer src="{% static 'js/home.js' %}"></script>
</head>
<body>
<header>
@ -15,7 +18,7 @@
</li>
</ul>
</header>
<main>
<main id="app">
<h1>Djanker News</h1>
{% block main %}{% endblock %}
</main>

View File

@ -1,12 +1,11 @@
{% extends 'layouts/base.html' %}
{% block title %}Welcome{% endblock %}
{% block main %}
{% for item in news %}
<article>
<h2>{{ item.title }}</h2>
<article v-for="item in news">
<h2><span>[[ item.votes ]]</span> - [[ item.title ]]</h2>
<p>
<a href="{{ item.url }}">Ver completo</a>
<a :href="item.url" target="_blank">Ver completo</a>
<button @click.prevent="votar(item.id)">Votar</button>
</p>
</article>
{% endfor %}
{% endblock %}