diff options
author | Kura <kura@kura.io> | 2014-06-09 14:10:21 +0100 |
---|---|---|
committer | Kura <kura@kura.io> | 2014-06-09 14:10:21 +0100 |
commit | 32607120f455d53c6da8b755bd2529abad715046 (patch) | |
tree | ae9b8e55c384c06f971a734a8d2a364166caf9e5 | |
parent | d0a9737671da09cd8bf0ee5ce1fc4aded1867544 (diff) | |
parent | 498c22cc41261f229f181b76aabc613d9472f91e (diff) | |
download | pelican-themes-32607120f455d53c6da8b755bd2529abad715046.zip pelican-themes-32607120f455d53c6da8b755bd2529abad715046.tar.gz pelican-themes-32607120f455d53c6da8b755bd2529abad715046.tar.bz2 |
Merge pull request #98 from quack1/master
New theme : Notebook
43 files changed, 609 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..d765b9a --- /dev/null +++ b/notebook/README.md @@ -0,0 +1,59 @@ +# 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. + +## Icons + +The social icons are from Font-Awesome, and colorized by myself. + +Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome diff --git a/notebook/screenshot.png b/notebook/screenshot.png Binary files differnew file mode 100644 index 0000000..0e17b4a --- /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..f4f8afa --- /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..d55817e --- /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..7ae545b --- /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 auto 285px; + 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..ca08481 --- /dev/null +++ b/notebook/static/images/icons/facebook.png diff --git a/notebook/static/images/icons/facebook2.png b/notebook/static/images/icons/facebook2.png Binary files differnew file mode 100644 index 0000000..684bc66 --- /dev/null +++ b/notebook/static/images/icons/facebook2.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..54899e1 --- /dev/null +++ b/notebook/static/images/icons/github.png diff --git a/notebook/static/images/icons/github2.png b/notebook/static/images/icons/github2.png Binary files differnew file mode 100644 index 0000000..9c53e29 --- /dev/null +++ b/notebook/static/images/icons/github2.png diff --git a/notebook/static/images/icons/gplus.png b/notebook/static/images/icons/gplus.png Binary files differnew file mode 100644 index 0000000..82097aa --- /dev/null +++ b/notebook/static/images/icons/gplus.png diff --git a/notebook/static/images/icons/gplus2.png b/notebook/static/images/icons/gplus2.png Binary files differnew file mode 100644 index 0000000..f4cf5c7 --- /dev/null +++ b/notebook/static/images/icons/gplus2.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..70aea1c --- /dev/null +++ b/notebook/static/images/icons/linkedin.png diff --git a/notebook/static/images/icons/phone.png b/notebook/static/images/icons/phone.png Binary files differnew file mode 100644 index 0000000..d683017 --- /dev/null +++ b/notebook/static/images/icons/phone.png diff --git a/notebook/static/images/icons/phone2.png b/notebook/static/images/icons/phone2.png Binary files differnew file mode 100644 index 0000000..2c87889 --- /dev/null +++ b/notebook/static/images/icons/phone2.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/pinterest.png b/notebook/static/images/icons/pinterest.png Binary files differnew file mode 100644 index 0000000..c345fae --- /dev/null +++ b/notebook/static/images/icons/pinterest.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..eb648c3 --- /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..94b8c22 --- /dev/null +++ b/notebook/static/images/icons/twitter.png diff --git a/notebook/static/images/icons/twitter2.png b/notebook/static/images/icons/twitter2.png Binary files differnew file mode 100644 index 0000000..6a806ff --- /dev/null +++ b/notebook/static/images/icons/twitter2.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..352ecd9 --- /dev/null +++ b/notebook/templates/archives.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/archives.html"> +<meta name="twitter:title" content="{{ SITENAME }} ~ Archives"> +<meta name="twitter:description" content="{{ SITENAME }} ~ Archives du site"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ Archives" /> +<meta property="og:description" content="{{ SITENAME }} ~ Archives" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% 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..2fa83c2 --- /dev/null +++ b/notebook/templates/article.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}"> +<meta name="twitter:title" content="{{ SITENAME }} ~ {{ article.title }}"> +<meta name="twitter:description" content="{{ article.summary }}"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ {{ article.title }}" /> +<meta property="og:description" content="{{ article.summary }}" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% 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 target="_blank" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;" title="Twitter" href="https://twitter.com/share?url={{ SITEURL }}/{{ article.url }}&text={{ article.title }}&via={{TWITTER_USERNAME}}">Twitter</a></span> + + <span class="gplus"><a target="_blank" title="Google +" href="https://plus.google.com/share?url={{ SITEURL }}/{{article.url}}&hl=fr" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">Google+</a></span> + + <span class="facebook"><a target="_blank" title="Facebook" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700');return false;" href="https://www.facebook.com/sharer.php?u={{ SITEURL }}/{{article.url}}&t={{ article.title }}">Facebook</a></span> + + <a target="_blank" title="Linkedin" href="https://www.linkedin.com/shareArticle?mini=true&url=<{{ SITEURL }}/{{ article.url }}&title={{ article.title }}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;">Linkedin</a> + + <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..624ac82 --- /dev/null +++ b/notebook/templates/author.html @@ -0,0 +1,14 @@ +{% extends "index.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/{{ author.url }}"> +<meta name="twitter:title" content="{{ SITENAME }} ~ {{ author }}"> +<meta name="twitter:description" content="Articles de {{ author }}"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ {{ author }}" /> +<meta property="og:description" content="Articles de {{ author }}" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% 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..5483e93 --- /dev/null +++ b/notebook/templates/base.html @@ -0,0 +1,103 @@ +<!doctype html> +<html lang="{{ DEFAULT_LANG }}"> +<head> + {% block head %} + <meta charset="utf-8"> + <!-- Site Meta Data --> + <title>{% block title %}{{ SITENAME }}{% endblock %}</title> + <meta name="description" content=""> + <meta name="author" content="{{ AUTHOR }}"> + + <!-- Style Meta Data --> + <link rel="stylesheet" href="{{ SITEURL }}/theme/css/notebook.css" type="text/css" /> + <link rel="shortcut icon" href="{{ SITEURL }}/{{ AVATAR}}"> + + <!-- Feed Meta Data --> + <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 %} + + <!-- Twitter Feed --> + <meta name="twitter:card" content="summary"> + <meta name="twitter:site" content="{{ TWITTER_USERNAME }}"> + <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..e24fd40 --- /dev/null +++ b/notebook/templates/categories.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/categories.html"> +<meta name="twitter:title" content="{{ SITENAME }} ~ Catégories"> +<meta name="twitter:description" content="{{ SITENAME }} ~ Catégories du site"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ Catégories" /> +<meta property="og:description" content="{{ SITENAME }} ~ Catégories" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% 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..ccbbeab --- /dev/null +++ b/notebook/templates/category.html @@ -0,0 +1,14 @@ +{% extends "index.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/{{ category.url }}"> +<meta name="twitter:title" content="{{ SITENAME }} ~ {{ category }}"> +<meta name="twitter:description" content="Articles de {{ category }}"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ {{ category }}" /> +<meta property="og:description" content="Articles de {{ category }}" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% 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..fced918 --- /dev/null +++ b/notebook/templates/index.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}"> +<meta name="twitter:title" content="{{ SITENAME }}"> +<meta name="twitter:description" content="{{ SIDEBAR_DIGEST }}"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }}" /> +<meta property="og:description" content="{{ SIDEBAR_DIGEST }}" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% 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..c0b8d77 --- /dev/null +++ b/notebook/templates/tag.html @@ -0,0 +1,14 @@ +{% extends "index.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/{{ tag.url }}"> +<meta name="twitter:title" content="{{ SITENAME }} ~ {{ tag }}"> +<meta name="twitter:description" content="Articles de {{ tag }}"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ {{ tag }}" /> +<meta property="og:description" content="Articles de {{ tag }}" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% 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..90bfc19 --- /dev/null +++ b/notebook/templates/tags.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% block head %} +{{ super() }} +<meta name="twitter:creator" content="{{ TWITTER_USERNAME }}"> +<meta name="twitter:url" content="{{ SITEURL }}/tags.html"> +<meta name="twitter:title" content="{{ SITENAME }} ~ Tags"> +<meta name="twitter:description" content="{{ SITENAME }} ~ Tags du site"> + +<!-- Facebook Meta Data --> +<meta property="og:title" content="{{ SITENAME }} ~ Tags" /> +<meta property="og:description" content="{{ SITENAME }} ~ Tags" /> +<meta property="og:image" content="{{ AVATAR }}" /> +{% endblock head %} +{% block content %} +<h2>Tags</h2> +<ul> +{% for tag, articles in tags %} + <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</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 |