summaryrefslogtreecommitdiff
path: root/sublab_project/news/templates
diff options
context:
space:
mode:
Diffstat (limited to 'sublab_project/news/templates')
-rw-r--r--sublab_project/news/templates/news/news_detail.html9
-rw-r--r--sublab_project/news/templates/news/news_image.html14
-rw-r--r--sublab_project/news/templates/news/news_list.html7
3 files changed, 27 insertions, 3 deletions
diff --git a/sublab_project/news/templates/news/news_detail.html b/sublab_project/news/templates/news/news_detail.html
index 918fe60..a91517e 100644
--- a/sublab_project/news/templates/news/news_detail.html
+++ b/sublab_project/news/templates/news/news_detail.html
@@ -1,13 +1,18 @@
{% extends 'base.html' %}
+{% load thumbnail %}
{% block title %}{{ object.title }}{% endblock %}
{% block content %}
<p class="news_date">{{ object.date_updated|date:"DATETIME_FORMAT" }}</p>
- <h2 id="{{ object.slug }}">{{ object.title }}</h3>
+ <h2 id="{{ object.slug }}">{{ object.title }}</h2>
{% if object.image %}
<div class="imagecontent">
- <img src="{{ MEDIA_URL }}{{ object.image }}" width="{{ object.image_width }}" height="{{ object.image_height }}" align="right" />
+ <a href="{% url news_image object.slug %}">
+ {% thumbnail object.image "200" upscale=False as image %}
+ <img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" align="right" />
+ {% endthumbnail %}
+ </a>
</div>
{% endif %}
{{ object.content_html|safe }}
diff --git a/sublab_project/news/templates/news/news_image.html b/sublab_project/news/templates/news/news_image.html
new file mode 100644
index 0000000..3c490c6
--- /dev/null
+++ b/sublab_project/news/templates/news/news_image.html
@@ -0,0 +1,14 @@
+{% extends 'base.html' %}
+{% load thumbnail %}
+
+{% block title %}Bild: {{ object.title }}{% endblock %}
+
+{% block content %}
+ <h2>Bild: {{ object.title }}</h2>
+ <div>
+ {% thumbnail object.image "820" upscale=False as image %}
+ <img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" align="left" />
+ {% endthumbnail %}
+ </div>
+ <p><a href="{{ object.get_absolute_url }}">Zurück zum Artikel</a></p>
+{% endblock content %}
diff --git a/sublab_project/news/templates/news/news_list.html b/sublab_project/news/templates/news/news_list.html
index af66c07..fa11311 100644
--- a/sublab_project/news/templates/news/news_list.html
+++ b/sublab_project/news/templates/news/news_list.html
@@ -1,4 +1,5 @@
{% extends 'base.html' %}
+{% load thumbnail %}
{% block title %}Neues{% endblock %}
@@ -10,7 +11,11 @@
</h3>
{% if post.image %}
<div class="imagecontent">
- <img src="{{ MEDIA_URL }}{{ post.image }}" width="{{ post.image_width }}" height="{{ post.image_height }}" align="right" />
+ <a href="{{ post.get_absolute_url }}">
+ {% thumbnail post.image "200" upscale=False as image %}
+ <img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" align="right" />
+ {% endthumbnail %}
+ </a>
</div>
{% endif %}
{{ post.content_html|safe }}