From 1acb6d6f5608af72cb88dcdeedddab162dbec650 Mon Sep 17 00:00:00 2001 From: Luca Chiricozzi Date: Fri, 9 Jan 2015 19:56:22 +0100 Subject: [PATCH] Some improvement with Schema.org --- templates/article.html | 18 +++++++++++------- templates/base.html | 30 ++++++++++++++++++++---------- templates/common_seo.html | 3 +++ templates/index.html | 4 ++-- templates/page.html | 6 +++++- 5 files changed, 41 insertions(+), 20 deletions(-) diff --git a/templates/article.html b/templates/article.html index 7de20df..665a03b 100644 --- a/templates/article.html +++ b/templates/article.html @@ -8,18 +8,20 @@ + {% if article.summary %} - - + + {% endif %} {% if article.date %} - + {% endif %} {% if article.modified %} - + + {% endif %} {% if article.author %} - + {% endif %} {% for tag in article.tags %} @@ -27,10 +29,12 @@ {% if article.image %} + {% elif META_IMAGE %} + {% endif %} {% endblock %} @@ -58,9 +62,9 @@
-
+

{{ article.title }}

- + {% if SHARE %} Share diff --git a/templates/base.html b/templates/base.html index d1b1d6e..e83a332 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,8 +1,20 @@ - - - - +{% if article %} + + + + +{% elif page %} + + + + +{% else %} + + + + +{% endif %} @@ -20,14 +32,18 @@ + + {% if DESCRIPTION %} + {% endif %} {% if META_IMAGE %} + {% endif %} {% endblock %} @@ -46,12 +62,6 @@

You are using an outdated browser. Please upgrade your browser to improve your experience.

-
- - - {% if META_IMAGE %}{% endif %} -
-
diff --git a/templates/common_seo.html b/templates/common_seo.html index a586f5d..10688f5 100644 --- a/templates/common_seo.html +++ b/templates/common_seo.html @@ -3,10 +3,13 @@ + + {% if META_IMAGE %} + {% endif %} {% endblock %} diff --git a/templates/index.html b/templates/index.html index 34d4785..3a80935 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9,7 +9,7 @@ {% if loop.index == 1 %}
{{ article.title }} - +

{{ article.summary|striptags }}

{{ article.content }}
@@ -19,7 +19,7 @@ {% else %}
{{ article.title }} - +

{{ article.summary|striptags }}

{{ ' '.join(article.content.split(' ')[0:100])|striptags }}...

diff --git a/templates/page.html b/templates/page.html index 2b20fad..adffa56 100644 --- a/templates/page.html +++ b/templates/page.html @@ -7,23 +7,27 @@ + {% if page.image %} + {% elif META_IMAGE %} + {% endif %} {% if page.summary %} + {% endif %} {% endblock %} {% block content %}
-

{{ page.title }}

+

{{ page.title }}

{% block page_content %} {% endblock %}