Commit 2e60faef authored by Dimitris Zlatanidis's avatar Dimitris Zlatanidis

Added new theme

Signed-off-by: Dimitris Zlatanidis's avatarDimitris Zlatanidis <d.zlatanidis@gmail.com>
parent 743a340f
Pipeline #45867926 passed with stages
in 34 seconds
This diff is collapsed.
pelican-theme-jesuislibre
=========================
This is theme for Pelican inspired by [dbrgn blog site](http://blog.dbrgn.ch)
I have added buttons for social sites
you can see the result in the screenshot or on my [my official blog site](http://blog.jesuislibre.org)
Don't hesitate use it :)
Sample of pelicanconf.py
```python
LINKS = ((u'Home', u'/'), (u'archives', u'/archives.html'), (u'tags', u'/tags.html'), (u'A propos', u'http://bruno.adele.im'))
SITESUBTITLE = u'Une famille compl\xe8tement 633<'
DEFAULT_LANG = u'fr'
SITEURL = u'http://blog.jesuislibre.org'
AUTHOR = u'Bruno Adelé'
SITENAME = u'Famille de geeks'
SOCIAL = ((u'adele', u'http://adele.im'), (u'feed', u'http://feeds.feedburner.com/FamilleDeGeek'), (u'twitter', u'http://twitter.com/jesuislibre.org'), (u'google+', u'https://plus.google.com/100723270029692582967'), (u'blog', u'http://blog.jesuislibre.org'), (u'facebook', u'http://www.facebook.com/bruno.adele'), (u'flickr', u'http://www.flickr.com/photos/b_adele'), (u'linkedin', u'http://fr.linkedin.com/in/brunoadele'))
FEED_DOMAIN = u'http://blog.jesuislibre.org'
FEED_ALL_ATOM = u'feed.atom'
DISQUS_SITENAME = u'blogdejesuislibreorg'
DEFAULT_PAGINATION = 10
GITHUB_BLOG_SITE = u'https://github.com/badele/blog.jesuislibre.org'
```
AUTHOR_IMG = u'http://bruno.adele.im/static/bruno.jpg'
AUTHOR_LINK = u'http://bruno.adele.im'
AUTHOR_SUMMARY = u"Agé de 40 ans avec 20 ans d'expérience dans le développement et dans le réseau (y compris internet). Passionné d'informatique depuis son plus jeune âge, a un faible pour les logiciels libres. En recherche d'opportunité dans la région de Montpellier pour exercer sa passion, de préférence dans la R&D"
AUTHOR = u'Bruno Adel\xe9'
DEFAULT_LANG = u'fr'
DEFAULT_PAGINATION = 10
DISQUS_SITENAME = u'blogdejesuislibreorg'
FEED_ALL_ATOM = u'feed.atom'
FEED_DOMAIN = u'http://blog.jesuislibre.org'
GITHUB_BLOG_SITE = u'https://github.com/badele/blog.jesuislibre.org'
LINKS = ((u'Home', u'/'), (u'archives', u'/archives.html'), (u'tags', u'/tags.html'), (u'A propos', u'http://bruno.adele.im'))
SITENAME = u'Famille de geeks'
SITESUBTITLE = u'Une famille compl\xe8tement 633<'
SITEURL = u'http://blog.jesuislibre.org'
SOCIAL = ((u'adele', u'http://adele.im'), (u'feed', u'http://feeds.feedburner.com/FamilleDeGeek'), (u'twitter', u'http://twitter.com/jesuislibre.org'), (u'google+', u'https://plus.google.com/100723270029692582967'), (u'blog', u'http://blog.jesuislibre.org'), (u'facebook', u'http://www.facebook.com/bruno.adele'), (u'flickr', u'http://www.flickr.com/photos/b_adele'), (u'linkedin', u'http://fr.linkedin.com/in/brunoadele'))
body {
font-family: 'Linden Hill', Georgia, serif;
font-size: 19px;
}
#wrapper {
max-width: 900px;
margin: 10px auto 0;
}
#blogtitle {
float: left;
font-size: 3em;
}
#subtitle {
margin-top: -10px;
font-size: 0.5em;
color: #777777;
}
#mainnav {
margin: 0;
padding: 0;
font-size: 20px;
float: right;
}
#mainnav li, #mainnav li a {
list-style-type: none;
text-align: center;
display: inline-block;
background-color: black;
color:white;
padding: 0px 3px;
/* rotate */
-webkit-transform: rotate(353deg);
-moz-transform: rotate(353deg);
-o-transform: rotate(353deg);
writing-mode: lr-tb;
}
#mainnav li a, #mainnav li a:visited {
color:white;
}
#mainnav li:before {
/*content: '{\00A0';*/
}
#mainnav li:after {
/*content: '\00A0}';*/
}
#content {
margin-top: 50px;
}
#content p {
text-align: justify;
}
div.footer {
border-top: 1px solid #555;
padding-top: 9px;
margin-top: 42px; font-size: 16px;
text-align: center; color: #555;
}
div.footer p {
margin: 0;
}
div.highlight, pre.literal-block {
background-color: #f4f4f4;
border: 1px solid #ddd;
margin-bottom: 10px;
border-left: 4px solid #2669AD;
}
div.highlight pre, pre.literal-block {
margin: 5px;
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 14px;
}
pre.literal-block {
padding: 5px;
}
tt.literal {
background-color: #eee;
padding: 2px 5px;
}
cite {
font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 13px;
font-style: normal;
}
.figure .caption {
font-style: italic;
}
h1 cite {
font-size: 26px;
margin: 0 2px;
}
h1 {
margin-bottom: 0px;
}
.date {
color: #777;
display: block;
margin-top: 0px;
}
img.flattrbutton {
margin-top: 15px;
float: right;
}
/* div.tags p { */
/* float: right; */
/* clear: both; */
/* } */
a.tag, a:visited.tag, a:hover.tag {
border-radius: 15px 1px 15px 1px;
background: #999999;
color: #FFFFFF;
padding: 4px;
font-size: 12px;
text-decoration: none;
}
.field-list .field-name {
text-align: left;
padding-right: 15px;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a, a:visited {
color: #2669AD;
}
.article-overview {
margin-bottom: 35px;
}
.article-overview h1 {
font-size: 1.5em;
margin: 0;
}
.article-overview .summary p {
margin: 0;
}
/* .tags { */
/* margin-top: 20px; */
/* } */
/* .tags:after { */
/* content: " "; */
/* display: block; */
/* height: 0; */
/* clear: both; */
/* visibility: hidden; */
/* } */
.clearboth {
clear: both;
}
.align-center {
display: block;
margin: 0 auto;
}
.align-right {
float: right;
margin-left: 10px;
}
.align-left {
float: left;
margin-right: 10px;
}
/* Author */
.author {
background: #F4F4F4;
padding: 10px;
/* border: solid 1px #2669AD; */
border: solid 1px #DDDDDD;
margin: 20px 0 10px 0;
}
h3 {
margin: 10px 0 10px 0;
}
.author img {
float: left;
margin: 10px 20px 20px 0;
padding: 2px;
border: 1px solid #DDDDDD;
}
.infos > p {
margin-bottom: 0px;
}
/* Media queries */
@media only screen and (max-width: 600px or max-device-width: 600px) {
body, #wrapper {
max-width: 600px;
}
#mainnav {
float: left;
clear: both;;
}
}
@media only screen and (max-width: 500px or max-device-width: 500px) {
body, #wrapper {
max-width: 500px;
}
p {
line-height: 1.7em;
}
.blog-archive li {
margin-bottom: 15px;
}
}
.pagination{
height:36px;
margin:18px 0;
}
.pagination ul{
float:left;
margin:0;
border:1px solid #ddd;
border:1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius:8px;
-moz-border-radius:8px;
border-radius:8px;
}
.pagination li{
display:inline;
}
.pagination a{
float:left;
padding:0 14px;
line-height:34px;
border-right:1px solid;
border-right-color:#ddd;
border-right-color:rgba(0, 0, 0, 0.15);
*border-right-color:#ddd;
text-decoration:none;
}
.pagination a:hover,.pagination .active a{
background-color:#c7eefe;
}
.pagination .disabled a,.pagination .disabled a:hover{
background-color:transparent;
color:#bfbfbf;
}
.pagination .next a{
border:0;
}
body { background: url('../images/slack_background.jpg'); }
{% extends "base.html" %}
{% block title %}{{ SITENAME }} <small>[archive]</small>{% endblock %}
{% block content %}
{% for year, articles in dates|groupby( 'date.year' )|reverse %}
<h2>{{ year }}</h2>
<ul>
{% for article in articles %}
<li><a href="{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
{% endblock %}
{% extends "base.html" %}
{% block title %}{{ article.title|striptags }}{% endblock %}
{% block content %}
<h1>{{ article.title }}</h1>
<div class=date>{{ article.locale_date }}
{% if article.tags %}
/ <span class="tags">
{% for tag in article.tags %}
<a class="tag" href="{{ SITEURL }}/{{ tag.url }}">{{ tag|e }}</a>
{% endfor %}
</span>
{% endif %}
</div>
{{ article.content }}
{% include 'author.html' %}
{% include 'disqus.html' %}
{% include 'cacause.html' %}
{% endblock %}
{% if AUTHOR %}
<div class="author">
<a href="{{ AUTHOR_LINK }}">
<img src="{{ AUTHOR_IMG }}" alt="{{ AUTHOR }}" width="128" height="108"/>
</a>
<div class="infos">
<h3>A propos de <a href="{{ AUTHOR_LINK }}">{{ AUTHOR }}</a></h3>
<p>{{ AUTHOR_SUMMARY }}</p>
</div>
</div>
{% endif %}
<!doctype html>
<html lang="{{ DEFAULT_LANG }}">
<head>
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
<!-- meta -->
<meta charset="utf-8" />
<meta name="author" content="{{ AUTHOR }}" />
<!-- Feeds -->
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
{% endif %}
<!-- Style -->
<link href="https://fonts.googleapis.com/css?family=Linden+Hill:400,400italic" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
<link rel="shortcut icon" href="{{ SITEURL }}/theme/favicon.ico" />
<!-- Google analytics -->
{% if GOOGLE_ANALYTICS_ID %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ GOOGLE_ANALYTICS_ID }}', '{{ GOOGLE_ANALYTICS_SITENAME }}');
ga('send', 'pageview');
</script>
{% endif %}
</head>
<body>
<div id="wrapper">
<div id="blogtitle">
<a href="{{ SITEURL }}/">{{ SITENAME }}</a>
{% if SITESUBTITLE %}<div id="subtitle">{{ SITESUBTITLE }}</div>{% endif %}
</div>
<!-- Blogroll -->
<ul id="mainnav">
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
<div class="clearboth"></div>
<div id="content">
{% block content %}
{% endblock %}
</div>
</div>
<!-- footer -->
<div class=footer>
<div class="textwidget">
{% for name, link in SOCIAL %}
{% if name == "adele" %}
<a alt="family site" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_aim.png" alt="aim button"/></a>
{% endif %}
{% if name == "feed" %}
<a alt="feed RSS" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_rss.png" alt="rss button"/></a>
{% endif %}
{% if name == "twitter" %}
<a alt="twitter" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_twitter.png" alt="twitter button" /></a>
{% endif %}
{% if name == "google+" %}
<a alt="Google +" rel="author" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_google+.png" alt="google + button" /></a>
{% endif %}
{% if name == "blog" %}
<a alt="Blog" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_blog.png" alt="blog jesuislibre button" /></a>
{% endif %}
{% if name == "facebook" %}
<a alt="facebook" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_facebook.png" alt="facebook button" /></a>
{% endif %}
{% if name == "flickr" %}
<a alt="flickr" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_flickr.png" alt="flickr button" /></a>
{% endif %}
{% if name == "linkedin" %}
<a alt="linkedin" href="{{ link }}"><img src="{{ SITEURL }}/theme/button/badge_linkedin.png" alt="linkedin button" /></a>
{% endif %}
{% endfor %}
</div>
<p>
Carburize with <a href="http://blog.getpelican.com">pelican</a>{% if GITHUB_BLOG_SITE %}, site available on <a href="{{ GITHUB_BLOG_SITE }}">github</a>{% endif %}</p>
<p><a href="https://github.com/badele/pelican-theme-jesuislibre">jesuislibre</a> theme, inspired by <a href="http://blog.dbrgn.ch">dbrng</a> blog</p>
<p><a href="http://bruno.adele.im">about author</a></p>
</div>
{% if PIWIK_ID %}
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ PIWIK_SERVER }}" : "http://{{ PIWIK_SERVER }}");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ PIWIK_ID }});
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<noscript>
<p><img src="http://{{ PIWIK_SERVER }}/piwik.php?idsite={{ PIWIK_ID }}" style="border:0" alt="" /></p>
</noscript>
{% endif %}
</body>
</html>
{% if CACAUSE_SITENAME %}
<div>
<a class="pure-button pure-button-primary" href="javascript:showHide('comment-form');">Commenter</a>
</div>
<div id="comment-form" style="display:none">
<form class="pure-form pure-form-aligned" role="form" action="{{ CACAUSE_ENGINE_URL }}/api/add" method="post">
<input type="hidden" value="{{ CACAUSE_SITENAME }}" name="cc_sitename"/>
<input type="hidden" value="{{ article.slug }}" name="cc_url" />
<input type="hidden" value="{{ article.cacause_article }}" name="cc_pageid"/>
<fieldset>
<div class="pure-control-group" >
<label for="author">Nom</label>
<input class="pure-u-1-4" id="author" name="cc_author" type="text" placeholder="Nom ou Surnom (obligatoire)" required></input>
</div>
<div class="pure-control-group">
<label for="email">Email</label>
<input class="pure-u-1-4" id="email" name="cc_author_email" type="email" placeholder="Email (optionnel)"></input>
</div>
<div class="pure-control-group">
<label for="site">Site Web</label>
<input class="pure-u-1-4" id="site" name="cc_author_website" type="text" placeholder="Site Web (optionnel)"></input>
</div>
<div class="pure-control-group">
<label for="cc_rawcomment">Commentaire</label>
<textarea class="pure-u-1-4" id="message" name="cc_rawcomment" rows="3" placeholder="Votre commentaire ..." required></textarea>
</div>
<div class="pure-controls">
<button type="submit" class="pure-button pure-button-primary">Envoyer</button>
</div>
</fieldset>
</form>
</div>
{% if article.cacause_comment %}
{% for comment in article.cacause_comment %}
<hr>
<div class="inline">
{% if comment.site %}
<a href="{{ comment.site }}">
{% endif %}
{% if CACAUSE_GRAVATAR and comment.gravatar %}
<img src="{{ comment.gravatar }}" height="32" width="32" style="float:left; margin-right:10px"/>
{% endif %}
{% if comment.site %}
</a>
{% endif %}
<span class="title">{{ comment.author }}</span>
<span> - </span>
<span>{{ comment.date }}</span>
</div>
{{ comment.body }}
{% endfor %}
{% endif %}
<script type="text/javascript"><!--
function showHide(elementid){
if (document.getElementById(elementid).style.display == 'none'){
document.getElementById(elementid).style.display = '';
} else {
document.getElementById(elementid).style.display = 'none';
}
}
--></script>
{% endif %}
{% if DISQUS_SITENAME %}
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(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>
{% endif %}
<?xml version="1.0" encoding="utf-8"?>
{% extends "base.html" %}
{% block content %}
<section id="content">
{% block content_title %}
{% endblock %}
<div class="row">
{% for article in articles_page.object_list %}
<div class=article-overview>
<div class=date>{{ article.locale_date }}</div>
<div class=detail>
<h1><a href="{{ SITEURL }}/{{ article.url }}" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
{% if article.summary %}
<div class=summary>{{ article.summary }}</div>
{% endif %}
</div>
<!-- tags list -->
{% if article.tags %}
<div class="tags">
{% for tag in article.tags %}
<a class="tag" href="{{ SITEURL }}/{{ tag.url }}">{{ tag|e }}</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</div><!-- /.row -->
{% include 'pagination.html' %}
</section><!-- /#content -->
{% endblock content %}
{% extends "base.html" %}
{% block title %}{{ page.title }}- {{ SITENAME }}{% endblock %}
{% block content %}
<div class="row">
<h1>{{ page.title }}</h1>
{{ page.content }}
</div>
{% endblock %}
{% if DEFAULT_PAGINATION %}
{% if articles_page and articles_paginator.num_pages > 1 %}
<div class="pagination">
<ul>
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
<li class="prev"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">&larr; </a></li>
{% else %}
<li class="prev disabled"><a href="#">&larr; </a></li>
{% endif %}
{% for num in range( 1, 1 + articles_paginator.num_pages ) %}
<li class="{{ 'active' if num == articles_page.number else '' }}"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li>
{% endfor %}
{% if articles_page.has_next() %}
<li class="next"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html"> &rarr;</a></li>
{% else %}
<li class="next disabled"><a href="#">&rarr; </a></li>
{% endif %}
</ul>
</div>
{% endif %}
{% endif %}
{% extends "index.html" %}
{% block title %}{{ SITENAME }} <small>{{ tag }}</small>{% endblock %}
{% extends "base.html" %}
{% block content %}
<h1>Tags</h1>
<ul class=tagcloud>
{% for tag in tag_cloud|sort %}
<li><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0|e }}</a></li>
{% endfor %}
</ul>
{% endblock %}