diff options
author | quack1 <alexandre.deloup@gmail.com> | 2013-04-20 01:04:16 +0200 |
---|---|---|
committer | quack1 <alexandre.deloup@gmail.com> | 2013-04-20 01:04:16 +0200 |
commit | 18dd0bb33c9f2570bd83ef2c31f89be0cdbb71ba (patch) | |
tree | 5729d8d1d5c33ed31e3330d553f360862831296d /notebook | |
parent | 53d6c4254aa2b4781b850419d63a40527c307d71 (diff) | |
download | pelican-themes-18dd0bb33c9f2570bd83ef2c31f89be0cdbb71ba.zip pelican-themes-18dd0bb33c9f2570bd83ef2c31f89be0cdbb71ba.tar.gz pelican-themes-18dd0bb33c9f2570bd83ef2c31f89be0cdbb71ba.tar.bz2 |
Add theme 'notebook'. The original repository is https://github.com/quack1/notebook. There are some issues/enhancement to do, so if you work on it, please make pull requests to my own repo, so I can validate them and then add to this global repo. Thanks\!
Diffstat (limited to 'notebook')
35 files changed, 512 insertions, 0 deletions
diff --git a/notebook/COPYING b/notebook/COPYING new file mode 100644 index 0000000..a91c6c9 --- /dev/null +++ b/notebook/COPYING @@ -0,0 +1,24 @@ +Copyright (c) 2013, Quack1 +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the names of the contributors of this project may be used + to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL QUACK1 BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file diff --git a/notebook/README.md b/notebook/README.md new file mode 100644 index 0000000..765f172 --- /dev/null +++ b/notebook/README.md @@ -0,0 +1,53 @@ +# Notebook Theme + +This is a new theme for [Pelican](http://blog.getpelican.com/ 'Pelican') based on source code of [Bootstrap2 Theme](https://github.com/quack1/pelican-themes/tree/master/bootstrap2 'Bootstrap2 Theme') and the design/CSS of [Paul Rouget's site](http://paulrouget.com/ 'Paul Rouget'). + +It is designed to be very minimalistic, simple and clear. Yet, it is not responsive and adaptable to many browser sizes. It will be on a later update. + +If you want to use/update it, please do it from the direct [project repository](https://github.com/quack1/notebook). It will be the most up-to-date repo. + +This theme is published under the [New BSD License](http://opensource.org/licenses/BSD-3-Clause). So, feel free to use/hack/redistribute it! + +## Plugins + +The theme support the following "plugins", with the variables used in the `pelicanconf.py` configuration file : + +- Disqus : `DISQUS_SITENAME` +- Google Analytics : `GOOGLE_ANALYTICS` + +## New Variables + +We add some new functionalities, so we need to add some variables in the `pelicanconf.py` configuration file : + +- Twitter : To configure the publication of tweets, the `TWITTER_USERNAME` was added +- Avatar : The avatar on the sidebar is set with the `AVATAR` variable, set to the path to the image from the root of the website +- Digest : The digest displayed below the avatar is taken from the `SIDEBAR_DIGEST` variable +- The two Mozilla banners on the bottom of the website are set from the `FIREFOX_BANNERS` variable. There is a 'trick' with it. The variable is defined like that : + + FIREFOX_BANNERS = (('banner_id', 'path_to_the_image', u'alt_text'), + ('banner_id', 'path_to_the_image', u'alt_text')) + +From a "standard" firefox banner, the values are : + + <a href="http://affiliates.mozilla.org/link/banner/{{ banner_id }}"><img src="{{ path_to_the_image }}" alt="{{ alt_text }}" /></a> + +The `path_to_the_image` can be the remote file like given in the Affiliates Mozilla Website, but it won't work with my current Firefox Nightly version (Firefox 23). So I need to download the images and set the path to the local images. + +## Twitter Card + +I also add the support of Twitter Card. + +On pages, the variables of the Twitter Card are set like that : + + <meta name="twitter:card" content="summary"> + <meta name="twitter:site" content="{{ SITE_TITLE }}"> + <meta name="twitter:image" content="{{ AVATAR }}"> + +On the articles, we added these variables : + + <meta name="twitter:creator" content="{{ article.author }}"> + <meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}"> + <meta name="twitter:title" content="{{ article.title }}"> + <meta name="twitter:description" content="{{ article.Summary }}"> + +The `article.summary` variable must be set on the header of the Rest/Markdown article source file (tag : `Summary:`). If not, the first `SUMMARY_MAX_LENGTH` words from the blog post will be used as a default summary.
\ No newline at end of file diff --git a/notebook/screenshot.png b/notebook/screenshot.png Binary files differnew file mode 100644 index 0000000..9fb973c --- /dev/null +++ b/notebook/screenshot.png diff --git a/notebook/screenshot_list.png b/notebook/screenshot_list.png Binary files differnew file mode 100644 index 0000000..9fb973c --- /dev/null +++ b/notebook/screenshot_list.png diff --git a/notebook/screenshot_source_code.png b/notebook/screenshot_source_code.png Binary files differnew file mode 100644 index 0000000..9fb973c --- /dev/null +++ b/notebook/screenshot_source_code.png diff --git a/notebook/static/css/notebook.css b/notebook/static/css/notebook.css new file mode 100644 index 0000000..828c8d5 --- /dev/null +++ b/notebook/static/css/notebook.css @@ -0,0 +1,179 @@ +/*@import url(http://fonts.googleapis.com/css?family=Quattrocento+Sans&subset=latin,latin-ext); */ +@import url(http://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700,700italic|Share+Tech+Mono|Oxygen+Mono); +html { + font-family: 'Quattrocento Sans', sans-serif; + background: white; + font-size: 14px; +} + +/* Titles */ +h1 { text-transform: uppercase } +h1, h2 { + font-weight: normal; + margin-top: 10px; + margin-bottom: 10px; +} + +/* Body */ +body {margin: 0} +body > article, footer { + line-height: 1.6em; + display: block; + max-width: 600px; + margin: 40px auto; + padding: 20px 10px 0; +} + +/* Articles */ +p.post_entry { +} +article > header { + list-style-type: none; + padding: 0px 10px; + background: #E0E0E0; + box-shadow: 0 0 0 2px #E0E0E0; + -moz-border-radius: 5px 0; + -webkit-border-radius: 5px 0; + border-radius: 5px 5px; +} +.article_left > h1 { + font-size: 20px; +} +.article_right { + background-color: white; +} +.post_list { + list-style-type: none; + padding: 0px 10px; + /*background: #E0E0E0;*/ + box-shadow: 0px 0px 5px 3px #1DAEDF; + -moz-border-radius: 5px 0; + -webkit-border-radius: 5px 0; + border-radius: 5px 5px; +} +li.post_list:hover { + box-shadow: 0px 0px 5px 3px #52ACAE; +} + +/* Links */; +a { color:#1DAEDF; text-decoration:none; } +a:visited { color:#1DAEDF; text-decoration:none; } +a:link { color:#1DAEDF; text-decoration:none; } +a:active { color:#1DAEDF; text-decoration:none; } +a:hover { text-decoration: underline; } + +/* Code */ +code, pre, codehilite { + font-size: 12px; + font-family: 'Oxygen Mono', sans-serif; + color: #2E2E2E; +} +.codehilite { + /* background: #272822; */ + color: #2E2E2E; +} +.codehilite .hll { background-color: #ffffcc } +.codehilite .c { color: #408090; font-style: italic } /* Comment */ +.codehilite .err { color: red; } /* Error */ +.codehilite .k { color: #1DAEDF; font-weight: bold } /* Keyword */ +.codehilite .o { color: #666666 } /* Operator */ +.codehilite .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.codehilite .cp { color: #DA2678 } /* Comment.Preproc */ +.codehilite .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.codehilite .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.codehilite .gd { color: #A00000 } /* Generic.Deleted */ +.codehilite .ge { font-style: italic } /* Generic.Emph */ +.codehilite .gr { color: #FF0000 } /* Generic.Error */ +.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.codehilite .gi { color: #00A000 } /* Generic.Inserted */ +.codehilite .go { color: #303030 } /* Generic.Output */ +.codehilite .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.codehilite .gs { font-weight: bold } /* Generic.Strong */ +.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.codehilite .gt { color: #0040D0 } /* Generic.Traceback */ +.codehilite .kc { color: #DA2678; font-weight: bold } /* Keyword.Constant */ +.codehilite .kd { color: #DA2678; font-weight: bold } /* Keyword.Declaration */ +.codehilite .kn { color: #DA2678; font-weight: bold } /* Keyword.Namespace */ +.codehilite .kp { color: #DA2678 } /* Keyword.Pseudo */ +.codehilite .kr { color: #DA2678; font-weight: bold } /* Keyword.Reserved */ +.codehilite .kt { color: #3286D2 } /* Keyword.Type */ +.codehilite .m { color: #208050 } /* Literal.Number */ +.codehilite .s { color: #DA2678 } /* Literal.String */ +/*.codehilite .n { color: #3286D2 } /* everything ? */ +.codehilite .na { color: #DA2678 } /* Name.Attribute */ +.codehilite .nb { color: #DA2678 } /* Name.Builtin */ +.codehilite .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.codehilite .no { color: #60add5 } /* Name.Constant */ +.codehilite .nd { color: #3286D2; font-weight: bold } /* Name.Decorator */ +.codehilite .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.codehilite .ne { color: #DA2678 } /* Name.Exception */ +.codehilite .nf { color: #06287e } /* Name.Function */ +.codehilite .nl { color: #002070; font-weight: bold } /* Name.Label */ +.codehilite .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.codehilite .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.codehilite .nv { color: #bb60d5 } /* Name.Variable */ +.codehilite .ow { color: #DA2678; font-weight: bold } /* Operator.Word */ +.codehilite .w { color: #bbbbbb } /* Text.Whitespace */ +.codehilite .mf { color: #208050 } /* Literal.Number.Float */ +.codehilite .mh { color: #208050 } /* Literal.Number.Hex */ +.codehilite .mi { color: #208050 } /* Literal.Number.Integer */ +.codehilite .mo { color: #208050 } /* Literal.Number.Oct */ +.codehilite .sb { color: #DA2678 } /* Literal.String.Backtick */ +.codehilite .sc { color: #DA2678 } /* Literal.String.Char */ +.codehilite .sd { color: #DA2678; font-style: italic } /* Literal.String.Doc */ +.codehilite .s2 { color: #BC9A01 } /* Literal.String.Double */ +.codehilite .se { color: #DA2678; font-weight: bold } /* Literal.String.Escape */ +.codehilite .sh { color: #DA2678 } /* Literal.String.Heredoc */ +.codehilite .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.codehilite .sx { color: #BC9A01 } /* Literal.String.Other */ +.codehilite .sr { color: #BC9A01 } /* Literal.String.Regex */ +.codehilite .s1 { color: #BC9A01 } /* Literal.String.Single */ +.codehilite .ss { color: #517918 } /* Literal.String.Symbol */ +.codehilite .bp { color: #DA2678 } /* Name.Builtin.Pseudo */ +.codehilite .vc { color: #bb60d5 } /* Name.Variable.Class */ +.codehilite .vg { color: #bb60d5 } /* Name.Variable.Global */ +.codehilite .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.codehilite .il { color: #208050 } /* Literal.Number.Integer.Long */ + +/* Sidebar */ +aside { + font-size: 14px; + width: 220px; height: 100%; + position: fixed; + top: 0; left: 0; + padding: 30px; + background-image: url(http://i.imgur.com/5nwPL.png); + color: white; + box-shadow: 0 0 3px black; +} +aside > hr { + margin: 0; clear: both; + border: 0; height: 0; +} +aside > ul { + list-style-type: none; + padding: 0px 10px; + margin-top: 0px; +} +aside > h2 { + text-transform: uppercase; + font-size: 14px; + margin-bottom: 5px; +} + +#avatar { + width: 100px; + border-radius: 50%; + display: block; + margin: 0 10px 10px 0; + box-shadow: 0px 0px 5px 3px #1DAEDF; + -webkit-transition: 200ms; + -moz-transition: 200ms; + -ms-transition: 200ms; + -o-transition: 200ms; + transition: 200ms; +} + +#avatar:hover { + box-shadow: 0px 0px 5px 3px white; +}
\ No newline at end of file diff --git a/notebook/static/images/avatar.png b/notebook/static/images/avatar.png Binary files differnew file mode 100644 index 0000000..4f1d7b8 --- /dev/null +++ b/notebook/static/images/avatar.png diff --git a/notebook/static/images/download_firefox.png b/notebook/static/images/download_firefox.png Binary files differnew file mode 100644 index 0000000..1f15356 --- /dev/null +++ b/notebook/static/images/download_firefox.png diff --git a/notebook/static/images/download_firefox_android.png b/notebook/static/images/download_firefox_android.png Binary files differnew file mode 100644 index 0000000..665dd79 --- /dev/null +++ b/notebook/static/images/download_firefox_android.png diff --git a/notebook/static/images/icons/activestate.png b/notebook/static/images/icons/activestate.png Binary files differnew file mode 100644 index 0000000..aac54ec --- /dev/null +++ b/notebook/static/images/icons/activestate.png diff --git a/notebook/static/images/icons/bitbucket.png b/notebook/static/images/icons/bitbucket.png Binary files differnew file mode 100644 index 0000000..aae89d0 --- /dev/null +++ b/notebook/static/images/icons/bitbucket.png diff --git a/notebook/static/images/icons/delicious.png b/notebook/static/images/icons/delicious.png Binary files differnew file mode 100644 index 0000000..c6ce246 --- /dev/null +++ b/notebook/static/images/icons/delicious.png diff --git a/notebook/static/images/icons/facebook.png b/notebook/static/images/icons/facebook.png Binary files differnew file mode 100644 index 0000000..a7914b4 --- /dev/null +++ b/notebook/static/images/icons/facebook.png diff --git a/notebook/static/images/icons/github.png b/notebook/static/images/icons/github.png Binary files differnew file mode 100644 index 0000000..348db81 --- /dev/null +++ b/notebook/static/images/icons/github.png diff --git a/notebook/static/images/icons/jamendo.png b/notebook/static/images/icons/jamendo.png Binary files differnew file mode 100644 index 0000000..47f1320 --- /dev/null +++ b/notebook/static/images/icons/jamendo.png diff --git a/notebook/static/images/icons/lastfm.png b/notebook/static/images/icons/lastfm.png Binary files differnew file mode 100644 index 0000000..b09c787 --- /dev/null +++ b/notebook/static/images/icons/lastfm.png diff --git a/notebook/static/images/icons/linkedin.png b/notebook/static/images/icons/linkedin.png Binary files differnew file mode 100644 index 0000000..feb0496 --- /dev/null +++ b/notebook/static/images/icons/linkedin.png diff --git a/notebook/static/images/icons/phosting.png b/notebook/static/images/icons/phosting.png Binary files differnew file mode 100644 index 0000000..f9f4b55 --- /dev/null +++ b/notebook/static/images/icons/phosting.png diff --git a/notebook/static/images/icons/reader.png b/notebook/static/images/icons/reader.png Binary files differnew file mode 100644 index 0000000..62972a2 --- /dev/null +++ b/notebook/static/images/icons/reader.png diff --git a/notebook/static/images/icons/rss.png b/notebook/static/images/icons/rss.png Binary files differnew file mode 100644 index 0000000..7d4e85d --- /dev/null +++ b/notebook/static/images/icons/rss.png diff --git a/notebook/static/images/icons/stackoverflow.png b/notebook/static/images/icons/stackoverflow.png Binary files differnew file mode 100644 index 0000000..6c2adcb --- /dev/null +++ b/notebook/static/images/icons/stackoverflow.png diff --git a/notebook/static/images/icons/twitter.png b/notebook/static/images/icons/twitter.png Binary files differnew file mode 100644 index 0000000..3a2d328 --- /dev/null +++ b/notebook/static/images/icons/twitter.png diff --git a/notebook/static/images/icons/weibo.png b/notebook/static/images/icons/weibo.png Binary files differnew file mode 100644 index 0000000..8c749d9 --- /dev/null +++ b/notebook/static/images/icons/weibo.png diff --git a/notebook/templates/archives.html b/notebook/templates/archives.html new file mode 100644 index 0000000..32e78a3 --- /dev/null +++ b/notebook/templates/archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +<h1>Archives</h1> + +<dl> +{% for article in dates %} + <dt>{{ article.locale_date }}</dt> + <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd> +{% endfor %} +</dl> +{% endblock %} diff --git a/notebook/templates/article.html b/notebook/templates/article.html new file mode 100644 index 0000000..f3d6212 --- /dev/null +++ b/notebook/templates/article.html @@ -0,0 +1,60 @@ +{% extends "base.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ article.author }}"> +<meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}"> +<meta name="twitter:title" content="{{ article.title }}"> +<meta name="twitter:description" content="{{ article.summary }}"> +{% endblock head %} +{% block title %}{{ article.title }}{% endblock %} +{% block content %} +<section id="content"> + <article> + <header class="post_list"> + <h2 class="post_title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title }}">{{ article.title }}</a></h2> + <span>Par </span> + <a href="{{ SITEURL }}/{{ article.author.url }}">@{{ article.author }}</a> + <span> dans </span> + <span class="post_category"><a href="{{ SITEURL }}/{{ article.category.url }}" rel="bookmark" title="Permalink to {{ article.category|striptags }}">[ {{ article.category }} ]</a></span> + <span> le </span> + <span class="post_date">{{ article.locale_date }}</span> + <div><span>Tags : </span> + {% if article.tags %} + {% for tag in article.tags %} + <span><a href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}, </a></span> + {% endfor %} + {% endif %} + </div> + + <div class="entry-social"> + <span class="twitter"><a href="https://twitter.com/home/?status={{ article.title }}%20%7C%20{{ SITEURL }}/{{article.url}}%20by%20@{{TWITTER_USERNAME}}" target="_blank">Twitter</a></span> + + <span class="gplus"><a href="http://plus.google.com/share?url={{ SITEURL }}/{{article.url}}&hl=fr" target="_blank">Google+</a></span> + + <span class="facebook"><a href="http://www.facebook.com/sharer.php?u={{ SITEURL }}/{{article.url}}&t={{ article.title }}" target="_blank">Facebook</a></span> + + <span class="mail"><a href="mailto:?subject={{ article.title }}&body=Viens découvrir un article à propos de [{{ article.title }}] sur le site de {{ AUTHOR }}. {{ SITEURL }}/{{article.url}}" title="Share by Email" target="_blank">Mail</a></span> + </div> + </header> + <div class="entry-content"> + {{ article.content }} + </div> + {% if DISQUS_SITENAME %} + <div class="comments"> + <h2>Comments !</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> +</section> +{% endblock %}
\ No newline at end of file diff --git a/notebook/templates/author.html b/notebook/templates/author.html new file mode 100644 index 0000000..8c18a4c --- /dev/null +++ b/notebook/templates/author.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }}{% endblock %}
\ No newline at end of file diff --git a/notebook/templates/base.html b/notebook/templates/base.html new file mode 100644 index 0000000..6e9c24d --- /dev/null +++ b/notebook/templates/base.html @@ -0,0 +1,99 @@ +<!doctype html> +<html lang="{{ DEFAULT_LANG }}"> +<head> + {% block head %} + <meta charset="utf-8"> + <title>{% block title %}{{ SITENAME }}{% endblock %}</title> + <meta name="description" content=""> + <meta name="author" content="{{ AUTHOR }}"> + + <link rel="stylesheet" href="{{ SITEURL }}/theme/css/notebook.css" type="text/css" /> + <link rel="shortcut icon" href="{{ SITEURL }}/{{ AVATAR}}"> + + <link href="{{ SITEURL }}/{{ FEED }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} ATOM Feed" /> + {% if FEED_RSS %} + <link href="{{ SITEURL }}/{{ FEED_RSS }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> + {% endif %} + + <meta name="twitter:card" content="summary"> + <meta name="twitter:site" content="{{ SITENAME }}"> + <meta name="twitter:image" content="{{ SITEURL }}/{{ AVATAR }}"> + {% endblock %} +</head> + +<body> + <!-- Sidebar --> + <aside> + <p><a href="{{ SITEURL }}"><img id="avatar" src="{{ SITEURL }}/{{ AVATAR }}"></a></p> + <h1>{{ SITENAME }}</h1> + <p>{{ SIDEBAR_DIGEST }}</p> + <hr> + <h2>Social</h2> + <ul class="social"> + {% for name, link in SOCIAL %} + <li style="list-style-image : url({{ SITEURL }}/theme/images/icons/{{ name|lower }}.png);"><a href="{{ link }}">{{ name }}</a></li> + {% endfor %} + <li style="list-style-image : url({{ SITEURL }}/theme/images/icons/rss.png);"><a href="{{ SITEURL }}/{{ FEED_ATOM }}" rel="alternate"><i class="icon-bookmark icon-large"></i>Atom feed</a></li> + {% if FEED_RSS %} + <li style="list-style-image : url({{ SITEURL }}/theme/images/icons/rss.png);"><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">RSS feed</a></li> + {% endif %} + </ul> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU and PAGES %} + <h2>Pages</h2> + <ul class="navbar"> + {% for p in PAGES %} + <li><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> + {% endfor %} + </ul> + {% endif %} + {% if categories %} + <h2>Categories</h2> + <ul class="navbar"> + {% for cat, null in categories %} + <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> + {% endfor %} + </ul> + {% endif %} + </aside> + + <!-- Content --> + <article> + {% block content %} + {% endblock %} + </article> + + <!-- Footer --> + <footer> + <address id="about" class="vcard body"> + {% if FIREFOX_BANNERS %} + <div align="center"> + {% for id, img, alt in FIREFOX_BANNERS %} + <a href="http://affiliates.mozilla.org/link/banner/{{ id }}" target="_blank"><img src="{{ img }}" alt="{{ alt }}"/></a> + {% endfor %} + </div> + {% endif %} + Blog powered by <a href="http://getpelican.com/">Pelican</a>, + which takes great advantage of <a href="http://python.org">Python</a>. + Theme <a href="https://github.com/quack1/notebook/">Notebook</a> by <a href="https://twitter.com/_Quack1">@Quack1</a>. + </address> + </footer> + + {% if GOOGLE_ANALYTICS %} + <!-- 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>
\ No newline at end of file diff --git a/notebook/templates/categories.html b/notebook/templates/categories.html new file mode 100644 index 0000000..8ea08c4 --- /dev/null +++ b/notebook/templates/categories.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block content %} +<h2>Categories</h2> +<ul class="category_folder"> +{% for category, articles in categories %} + <li><a href="{{ category.url }}">{{ category }}</a></li> +{% endfor %} +</ul> +{% endblock %}
\ No newline at end of file diff --git a/notebook/templates/category.html b/notebook/templates/category.html new file mode 100644 index 0000000..ed909a5 --- /dev/null +++ b/notebook/templates/category.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ category }}{% endblock %}
\ No newline at end of file diff --git a/notebook/templates/index.html b/notebook/templates/index.html new file mode 100644 index 0000000..80e8897 --- /dev/null +++ b/notebook/templates/index.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} +{% if articles %} +<ol> + {% for article in (articles_page.object_list if articles_page else articles) %} + <li class="post_list"><p class="post_entry"> + <h2 class="post_title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> + <a href="{{ SITEURL }}/{{ article.author.url }}">@{{ article.author }}</a> + <span> dans </span> + <span class="post_category"><a href="{{ SITEURL }}/{{ article.category.url }}" rel="bookmark" title="Permalink to {{ article.category|striptags }}">[ {{ article.category }} ]</a></span> + <span> le </span> + <span class="post_date">{{ article.locale_date }}</span> + </li> + {% endfor %} +</ol> +{% endif %} + +{% if articles_page and articles_paginator.num_pages > 1 %} +{% include 'pagination.html' %} +{% endif %} + +{% endblock content %}
\ No newline at end of file diff --git a/notebook/templates/page.html b/notebook/templates/page.html new file mode 100644 index 0000000..223b52c --- /dev/null +++ b/notebook/templates/page.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{% endblock %} +{% block content %} +<section id="content" class="body"> + <h1 class="entry-title">{{ page.title }}</h1> + {% if PDF_PROCESSOR %} + <a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf"> + get the pdf + </a> + {% endif %} + {{ page.content }} +</section> +{% endblock %} diff --git a/notebook/templates/pagination.html b/notebook/templates/pagination.html new file mode 100644 index 0000000..b01bfc9 --- /dev/null +++ b/notebook/templates/pagination.html @@ -0,0 +1,16 @@ +{% if DEFAULT_PAGINATION %} +<p class="paginator"> + {% if articles_page.has_previous() %} + {% if articles_page.previous_page_number() == 1 %} + <a href="{{ SITEURL }}/{{ page_name }}.html">~:)</a> + {% else %} + <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">~:)</a> + {% endif %} + {% endif %} + {{ articles_page.number }} ~ {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">(:~</a> + {% endif %} +</p> +{% endif %} + diff --git a/notebook/templates/tag.html b/notebook/templates/tag.html new file mode 100644 index 0000000..aadd7a5 --- /dev/null +++ b/notebook/templates/tag.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %}
\ No newline at end of file diff --git a/notebook/templates/tags.html b/notebook/templates/tags.html new file mode 100644 index 0000000..03d3fbb --- /dev/null +++ b/notebook/templates/tags.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% block content %} +<h2>Tags</h2> +<ul> +{% for tag in tag_cloud %} +<li class="tag"> + <a href="{{ SITEURL }}/{{ tag.0.url }}"> + {{ tag.0 }} + </a> +</li> +{% endfor %} +</ul> +{% endblock %} diff --git a/notebook/templates/translations.html b/notebook/templates/translations.html new file mode 100644 index 0000000..25e7ca0 --- /dev/null +++ b/notebook/templates/translations.html @@ -0,0 +1,6 @@ +{% if article.translations %} +<span class="label">Langues</span> +{% for translation in article.translations %} + <a href="{{ SITEURL }}/{{ translation.url }}"><i class="icon-edit"></i>{{ translation.lang }}</a> +{% endfor %} +{% endif %}
\ No newline at end of file |