2017 base
This commit is contained in:
parent
0221bde4a8
commit
a58709fea1
|
@ -64,7 +64,7 @@ MARKDOWN = {
|
|||
|
||||
WITH_FUTURE_DATES = False
|
||||
|
||||
THEME = 'themes/minimunit'
|
||||
THEME = 'themes/2017'
|
||||
|
||||
SLUGIFY_SOURCE = 'title'
|
||||
PAGE_URL = '{slug}/index.html'
|
||||
|
|
161
themes/2017/static/css/style.css
Normal file
161
themes/2017/static/css/style.css
Normal file
|
@ -0,0 +1,161 @@
|
|||
/*@import url('../fonts/fantastique-sans/stylesheet.css');*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* GENERAL *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
font-family: 'Fantasque Sans Mono', monospace;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* PAGE *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 426px) {
|
||||
body {
|
||||
width: 40vw;
|
||||
margin: 2rem auto;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* TEXT *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
p, li {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* HEADER *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
margin: 2rem auto 2rem auto;
|
||||
}
|
||||
|
||||
header > img,
|
||||
header > h1 {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
header > img {
|
||||
width: 4rem;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* NAVBAR *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
nav {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
nav > ul {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
nav > ul > li {
|
||||
display: inline-block;
|
||||
margin-right: 0.8rem;
|
||||
color: #378ab4;
|
||||
}
|
||||
|
||||
nav > ul > li:before {
|
||||
content: "+";
|
||||
margin-right: 0.3rem;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* SECTION *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
section {
|
||||
width: 100%;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
|
||||
section:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
section > p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
section > p > span {
|
||||
padding: 0.1rem 0;
|
||||
background: #000000;
|
||||
box-shadow: 0 0 0 #000000, 0 0 0 #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
section > p:first-child > span {
|
||||
background: #378ab4;
|
||||
box-shadow: 0 0 0 #378ab4, 0 0 0 #378ab4;
|
||||
}
|
||||
|
||||
section > img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.sitebanner {
|
||||
position: relative;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.siteimage {
|
||||
float: left;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
#menu li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#post-list {
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#banner {
|
||||
height: 85px;
|
||||
}
|
42
themes/2017/templates/archives.html
Normal file
42
themes/2017/templates/archives.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}Archivio {{ SITENAME }}{% endblock %}
|
||||
{% block ogtitle %}Archivio {{ SITENAME }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/archives.html{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/archives.html{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
<div class="span9">
|
||||
<section>
|
||||
<h1>{% block content_title %}Archivio per data{% endblock %}</h1>
|
||||
|
||||
{% for article in dates %}
|
||||
{% set this_year = article.date.strftime('%Y') %}
|
||||
|
||||
{% if this_year != prev_year %}
|
||||
<div class="row-fluid archive_row">
|
||||
<div class="span1 archive_year">{{ this_year }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if this_year != prev_year or this_month != prev_month %}
|
||||
<div class="row-fluid archive_row">
|
||||
<div class="offset1 span1 archive_month">{{ this_month }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row-fluid archive_row">
|
||||
{% if this_month != prev_month or this_day != prev_day %}
|
||||
<div class="offset1 span1 archive_day">
|
||||
{{ this_day }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="{% if this_year == prev_year and this_month == prev_month and this_day == prev_day %}offset2 {% endif %}span10">
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> <small>{{ article.category }}</small></dd>
|
||||
</div>
|
||||
</div>
|
||||
{% set prev_year = this_year %}
|
||||
{% set prev_month = this_month %}
|
||||
{% set prev_day = this_day %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
28
themes/2017/templates/article.html
Normal file
28
themes/2017/templates/article.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ article.title|striptags }} | {{ SITENAME }}{% endblock %}
|
||||
{% block ogtitle %}{{ article.title|striptags }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/{{ article.url }}{%endblock%}
|
||||
{% block ogtype %}article{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/{{ article.url }}{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="span10 offset1">
|
||||
<section>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
|
||||
title="Permalink a {{ article.title|striptags }}">{{ article.title}}</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
{% include 'article_infos.html' %}
|
||||
{{ article.content }}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
25
themes/2017/templates/article_infos.html
Normal file
25
themes/2017/templates/article_infos.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<footer class="post-info">
|
||||
{% if article.author %}
|
||||
<address class="vcard author">
|
||||
autore: <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
|
||||
</address>
|
||||
{% endif %}
|
||||
|
||||
data inserimento: {{ article.date.strftime('%d %B %Y') }}
|
||||
|
||||
<br>
|
||||
|
||||
categoria: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
|
||||
<br>
|
||||
|
||||
{% if article.tags %}
|
||||
tag: {% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
|
||||
</footer>
|
5
themes/2017/templates/author.html
Normal file
5
themes/2017/templates/author.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}{{ SITENAME }} - {{ author }} | {{ SITENAME }}{% endblock %}
|
||||
{% block ogtitle %}{{ SITENAME }} - {{ author }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/{{ author.url }}{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/{{ author.url }}{%endblock%}
|
83
themes/2017/templates/base.html
Normal file
83
themes/2017/templates/base.html
Normal file
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
{% block head %}
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" />
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_ATOM and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(slug=category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_RSS and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(slug=category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_ATOM and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(slug=tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_RSS and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(slug=tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
|
||||
{% endif %}
|
||||
{% endblock head %}
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
<header id="banner" class="body">
|
||||
<!-- site image -->
|
||||
{% if SITELOGO %}
|
||||
<div class= "siteimage">
|
||||
<a href={{ SITELOGO }}>
|
||||
<img width="85" height="85" src={{ SITELOGO }}>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class = "sitebanner">
|
||||
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
|
||||
</div>
|
||||
</header><!-- /#banner -->
|
||||
<nav id="menu"><ul>
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in pages %}
|
||||
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %}
|
||||
{% for cat, null in categories %}
|
||||
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul></nav><!-- /#menu -->
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<footer id="contentinfo" class="body">
|
||||
<hr>
|
||||
<address id="about" class="vcard body">
|
||||
<small>
|
||||
Alimentato da
|
||||
<a href="http://python.org">Python</a> e
|
||||
<a href="http://getpelican.com/">Pelican</a>, tema
|
||||
<a href="https://git.abbiamoundominio.org/unit/website-pelican">minimunit</a><br>
|
||||
Se hai pensato che c'era un modo migliore, avevi ragione.
|
||||
</small>
|
||||
</address><!-- /#about -->
|
||||
</footer><!-- /#contentinfo -->
|
||||
|
||||
</body>
|
||||
</html>
|
19
themes/2017/templates/categories.html
Normal file
19
themes/2017/templates/categories.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}Categorie di {{ SITENAME }}{% endblock %}
|
||||
{% block ogtitle %}Categorie di {{ SITENAME }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/categories.html{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/categories.html{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
<div class="span9">
|
||||
<section>
|
||||
<h1>{% block content_title %}Categorie {% endblock %}</h1>
|
||||
|
||||
<dl>
|
||||
{% for category, articles in categories %}
|
||||
<dd><a href="{{ SITEURL }}/{{ category.url }}">{{ category }} ({{ articles|count }})</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
6
themes/2017/templates/category.html
Normal file
6
themes/2017/templates/category.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "archives.html" %}
|
||||
{% block title %}{{ SITENAME }} - {{ category }}{% endblock %}
|
||||
{% block content_title %} Ricerca per categoria: {{ category }}{% endblock %}
|
||||
{% block ogtitle %}{{ SITENAME }} - {{ category }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/{{ category.url }}{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/{{ category.url }}{%endblock%}
|
74
themes/2017/templates/index.html
Normal file
74
themes/2017/templates/index.html
Normal file
|
@ -0,0 +1,74 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content_title %}{% endblock %}
|
||||
{% block ogtitle %}{{ SITENAME }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
<div class="span9">
|
||||
{% if articles %}
|
||||
{% for article in articles_page.object_list %}
|
||||
{% if loop.length > 0 %}
|
||||
{% if loop.first %}
|
||||
<section>
|
||||
<ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
|
||||
{% endif %}
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink: {{ article.title|striptags }}">
|
||||
{{ article.title }}
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
{% include 'article_infos.html' %}
|
||||
{{ article.summary }}
|
||||
<p class="readmore">
|
||||
<a class="btn btn-small btn-info" href="{{ SITEURL }}/{{ article.url }}">continua..</a>
|
||||
</p>
|
||||
</div>
|
||||
<hr/>
|
||||
</article>
|
||||
{% if loop.last %}
|
||||
</ol><!-- /#posts-list -->
|
||||
{% if loop.last and (articles_page.has_previous()
|
||||
or not articles_page.has_previous() and loop.length > 1) %}
|
||||
{% include 'pagination.html' %}
|
||||
{% endif %}
|
||||
</section><!-- /#content -->
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<section>
|
||||
<h2>Pages</h2>
|
||||
{% for page in PAGES %}
|
||||
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% if LINKS %}
|
||||
<div>
|
||||
<h2>Links</h2>
|
||||
<ul>
|
||||
{% for name, link in LINKS %}
|
||||
<li><a href="{{ link }}">{{ name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div><!-- /.Links -->
|
||||
{% endif %}
|
||||
{% if TAG_CLOUD_STEPS %}
|
||||
<div>
|
||||
<h2>Tags</h2>
|
||||
<ul id="cloud">
|
||||
{% for tag in tag_cloud %}
|
||||
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}<!-- /.Tags -->
|
||||
</div>
|
15
themes/2017/templates/page.html
Normal file
15
themes/2017/templates/page.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title }} | {{ SITENAME }}{% endblock %}
|
||||
{% block ogtitle %}{{ page.title|striptags }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/{{ page.url }}{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/{{ page.url }}{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
<section >
|
||||
<h1 class="entry-title">{{ page.title }}</h1>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
{{ page.content }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
6
themes/2017/templates/tag.html
Normal file
6
themes/2017/templates/tag.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "archives.html" %}
|
||||
{% block title %}{{ SITENAME }} - {{ tag }} | {{ SITENAME }}{% endblock %}
|
||||
{% block content_title %}Ricerca per tag: "{{ tag }}"{% endblock %}
|
||||
{% block ogtitle %}{{ SITENAME }} - {{ tag }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/{{ tag.url }}{%endblock%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/{{ tag.url }}{%endblock%}
|
19
themes/2017/templates/tags.html
Normal file
19
themes/2017/templates/tags.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends "index.html" %}
|
||||
{% block title %}Tags in {{ SITENAME }}{% endblock %}
|
||||
{% block ogtitle %}Tags in {{ SITENAME }}{% endblock %}
|
||||
{% block ogurl %}{{ SITEURL }}/tags.html{%endblock%}%}
|
||||
{% block canonicalurl %}{{ SITEURL }}/tags.html{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
<div class="span9">
|
||||
<section>
|
||||
<h1>{% block content_title %}Tags{% endblock %}</h1>
|
||||
|
||||
<dl>
|
||||
{% for tag, articles in tags|sort %}
|
||||
<dd><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }} ({{ articles|count }})</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
10
themes/2017/templates/translations.html
Normal file
10
themes/2017/templates/translations.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{% macro translations_for(article) %}
|
||||
{% if article.translations %}
|
||||
<br>
|
||||
Translations:
|
||||
{% for translation in article.translations %}
|
||||
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
Loading…
Reference in New Issue
Block a user