changed tempalte design
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<a class="nav-link" href="{% url 'tag_list' %}">Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'blog_search_list_view' %}">Suche</a>
|
||||
<a class="nav-link" href="{% url 'search_add' %}">Suche</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'post_new' %}" class="top-menu"><span class="glyphicon glyphicon-plus">+</span></a>
|
||||
@@ -52,7 +52,7 @@
|
||||
<a class="nav-link" href="{% url 'tag_list' %}">Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'blog_search_list_view' %}">Suche</a>
|
||||
<a class="nav-link" href="{% url 'search_add' %}">Suche</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'post_new' %}" class="top-menu"><span class="glyphicon glyphicon-plus">+</span></a>
|
||||
@@ -65,7 +65,7 @@
|
||||
<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 'blog_search_list_view' %}">Suche</a>
|
||||
<a class="nav-link" href="{% url 'search_add' %}">Suche</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
<div class="content container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-12">
|
||||
{% block content %} {% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,37 +1,38 @@
|
||||
{% extends 'base.html' %}{% block content %}
|
||||
{% load hitcount_tags %}
|
||||
<div class="post">
|
||||
|
||||
{% if post.published_date %}
|
||||
<div class="date">
|
||||
{{ post.published_date }}
|
||||
<div class="col-md-8">
|
||||
<div class="post">
|
||||
{% if post.published_date %}
|
||||
<div class="date">
|
||||
{{ post.published_date }}
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
|
||||
{% endif %} {% if user.is_staff and user == post.author %}
|
||||
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
|
||||
<span class="glyphicon glyphicon-pencil">Bearbeiten</span>
|
||||
</a>
|
||||
<a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
|
||||
<span class="glyphicon glyphicon-remove">Löschen</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
<p>{{ post.text|linebreaksbr }}</p>
|
||||
<p>
|
||||
Tags:
|
||||
{% for tag in post.tags.all %}
|
||||
<a href="{% url 'search_add' %}">{{ tag.name }} </a>
|
||||
{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
Autor: {{ post.author }}
|
||||
</p>
|
||||
{% if user.is_staff %}
|
||||
<p>
|
||||
{% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen!
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
|
||||
{% endif %} {% if user.is_staff and user == post.author %}
|
||||
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
|
||||
<span class="glyphicon glyphicon-pencil">Bearbeiten</span>
|
||||
</a>
|
||||
<a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
|
||||
<span class="glyphicon glyphicon-remove">Löschen</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
<p>{{ post.text|linebreaksbr }}</p>
|
||||
<p>
|
||||
Tags:
|
||||
{% for tag in post.tags.all %}
|
||||
<a href="{% url 'blog_search_list_view' %}">{{ tag.name }} </a>
|
||||
{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
Autor: {{ post.author }}
|
||||
</p>
|
||||
{% if user.is_staff %}
|
||||
<p>
|
||||
{% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen!
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,11 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
<div class="post">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h1> Unveröffentliche Artikel<br>
|
||||
</h1>
|
||||
{% for post in posts %}
|
||||
<div class="post mt-5">
|
||||
<p class="date">created: {{ post.created_date|date:'d-m-Y' }}</p>
|
||||
<h1><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h1>
|
||||
<p>{{ post.text|truncatechars:200 }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -1,9 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Artikel-Editor</h1>
|
||||
<form method="POST" class="post-form">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="mx-auto">
|
||||
<h1>Artikel-Editor</h1>
|
||||
<form method="POST" class="mt-5 post-form">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="save btn btn-outline-dark">Sichern</button>
|
||||
</form>
|
||||
<button type="submit" class="save btn btn-outline-dark">Sichern</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,20 +1,34 @@
|
||||
{% extends 'base.html' %} {% block content %}
|
||||
{% if tag %} Posts tagged with "{{ tag.name }}" {% endif %}
|
||||
{% if messages %}
|
||||
<div class="messages">
|
||||
{% for message in messages %}
|
||||
<p {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</p>
|
||||
{% endfor %}
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<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="post">
|
||||
<div class="mt-5 post">
|
||||
<div class="date">
|
||||
{{ post.published_date }}
|
||||
</div>
|
||||
<h1>
|
||||
<h2>
|
||||
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
|
||||
</h1>
|
||||
</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>
|
||||
@@ -22,6 +36,7 @@
|
||||
{{ post.author }}
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
+15
-10
@@ -2,10 +2,11 @@
|
||||
{% load taggit_templatetags2_tags %}
|
||||
<div class="container-fluid">
|
||||
<div class="modal-body row">
|
||||
<div class="col-md-8">
|
||||
<p> Alle Tags im Überblick<br>
|
||||
</p>
|
||||
<div class="col-md-5">
|
||||
<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;">
|
||||
{% get_tagcloud as tags for 'application' %}
|
||||
{% include_tagcloud 'application.Post' %}
|
||||
@@ -43,28 +44,32 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p> Bereits abonnierten Tags
|
||||
</p>
|
||||
<div class="col-md-6">
|
||||
<h1> Bereits abonnierten Tags
|
||||
</h1>
|
||||
<div class="col-md-10">
|
||||
{% if tags %}
|
||||
{% if tags %}
|
||||
<div style="border:solid; text-align:center;padding:5px;">
|
||||
{% for tag in tagsuser %}
|
||||
{{ tag.name }}
|
||||
{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="padding-bottom:40px;">
|
||||
</div>
|
||||
Abonniere deine Tags hier!
|
||||
<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>
|
||||
@@ -1,14 +0,0 @@
|
||||
{% extends "base.html" %} {% block content %} {% load taggit_templatetags2_tags %}
|
||||
{% get_taglist as tags for 'application.post'%}
|
||||
|
||||
<div>
|
||||
<form class="post-form" method="post">
|
||||
{% csrf_token %} {{form.as_p}}
|
||||
<button type="submit" class="save btn btn-outline-dark">Save</button>
|
||||
</form>
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,28 +1,36 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
{% load taggit_templatetags2_tags %}
|
||||
|
||||
<div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
|
||||
</a>
|
||||
|
||||
{% for post in posts %}
|
||||
<div class="post">
|
||||
<div class="date">
|
||||
{{ post.published_date }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mx-auto">
|
||||
<h1>
|
||||
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
|
||||
Dein Newsfeed ...
|
||||
</h1>
|
||||
<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>
|
||||
{% endblock %}
|
||||
<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 class="mt-5 col-md-4">
|
||||
|
||||
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user