added filter and some design things

This commit is contained in:
Esther Kleinhenz
2018-11-18 18:39:08 +01:00
parent b03b106fd8
commit 94573dc28b
23 changed files with 318 additions and 125 deletions
+2 -2
View File
@@ -60,13 +60,13 @@
<li class="nav-item">
<a class="nav-link" href="{% url 'post_draft_list' %}" class="top-menu"><span class="glyphicon glyphicon-edit">Entwürfe</span></a>
</li>
{% else %}
{% elif user.is_authenticated %}
<li class="nav-item">
<a class="nav-link" href="{% url 'tag_list' %}">{{user.get_username}}'s Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'search_add' %}">Suche</a>
</li>
</li>
{% endif %}
</ul>
+27 -28
View File
@@ -1,42 +1,41 @@
{% extends 'base.html' %} {% block content %}
<div class="row">
{% if tag %} <div class="mx-auto">
<h2> Artikel mit dem Tag "{{ tag.name }}" </h2>
</div>{% endif %}
</div>
<div class="row">
<div class="mx-auto">
<h1> Artikleübersicht </h1>
</div>
<div class="mx-auto">
<h1> Artikleübersicht </h1>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="col-md-8">
{% if messages %} <div class="messages">
{% for message in messages %}
<p {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% for post in posts %}
<div class="mt-5 post">
<div class="date">
{{ post.published_date }}
{% if messages %}
<div class="messages">
{% for message in messages %}
<p {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% for post in posts %}
<div class="mt-5 post">
<div class="date">
{{ post.published_date }}
</div>
<h2>
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
</h2>
<p>{{ post.text|linebreaks }}</p>
Tags: {% for tag in post.tags.all %}
<a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
{% if not forloop.last %}, {% endif %} {% endfor %} <p>
{{ post.author }}
</p>
</div>
{% endfor %}
</div>
<h2>
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
</h2>
<p>{{ post.text|linebreaks }}</p>
Tags: {% for tag in post.tags.all %}
<a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
{% if not forloop.last %}, {% endif %} {% endfor %} <p>
{{ post.author }}
</p>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
+24 -1
View File
@@ -28,5 +28,28 @@
<input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
<div>
<div class="row">
<div class="col-md-8">
<div>
{% for post in posts %}
<div class="mt-5 post">
<div class="date">
{{ post.published_date }}
</div>
<h2>
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
</h2>
<p>{{ post.text|linebreaks }}</p>
Tags: {% for tag in post.tags.all %}
<a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
{% if not forloop.last %}, {% endif %} {% endfor %} <p>
{{ post.author }}
</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}
+24 -23
View File
@@ -1,13 +1,12 @@
{% extends "base.html" %} {% block content %}
{% load taggit_templatetags2_tags %}
<div class="container-fluid">
<div class="modal-body row">
<div class="col-md-6">
<div class="container">
<div class="row equal">
<div class="col-md-6" >
<h1> Alle Tags im Überblick<br>
</h1>
<div class="col-md-10">
<div style="border:solid; text-align:center;padding:5px;">
<div class="col-md-8" style="zoom: 1.6">
<div style="text-align:center;padding:5px;">
{% get_tagcloud as tags for 'application' %}
{% include_tagcloud 'application.Post' %}
</div>
@@ -25,7 +24,7 @@
</button>
</span>
</form>
<div>
<div class="pt-4">
{% for post in posts %}
<div class="post">
<div class="date">
@@ -51,30 +50,32 @@
</h1>
<div class="col-md-10">
{% if tags %}
<div style="border:solid; text-align:center;padding:5px;">
<div style="text-align:center;padding-top:40px;">
{% for tag in tagsuser %}
{{ tag.name }}
{% if not forloop.last %}, {% endif %}
<a class="text-white bg-dark p-3" href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
{% endfor %}
</div>
{% endif %}
</div>
<div style="padding-bottom:40px;">
<div style="padding-bottom:145px;">
</div>
<div>
Abonniere deine Tags hier!
</div>
<form class="post-form" method="post">
{% csrf_token %} {{form.as_p}}
<button type="submit" class="save btn btn-outline-dark">Sichern</button>
</form>
<div class="mx-auto">
{% if messages %}
{% for message in messages %}
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
{% endfor %}
{% endif %}
<div>
Abonniere deine Tags hier!
</div>
<form class="post-form" method="post">
{% csrf_token %} {{form.as_p}}
<button type="submit" class="save btn btn-outline-dark">Sichern</button>
</form>
{% if messages %}
{% for message in messages %}
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>
+7 -4
View File
@@ -29,8 +29,11 @@
</div>
</div>
<div class="mt-5 col-md-4">
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
</a>
<div class="float-right">
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
</a>
</div>
</div>
{% endblock %}
</div>
{% endblock %}