Skip to content

Instantly share code, notes, and snippets.

@Lothiraldan
Created April 6, 2011 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lothiraldan/905362 to your computer and use it in GitHub Desktop.
Save Lothiraldan/905362 to your computer and use it in GitHub Desktop.
Move articles infos into article_infos template
From a2eb43ec131512743f2a61d3e382dbc3dda26576 Mon Sep 17 00:00:00 2001
From: FELD Boris <lothiraldan@gmail.com>
Date: Wed, 6 Apr 2011 10:21:09 +0200
Subject: [PATCH] Move articles infos into article_infos template
---
notmyidea-cms/templates/article.html | 14 +-------------
notmyidea-cms/templates/article_infos.html | 14 ++++++++++++++
notmyidea-cms/templates/index.html | 15 +--------------
3 files changed, 16 insertions(+), 27 deletions(-)
create mode 100644 notmyidea-cms/templates/article_infos.html
diff --git a/notmyidea-cms/templates/article.html b/notmyidea-cms/templates/article.html
index 04eeea6..14fffe4 100644
--- a/notmyidea-cms/templates/article.html
+++ b/notmyidea-cms/templates/article.html
@@ -7,19 +7,7 @@
rel="bookmark" title="Permalink to {{ article.title }}">{{ article.title
}}</a></h1> {% include 'twitter.html' %} </header>
<div class="entry-content">
- <footer class="post-info">
- <abbr class="published" title="{{ article.date.isoformat() }}">
- {{ article.date.strftime('%a %d %B %Y') }}
- </abbr>
- {% if article.author %}
- <address class="vcard author">
- By <a class="url fn" href="#">{{ article.author }}</a>
- </address>
- {% endif %}
- <p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>.
- {% include 'taglist.html' %}
- {% include 'translations.html' %}
- </footer><!-- /.post-info -->
+ {% include 'article_infos.html' %}
{{ article.content }}
</div><!-- /.entry-content -->
{% if DISQUS_SITENAME %}
diff --git a/notmyidea-cms/templates/article_infos.html b/notmyidea-cms/templates/article_infos.html
new file mode 100644
index 0000000..3e3edea
--- /dev/null
+++ b/notmyidea-cms/templates/article_infos.html
@@ -0,0 +1,14 @@
+<footer class="post-info">
+ <abbr class="published" title="{{ article.date.isoformat() }}">
+ {{ article.locale_date }}
+ </abbr>
+
+ {% if article.author %}
+ <address class="vcard author">
+ By <a class="url fn" href="#">{{ article.author }}</a>
+ </address>
+ {% endif %}
+<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
+{% include 'taglist.html' %}
+{% include 'translations.html' %}
+</footer><!-- /.post-info -->
\ No newline at end of file
diff --git a/notmyidea-cms/templates/index.html b/notmyidea-cms/templates/index.html
index 0a243b1..a0ba3a7 100644
--- a/notmyidea-cms/templates/index.html
+++ b/notmyidea-cms/templates/index.html
@@ -8,20 +8,7 @@
<aside id="featured"><article>
<h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url
}}">{{ article.title }}</a></h1>
- <footer class="post-info">
- <abbr class="published" title="{{ article.date.isoformat() }}">
- {{ article.date.strftime('%a %d %B %Y') }}
- </abbr>
-
- {% if article.author %}
- <address class="vcard author">
- By <a class="url fn" href="#">{{ article.author }}</a>
- </address>
- {% endif %}
- <p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
- {% include 'taglist.html' %}
- {% include 'translations.html' %}
- </footer><!-- /.post-info -->
+ {% include 'article_infos.html' %}
{{ article.content }}
</article></aside><!-- /#featured -->
{% if loop.length > 1 %}
--
1.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment