aboutsummaryrefslogtreecommitdiffstats
path: root/dev-random2/templates
diff options
context:
space:
mode:
authorm-r-r <raybaudroigm@gmail.com>2012-07-26 15:01:23 +0200
committerm-r-r <raybaudroigm@gmail.com>2012-07-26 15:01:23 +0200
commitc55d10de9c103e2c023ef1f40f4f4c0502570e69 (patch)
tree60525471c4c5386b00f8707c4d3d060f2b31cf43 /dev-random2/templates
parent98f0d46f2bbddf86e8d202b533af35fa79da2d2f (diff)
downloadpelican-themes-c55d10de9c103e2c023ef1f40f4f4c0502570e69.tar.gz
[dev-random2] Theme upgrade
Diffstat (limited to 'dev-random2/templates')
-rw-r--r--dev-random2/templates/archives.html29
-rw-r--r--dev-random2/templates/article.html53
-rw-r--r--dev-random2/templates/author.html5
-rw-r--r--dev-random2/templates/base.html62
-rw-r--r--dev-random2/templates/categories.html14
-rw-r--r--dev-random2/templates/category.html5
-rw-r--r--dev-random2/templates/includes/article_meta.html17
-rw-r--r--dev-random2/templates/includes/sidebar.html53
-rw-r--r--dev-random2/templates/index.html59
-rw-r--r--dev-random2/templates/page.html8
-rw-r--r--dev-random2/templates/tag.html6
-rw-r--r--dev-random2/templates/tags.html26
12 files changed, 337 insertions, 0 deletions
diff --git a/dev-random2/templates/archives.html b/dev-random2/templates/archives.html
new file mode 100644
index 0000000..3573bf2
--- /dev/null
+++ b/dev-random2/templates/archives.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+
+{% block content_title %}{{ SITENAME }} — Archives{% endblock %}
+
+{%- block content %}
+ <h1>Archives</h1>
+ <dl>
+ {% for article in articles %}
+ {% if loop.first or article.date.strftime('%Y %m') != articles[loop.index0-1].date.strftime('%Y %m') %}
+ <dt>
+ <h2>{{ article.date.strftime('%B %Y') }}</h2>
+ <ul>
+ {% endif %}
+
+ <li>
+ <a rel="bookmark"
+ href="{{ SITEURL }}/{{ article.url }}"
+ title="Lien permanent vers «{{ article.title }}»">
+ {{ article.title }}
+ </a>
+ </li>
+
+ {% if loop.last or article.date.strftime('%Y %m') != articles[loop.index0+1].date.strftime('%Y %m') %}
+ </ul>
+ </dt>
+ {% endif %}
+ {% endfor %}
+ </dl>
+{% endblock content -%}
diff --git a/dev-random2/templates/article.html b/dev-random2/templates/article.html
new file mode 100644
index 0000000..78a736e
--- /dev/null
+++ b/dev-random2/templates/article.html
@@ -0,0 +1,53 @@
+{%- if article.lang %}{% set DEFAULT_LANG = article.lang %}{% endif -%}
+{% extends "base.html" %}
+
+{% block headers %}
+ {{ super() }}
+ <meta name="author" content="{{ article.author or DEFAULT_AUTHOR }}" />
+ <meta name="keywords" content="{{ article.tags|join(', ') }}" />
+ <link rel="stylesheet" media="not print" type="text/css" href="{{ SITEURL }}/theme/css/pygments.css" />
+{% endblock %}
+
+{% block title %}{{ article.title }} — {{ super() }}{% endblock %}
+
+{%- block content %}
+ <header class="post-header">
+ <h1>
+ <a rel="bookmark"
+ href="{{ SITEURL }}/{{ article.url }}"
+ title="Lien permanent vers «{{ article.title }}»">
+ {{ article.title }}
+ </a>
+ </h1>
+ <div class="meta">
+ {% include "includes/article_meta.html" %}
+ </div>
+ </header>
+ <div class="post-content">
+ {{ article.content}}
+ </div>
+ <footer class="post-footer">
+ <div class="meta">
+ Posté dans «<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>»
+ par <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author}}</a><br />
+ Mots-clés: {% for tag in article.tags %} #<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}
+ </div>
+ </footer>
+ {% if DISQUS_SITENAME %}
+ <hr />
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+ {% endif %}
+{% endblock content -%}
diff --git a/dev-random2/templates/author.html b/dev-random2/templates/author.html
new file mode 100644
index 0000000..e323690
--- /dev/null
+++ b/dev-random2/templates/author.html
@@ -0,0 +1,5 @@
+{% extends "index.html" %}
+
+{% block title %}{{ super() }} — Articles de {{ author }}{% endblock %}
+
+{% block index_title %}Articles de <i>{{ author }}</i> :{% endblock %}
diff --git a/dev-random2/templates/base.html b/dev-random2/templates/base.html
new file mode 100644
index 0000000..548d6a4
--- /dev/null
+++ b/dev-random2/templates/base.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html lang="{{ article.lang if article and article.lang else DEFAULT_LANG }}">
+ <head>
+ {% block headers %}
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=endge, chrome=IE8" />
+ <meta name="viewport" content="initial-scale=1.0, width=device-width, user-scalable=no" />
+ <title>{% block title %}{{ SITENAME }}{%endblock%}</title>
+ <!--[if lte IE 8]><script type="text/javascript" src="{{ SITEURL }}/theme/js/html5shiv.js"></script><![endif]-->
+ <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/skeleton.css" />
+ <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/theme.css" />
+ <link rel="shortcut icon" type="image/png" href="{{ SITEURL }}/favicon.png" />
+ <!--[if lte IE 8]><link rel="shortcut icon" type="image/x-icon" href="{{ SITEURL }}/favicon.ico" /><![endif]-->
+ <link rel="alternate" type="application/atom+xml"
+ title="{{ SITENAME }} — Flux Atom"
+ href="{{ SITEURL }}/{{ FEED }}" />
+ {% if FEED_RSS %}
+ <link rel ="alternate" type="application/rss+xml"
+ title="{{ SITENAME }} — Flux RSS"
+ href="{{ SITEURL }}/{{ FEED_RSS }}" />
+ {% endif %}
+ {% endblock headers %}
+ </head>
+ <body>
+ <div id="page">
+ <header id="page-head">
+ <h1>
+ <a href="{{ SITEURL }}/index.html">{{ SITENAME }}</a>
+ </h1>
+ </header>
+
+ <div id="page-body">
+ <{%- if article %}article class="post" {% else %}section {% endif -%}id="page-main" role="main">
+{% block content %}
+{% endblock content %}
+ </{%- if article %}article{% else %}section{% endif -%}> <!-- /#page-main -->
+
+ <aside id="page-side">
+ {%- include "includes/sidebar.html" -%}
+ </aside> <!-- /#page-side -->
+ </div> <!-- /#page-body -->
+
+ <footer id="page-foot">
+ <p> {{ FOOTER_TEXT or 'Powered by <a href="http://pelican.readthedocs.org">Pelican</a>' }}</p>
+ {% if GITHUB_URL %}<p><a id="github-link" href="{{ GITHUB_URL}}">Fork me on Github</a></p>{% endif %}
+ </footer>
+ </div> <!-- /#page -->
+ {% if GOOGLE_ANALYTICS %}
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']);
+ _gaq.push(['_trackPageview']);
+ (function() {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ {% endif %}
+ </body>
+</html>
diff --git a/dev-random2/templates/categories.html b/dev-random2/templates/categories.html
new file mode 100644
index 0000000..0a5b0f4
--- /dev/null
+++ b/dev-random2/templates/categories.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block title %}{{ super() }} — Catégories{% endblock title %}
+
+{%- block content %}
+ <section class="content">
+ <h1>Catégories</h1>
+ <ul id="category-list">
+ {% for category, n in categories %}
+ <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ n|count }} articles)</li>
+ {% endfor %}
+ </ul>
+ </section>
+{% endblock content -%}
diff --git a/dev-random2/templates/category.html b/dev-random2/templates/category.html
new file mode 100644
index 0000000..0a5dade
--- /dev/null
+++ b/dev-random2/templates/category.html
@@ -0,0 +1,5 @@
+{% extends "index.html" %}
+
+{% block title %}{{ super() }} — Articles dans la catégorie «{{ category }}»{% endblock %}
+
+{% block index_title %}Articles dans la catégorie <i>«{{ category }}»</i> :{% endblock %}
diff --git a/dev-random2/templates/includes/article_meta.html b/dev-random2/templates/includes/article_meta.html
new file mode 100644
index 0000000..21f4c7a
--- /dev/null
+++ b/dev-random2/templates/includes/article_meta.html
@@ -0,0 +1,17 @@
+<!-- includes/article_meta.html -->
+ Le <time datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time>
+ dans «<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>»
+ par <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
+ {%- if article.tags %}
+ <br />Mots-clés:
+ {%- for tag in article.tags %}
+ <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
+ {% endfor -%}
+ {% endif -%}
+ {%- if article.translations %}
+ <br />Langues:
+ [<a href="{{ SITEURL }}/{{ article.url }}">{{ article.lang or DEFAULT_LANG }}</a>]
+ {%- for translation in article.translations %}
+ <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
+ {% endfor -%}
+ {% endif -%}
diff --git a/dev-random2/templates/includes/sidebar.html b/dev-random2/templates/includes/sidebar.html
new file mode 100644
index 0000000..84d17e7
--- /dev/null
+++ b/dev-random2/templates/includes/sidebar.html
@@ -0,0 +1,53 @@
+
+ <!-- begin includes/sidebar.html -->
+ <nav>
+ <h3>Pages</h3>
+ <ul>
+ <li><a href="{{ SITEURL }}">Accueil</a></li>
+ <li><a href="{{ SITEURL }}/categories.html">Catégories</a></li>
+ <li><a href="{{ SITEURL }}/archives.html">Archives</a></li>
+ <li><a href="{{ SITEURL }}/tags.html">Mots-clés</a></li>
+ {% if MENUITEMS %}
+ {% for name, uri in MENUITEMS %}
+ <li><a href="{{ uri|format(SITEURL)}}">{{ name }}</a></li>
+ {% endfor %}
+ {% endif %}
+ {% if DISPLAY_PAGES_ON_MENU %}
+ {% for p in PAGES %}
+ <li><a href="{{ SITEURL}}/{{ p.url }}"{% if p == page %} class="active"{% endif %}>{{ p.title }}</a></li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </nav>
+
+ {% if categories %}
+ <nav>
+ <h3>Catégories</h3>
+ <ul>
+ {% for cat, null in categories %}
+ <li{%- if cat == category %} class="active"{% endif -%}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
+ {% endfor %}
+ </ul>
+ </nav>
+ {% endif %}
+
+ <nav>
+ <h3>Liens</h3>
+ <ul>
+ <li><a href="{{ SITEURL }}/{{ FEED }}" rel="alternate">Flux Atom</a></li>
+ {% if FEED_RSS %}
+ <li><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">Flux RSS</a></li>
+ {% endif %}
+ {% if SOCIAL %}
+ {% for name, url in SOCIAL %}
+ <li><a href="{{ url }}">{{ name }}</a></li>
+ {% endfor %}
+ {% endif %}
+ {% if LINKS %}
+ {% for name, url in LINKS %}
+ <li><a href="{{ url }}">{{ name }}</a></li>
+ {% endfor %}
+ {% endif %}
+ </ul>
+ </nav>
+ <!-- end includes/sidebar.html -->
diff --git a/dev-random2/templates/index.html b/dev-random2/templates/index.html
new file mode 100644
index 0000000..84ad5df
--- /dev/null
+++ b/dev-random2/templates/index.html
@@ -0,0 +1,59 @@
+{% extends "base.html" %}
+
+{%- block content %}
+ <h1 class="small-title">{% block index_title %}Tous les articles{% endblock index_title %}</h1>
+
+ {% for article in articles_page.object_list %}
+ <article class="post">
+ <header class="post-header">
+ <h1>
+ <a rel="bookmark"
+ href="{{ SITEURL }}/{{ article.url }}"
+ title="Lien permanent vers «{{ article.title }}»">
+ {{ article.title }}
+ </a>
+ </h1>
+ <div class="meta">
+ {% include "includes/article_meta.html" %}
+ </div>
+ </header>
+ <div class="post-content">
+ {{ article.summary }}
+ </div>
+ <footer class="post-footer">
+ <a class="readmore" href="{{ SITEURL }}/{{ article.url }}">Lire la suite...</a>
+ </footer>
+ </article>
+ {% set article = False %}
+ {% endfor %}
+
+ {%- if articles_page %}
+ <nav id="pagination">
+ {%- if articles_page.has_previous() %}
+ <a id="first_page" href="{{ SITEURL }}/{{ page_name }}.html">&#60;&#60;</a>
+ <a id="prev_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() if articles_page.previous_page_number() != 1 else "" }}.html">&#60;</a>
+ {% else %}
+ <!-- <span id="first_page" class="a inactive">&#60;&#60;</span>
+ <span id="first_page" class="a inactive">&#60;</span> -->
+ {% endif -%}
+
+ {%- for i in range(1,articles_paginator.num_pages+1) %}
+ {%- if articles_page.number - 5 < i < articles_page.number + 5 %}
+ {%- if i == articles_page.number %}
+ <span class="a active">{{loop.index}}</span>
+ {% else %}
+ <a href="{{SITEURL}}/{{ page_name }}{{ ( i if i != 1 else "" ) }}.html">{{loop.index}}</a>
+ {% endif -%}
+ {% endif -%}
+ {% endfor -%}
+
+ {%- if articles_page.has_next() %}
+ <a id="next_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&#62;</a>
+ <a id="last_page" href="{{ SITEURL }}/{{ page_name }}{{ articles_paginator.num_pages }}.html">&#62;&#62;</a>
+ {% else %}
+ <!-- <span id="next_page" class="a inactive">&#62;</span>
+ <span id="next_page" class="a inactive">&#62;&#62;</span> -->
+ {% endif -%}
+ </nav>
+ {%- endif%}
+{% endblock content -%}
diff --git a/dev-random2/templates/page.html b/dev-random2/templates/page.html
new file mode 100644
index 0000000..b52c807
--- /dev/null
+++ b/dev-random2/templates/page.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+
+{% block title %}{{ super() }} — {{ page.url }}{% endblock title %}
+
+{%- block content %}
+ <h1>{{ page.title }}</h1>
+ {{ page.content }}
+{% endblock content -%}
diff --git a/dev-random2/templates/tag.html b/dev-random2/templates/tag.html
new file mode 100644
index 0000000..ca4fc94
--- /dev/null
+++ b/dev-random2/templates/tag.html
@@ -0,0 +1,6 @@
+{% extends "index.html" %}
+
+{% block title %}{{ super() }} — Articles avec le mot clé « {{ tag }} »{% endblock %}
+
+{% block index_title %}Articles avec le mot clé « {{ tag }} » :{% endblock %}
+
diff --git a/dev-random2/templates/tags.html b/dev-random2/templates/tags.html
new file mode 100644
index 0000000..ad5d2ea
--- /dev/null
+++ b/dev-random2/templates/tags.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block headers %}
+{{ super() }}
+ <script type="text/javascript" src="{{ SITEURL }}/theme/js/microTags.js"></script>
+ <script>
+ function tag_cloud_init() {
+ var el = document.getElementById("tag-cloud");
+ window._tagcloud = new microTags(el);
+ }
+ if (window.addEventListener) window.addEventListener("load", tag_cloud_init, false);
+ else if (window.attachEvent) window.attachEvent("onload", tag_cloud_init);
+ else window.onload = tag_cloud_init;
+ </script>
+{% endblock headers %}
+
+{% block title %}{{ super() }} — Mots-clés{% endblock title %}
+
+{%- block content %}
+ <h1>Mots-clés</h1>
+ <ul id="tag-cloud">
+ {% for tag, articles in tags %}
+ <li data-count="{{ articles|count }}"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
+ {% endfor %}
+ </ul>
+{% endblock content -%}