diff options
-rw-r--r-- | content/Informatique/gueule1.rst | 1 | ||||
-rw-r--r-- | content/Informatique/guiderstodt.rst | 2 | ||||
-rw-r--r-- | content/images/gedit.png | bin | 0 -> 5362 bytes | |||
-rw-r--r-- | content/images/rstodt/writing_75.jpg | bin | 0 -> 4238 bytes | |||
-rwxr-xr-x | pelicanconf.py | 3 | ||||
-rwxr-xr-x | theme/templates/article.html | 4 | ||||
-rwxr-xr-x | theme/templates/index.html | 24 | ||||
-rwxr-xr-x | theme/templates/menu.html | 2 | ||||
-rw-r--r-- | theme/templates/translations.html | 10 |
9 files changed, 36 insertions, 10 deletions
diff --git a/content/Informatique/gueule1.rst b/content/Informatique/gueule1.rst index 7d060a0..8832e66 100644 --- a/content/Informatique/gueule1.rst +++ b/content/Informatique/gueule1.rst @@ -6,6 +6,7 @@ Essai raté d'un plugin gedit :date: 20/04/2013 :tags: Programmation, Libre, Humeur +:logo: static/images/gedit.png En relisant mes articles, j'ai décidé d'utiliser languageTool_ pour vérifier la grammaire avant de les publier. Puis en regardant l'outil, j'ai voulu voir s'il diff --git a/content/Informatique/guiderstodt.rst b/content/Informatique/guiderstodt.rst index fc14a0a..d4105a3 100644 --- a/content/Informatique/guiderstodt.rst +++ b/content/Informatique/guiderstodt.rst @@ -7,6 +7,8 @@ Guide d'utilisation de rst2odt :date: 2013-05-07 :tags: Libre, reStructuredText :summary: |summary| +:logo: static/images/rstodt/writing_75.jpg + .. figure:: |filename|/images/rstodt/writing.jpg :figwidth: 150 diff --git a/content/images/gedit.png b/content/images/gedit.png Binary files differnew file mode 100644 index 0000000..116e8df --- /dev/null +++ b/content/images/gedit.png diff --git a/content/images/rstodt/writing_75.jpg b/content/images/rstodt/writing_75.jpg Binary files differnew file mode 100644 index 0000000..73abc64 --- /dev/null +++ b/content/images/rstodt/writing_75.jpg diff --git a/pelicanconf.py b/pelicanconf.py index 6edae01..cd38cc3 100755 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -19,7 +19,6 @@ DEFAULT_LANG = u'fr' #SOCIAL = (('You can add links in your config file', '#'), # ('Another social link', '#'),) -DEFAULT_PAGINATION = 4 FEED_DOMAIN = SITEURL FEED_RSS = 'feed' FEED_ATOM = 'feeds/atom.xml' @@ -27,6 +26,8 @@ FEED_MAX_ITEMS=5 TAG_FEED_RSS = 'feeds/%s.xml' TAG_FEED_ATOM = 'feeds/%s.atom' +DEFAULT_PAGINATION = FEED_MAX_ITEMS + ARTICLE_URL = u'{date:%Y}/{date:%m}/{slug}/' ARTICLE_SAVE_AS = u'{date:%Y}/{date:%m}/{slug}/index.html' diff --git a/theme/templates/article.html b/theme/templates/article.html index b53962d..a23074c 100755 --- a/theme/templates/article.html +++ b/theme/templates/article.html @@ -6,6 +6,9 @@ <article class="post"> <h1 class="page_title"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1> {%include 'meta.html'%} + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} + <section class="post_content"> {{ article.content }} @@ -14,6 +17,7 @@ </article> {% if article.related_posts and article.related_posts %} + <div class="clear" /> <h2>À lire aussi :</h2> diff --git a/theme/templates/index.html b/theme/templates/index.html index d045910..bf288a8 100755 --- a/theme/templates/index.html +++ b/theme/templates/index.html @@ -6,14 +6,22 @@ {% for article in (articles_page.object_list if articles_page else articles) %} <article class="post"> <h1 class="title"><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></h1> -<time class="meta" datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time> - - <section class="post_content"> - {{ article.summary }} - <div class="clear" /> - {% if not loop.last %} - <hr> - {% endif %} + + + <time class="meta" datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time> + <section class="post_content"> + + {% if article.logo %} + <div class="floatleft figure" style="width: 75px"> + <img src="{{article.logo}}" > + </div> + {% endif %} + + {{ article.summary }} + <div class="clear" /> + {% if not loop.last %} + <hr> + {% endif %} </section> </article> {% endfor %} diff --git a/theme/templates/menu.html b/theme/templates/menu.html index bab98fa..6cc3636 100755 --- a/theme/templates/menu.html +++ b/theme/templates/menu.html @@ -15,7 +15,7 @@ <li class='has-sub'><span><a href="{{ SITEURL }}/">Articles</a></span> <ul> {% for article in articles %} - {% if loop.index < FEED_MAX_ITEMS %} + {% if loop.index <= FEED_MAX_ITEMS %} <li><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></li> {% endif %} {% endfor %} diff --git a/theme/templates/translations.html b/theme/templates/translations.html new file mode 100644 index 0000000..121ff1a --- /dev/null +++ b/theme/templates/translations.html @@ -0,0 +1,10 @@ +{% macro translations_for(article) %} +{% if article.translations %} +<details class="meta"> +Traductions : +{% for translation in article.translations %} +<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> +{% endfor %} +</details> +{% endif %} +{% endmacro %} |