diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2013-04-28 19:54:45 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2013-05-01 10:33:08 +0200 |
commit | dc214056449119b29ad7b19b8d47e81b343ff453 (patch) | |
tree | e5fbae31ed73509852d45354ab682e8c96e5c42f /theme | |
parent | bfc347fdea8ebf0246902cbf7c95cfd5b518b4e8 (diff) |
Updated theme and templates
Updated to pelican 3.2
Diffstat (limited to 'theme')
-rwxr-xr-x | theme/static/css/main.css | 31 | ||||
-rwxr-xr-x | theme/static/css/styles.css | 81 | ||||
-rwxr-xr-x | theme/templates/archives.html | 2 | ||||
-rwxr-xr-x | theme/templates/article.html | 52 | ||||
-rwxr-xr-x | theme/templates/category.html | 3 | ||||
-rwxr-xr-x | theme/templates/index.html | 3 | ||||
-rwxr-xr-x | theme/templates/menu.html | 6 | ||||
-rwxr-xr-x | theme/templates/meta.html | 17 | ||||
-rwxr-xr-x | theme/templates/page.html | 2 | ||||
-rwxr-xr-x | theme/templates/tag.html | 3 |
10 files changed, 123 insertions, 77 deletions
diff --git a/theme/static/css/main.css b/theme/static/css/main.css index c8c0a01..e8b773b 100755 --- a/theme/static/css/main.css +++ b/theme/static/css/main.css @@ -87,6 +87,10 @@ table.docutils { border: none; } +table.footnote td { + border: none; +} + td, th { margin: 0; padding: 2px 5px; @@ -269,28 +273,6 @@ div#page { font-weight: bolder; } -// aside#sidebar { -// float: right; -// width: 24%; -// } -// #sidebar .widget { -// margin-bottom: 10px; -// } -// #sidebar .widget ul { -// list-style-type: none; -// margin: auto auto auto 15px; -// } -// #sidebar .widget ul li:before { -// content: '» '; -// } -// -// #sidebar .widget ul a.more { -// display: inline-block; -// padding-top: 5px; -// text-decoration: none; -// } - - footer#footer { clear:both; border-top: 1px solid grey; @@ -301,3 +283,8 @@ div#page { direction:rtl; unicode-bidi:bidi-override; } + +.floatleft { float: left; margin: 0px 5px 5px 0px; } +.floatright { float: right; margin: 0px 0px 5px 5px; } + +.clear { clear:both; } diff --git a/theme/static/css/styles.css b/theme/static/css/styles.css index ec426de..3ebca0b 100755 --- a/theme/static/css/styles.css +++ b/theme/static/css/styles.css @@ -1,25 +1,72 @@ #cssmenu ul, #cssmenu hr { margin: 0px; } #cssmenu hr { margin: auto; } -#cssmenu{ height:39px; display:block; padding:0; margin: 0; margin-left:10px; margin-right:10px; } +#cssmenu { + height:39px; + display:block; + padding:0; + margin: 0; margin-left:10px; margin-right:10px; + border-color:#000; +} #cssmenu > ul {list-style:inside none; padding:0; margin:0;} #cssmenu > ul > li {list-style:inside none; padding:0; margin:0; float:left; display:block; position:relative;} -#cssmenu > ul > li > a{ outline:none; display:block; position:relative; padding:12px 20px; font: 13px/100% Arial, Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); } -#cssmenu > ul > li:first-child > a{border-radius:5px 0 0 5px;} -#cssmenu > ul > li > a:after{ content:''; position:absolute; border-right:1px solid; top:-1px; bottom:-1px; right:-2px; z-index:99; } -#cssmenu ul li.has-sub:hover > a:after{top:0; bottom:0;} -#cssmenu > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #fff; } -#cssmenu > ul > li.has-sub:hover > a:before{top:19px;} -#cssmenu ul li.has-sub:hover > a{ background:#3f3f3f; border-color:#3f3f3f; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; } + +#cssmenu > ul > li > span { + outline:none; + display:block; + position:relative; + padding:13px 20px; + font: 13px/100% Arial, Helvetica, sans-serif; text-align:center; + text-shadow:1px 1px 0 rgba(0,0,0, 0.4); + height: 13px; + border-right:1px solid #000; + color:#fff; +} + +#cssmenu a { + color: #fff; +} +#cssmenu > ul > li > span > a { + text-decoration:underline; +} + +#cssmenu > ul > li > span:after { + content:''; + position:absolute; + border-right:1px solid; + top:1px; bottom:0px; + right:-2px; + z-index:99; + border-color: #444; +} + +#cssmenu ul li.has-sub:hover > span:after {top:0; bottom:0;} +#cssmenu > ul > li.has-sub > span:before { + content:''; + position:absolute; + top:19px; right:6px; + border:5px solid transparent; + border-top:5px solid #fff; +} + +#cssmenu > ul > li.has-sub:hover > span:before {top:19px;} +#cssmenu ul li.has-sub:hover > span { background:#3f3f3f; padding-bottom:13px; padding-top:13px; top:0px; z-index:999; } #cssmenu ul li.has-sub:hover > ul, #cssmenu ul li.has-sub:hover > div{display:block;} -#cssmenu ul li.has-sub > a:hover{background:#3f3f3f; border-color:#3f3f3f;} -#cssmenu ul li > ul, #cssmenu ul li > div{ display:none; width:auto; position:absolute; top:38px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; } +#cssmenu ul li.has-sub > a:hover {background:#3f3f3f; border-color:#3f3f3f;} + +#cssmenu ul li > ul, #cssmenu ul li > div { + display:none; width:auto; position:absolute; + top:39px; padding:10px 0; background:#3f3f3f; + border-radius:0 0 5px 5px; + z-index:999; +} + #cssmenu ul li > ul{width:200px;} #cssmenu ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;} -#cssmenu ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); } - +#cssmenu ul li > ul li a{ + outline:none; display:block; position:relative; margin:0; + padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; + text-shadow:1px 1px 0 rgba(0,0,0, 0.5); + text-decoration:none; +} -#cssmenu, #cssmenu > ul > li > ul > li a:hover{ background-color:#323232; } -#cssmenu{border-color:#000;} -#cssmenu > ul > li > a{border-right:1px solid #000; color:#fff;} -#cssmenu > ul > li > a:after{border-color:#444;} -#cssmenu > ul > li > a:hover{background:#111;} +#cssmenu, #cssmenu > ul > li > ul > li a:hover { background-color:#323232; } diff --git a/theme/templates/archives.html b/theme/templates/archives.html index f3c2990..f0441d9 100755 --- a/theme/templates/archives.html +++ b/theme/templates/archives.html @@ -3,7 +3,7 @@ {%block title %}{{ SITENAME }} - Archives{%endblock%} {% block content %} - <h2 class="page_title">Archives</h2> + <h1 class="page_title">Archives</h1> <table id="archives"> <tbody> {% for article in dates %} diff --git a/theme/templates/article.html b/theme/templates/article.html index 1328834..044c386 100755 --- a/theme/templates/article.html +++ b/theme/templates/article.html @@ -3,38 +3,40 @@ {% block title %}{{ SITENAME }} - {{ article.title |striptags }}{% endblock %} {% block content %} - <article class="post"> - <h1 class="page_title"><a href="{{ article.url }}">{{ article.title }}</a></h1> - {%include 'meta.html'%} + <article class="post"> + <h1 class="page_title"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1> + {%include 'meta.html'%} + + <section class="post_content"> + {{ article.content }} + </section> + + </article> - <section class="post_content"> - {{ article.content }} - </section> + {% if DISQUS_SITENAME %} + <div class="comments"> + <h2>Commentaires :</h2> + <div id="disqus_thread"></div> + <script type="text/javascript"> + var disqus_identifier = "{{ article.url }}"; + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + </script> + </div> + {% endif %} - </article> + {% if article.related_posts and article.related_posts %} - {% if DISQUS_SITENAME %} - <div class="comments"> - <h2>Commentaires :</h2> - <div id="disqus_thread"></div> - <script type="text/javascript"> - var disqus_identifier = "{{ article.url }}"; - (function() { - var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); - })(); - </script> - </div> - {% endif %} + <h2>À lire aussi :</h2> -{# - {% if article.related_posts %} <ul> {% for related_post in article.related_posts %} - <li>{{ related_post.url }}</li> + <li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li> {% endfor %} </ul> {% endif %} -#} + {% endblock %} diff --git a/theme/templates/category.html b/theme/templates/category.html index f476d93..b323285 100755 --- a/theme/templates/category.html +++ b/theme/templates/category.html @@ -2,7 +2,7 @@ {% block title %}{{ SITENAME }} - {{ category}}{% endblock %} {% block content %} - <h2 class="page_title">Articles dans la catégorie «{{ category }}»</h2> + <h1 class="page_title">Articles dans la catégorie « {{ category }} »</h1> {% if articles %} {% for article in (articles_page.object_list if articles_page else articles) %} <article class="post"> @@ -11,6 +11,7 @@ <section class="post_content"> {{ article.summary }} + <div class="clear" /> {% if not loop.last %} <hr> {% endif %} diff --git a/theme/templates/index.html b/theme/templates/index.html index 245c708..d045910 100755 --- a/theme/templates/index.html +++ b/theme/templates/index.html @@ -5,11 +5,12 @@ {% if articles %} {% for article in (articles_page.object_list if articles_page else articles) %} <article class="post"> - <h2 class="title"><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></h2> + <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 %} diff --git a/theme/templates/menu.html b/theme/templates/menu.html index 037d85a..bab98fa 100755 --- a/theme/templates/menu.html +++ b/theme/templates/menu.html @@ -1,6 +1,6 @@ {% macro submenu(elements, link, name) -%} {% if elements %} - <li class='has-sub'><a href="{{ SITEURL }}/{{link}}.html"><span>{{name}}</span></a> + <li class='has-sub'><span><a href="{{ SITEURL }}/{{link}}.html">{{name}}</a></span> <ul> {% for tag, articles in elements %} <li><a href="{{SITEURL}}/{{tag.url}}"><span>{{ tag }}</span></a></li> @@ -12,7 +12,7 @@ <div id="cssmenu"> <ul> - <li class='has-sub'><a href="{{ SITEURL }}/">Articles</a> + <li class='has-sub'><span><a href="{{ SITEURL }}/">Articles</a></span> <ul> {% for article in articles %} {% if loop.index < FEED_MAX_ITEMS %} @@ -26,7 +26,7 @@ {{ submenu(categories, 'categories', 'Catégories') }} - <li class='has-sub'><a href="{{ SITEURL }}/"><span>À lire</span></a> + <li class='has-sub'><span>À lire</span> <ul> {% for page in pages %} <li><a href="{{SITEURL}}/{{page.url}}"><span>{{ page.title }}</span></a></li> diff --git a/theme/templates/meta.html b/theme/templates/meta.html index db36173..287f6b2 100755 --- a/theme/templates/meta.html +++ b/theme/templates/meta.html @@ -1,5 +1,12 @@ - <details class="meta"> - Publié le <time datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time> - {% if article.author %} par {{ article.author }}{% endif %} dans «<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>». - {% if article.tags %}Mots-clés: {% for tag in article.tags %}{%if loop.index > 1%}, {%endif%}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %}</p>{% endif %} - </details> +<details class="meta"> + Publié le <time datetime="{{ article.date.isoformat() }}" pubdate="pubdate">{{ article.locale_date }}</time> +{# {% if article.author %} par {{ article.author }}{% endif %} #} + dans + « <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> ». + {% if article.tags %} + Mots-clefs : + {% for tag in article.tags %}{%if loop.index > 1%},{%endif%} + <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% endfor %} + </p> + {% endif %} +</details> diff --git a/theme/templates/page.html b/theme/templates/page.html index 1608771..114daea 100755 --- a/theme/templates/page.html +++ b/theme/templates/page.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ page.title }}{% endblock %} +{% block title %}{{ page.title | striptags }}{% endblock %} {% block content %} <h1 class="page_title"><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></h1> {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get diff --git a/theme/templates/tag.html b/theme/templates/tag.html index 49ed222..8282855 100755 --- a/theme/templates/tag.html +++ b/theme/templates/tag.html @@ -2,7 +2,7 @@ {% block title %}{{ SITENAME }} - «{{ tag }}»{% endblock %} {% block content %} - <h2 class="page_title">Articles avec le mot-clé «{{ tag }}»</h2> + <h1 class="page_title">Articles avec le mot-clef « {{ tag }} »</h1> {% if articles %} {% for article in (articles_page.object_list if articles_page else articles) %} <article class="post"> @@ -11,6 +11,7 @@ <section class="post_content"> {{ article.summary }} + <div class="clear" /> {% if not loop.last %} <hr> {% endif %} |