1
0

import du theme dans github

This commit is contained in:
Jérémie Ducastel
2015-08-09 22:49:57 +02:00
parent 5e068f639d
commit ece36d7498
13 changed files with 641 additions and 0 deletions

77
templates/article.html Normal file
View File

@ -0,0 +1,77 @@
{% extends "base.html" %}
{% block title %}{{ article.title }}{% endblock title %}
{% block local %}
{# aside content #}
{% block local_aside %}
<aside id="local-aside" class="six wide computer four wide tablet column">
{#}<span class="ui horizontal divider"><i class="location arrow icon"></i></span>
<nav class="ui fluid secondary menu">
<a href="{{ SITEURL }}/" class="header item"><i class="home icon"></i></a>
<a href="{{ SITEURL }}/{{ article.category.url }}" class="item">
<i class="folder icon"></i>{{ article.category }}
</a>
</nav>{#}
{% if article.metadata.image %}
<span class="ui horizontal divider"><i class="picture icon"></i></span>
<img id="illustration" class="ui image" src="{{ article.metadata.image }}" />
{% endif %}
<div class="ui large horizontal divider"><i class="calendar outline icon"></i></div>
<p class="text item">{{ article.locale_date }}</p>
{% if article.tags %}
<div class="ui horizontal divider"><i class="tags icon"></i></div>
<nav class="ui secondary menu">
{% for tag in article.tags %}
<a href="/{{ tag.url }}" class="item">{{ tag | escape }}</a>{% endfor %}
</nav>
{% endif %}
{# TODO : fix author index etc #}
<div class="ui horizontal divider">
<i class="user icon"></i>
</div>
<nav class="ui secondary fluid vertical menu">
{% for author in article.authors %}
<a class="item" href="/{{ author.url }}">{{ author }}</a>
{% endfor %}
</nav>
</aside>
{% endblock local_aside %}
{# main content #}
{% block main %}
<main id="main" class="ui eight wide computer ten wide tablet column">
<article id="article" class="ui top attached segment">
<h1 class="ui header">{{ article.title }}</h1>
<section class="content">
{{ article.content }}
</section>
{% if TWITTER_USERNAME and False %}
<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a><script type="text/javascript" src="https://platform.twitter.com/widgets.js"></script>
{% endif %}
</article>
{# liens via http://www.sharelinkgenerator.com #}
<footer class="ui bottom attached menu">
<span class="header item">Partager</span>
<a href="https://twitter.com/home?status={{ article.title }}%20{{ SITEURL }}/{{ article.url }}" class="item" title="tweeter">
<i class="twitter icon"></i> </a>
<a href="https://plus.google.com/share?url={{ SITEURL }}/{{ article.url }}" class="item" title="google+">
<i class="google plus icon"></i> </a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ SITEURL }}/{{ article.url }}" class="item" title="facebook">
<i class="facebook icon"></i> </a>
{# https://www.linkedin.com/shareArticle?mini=true&amp;url={{ SITEURL }}/{{ article.url }}&amp;title={{ article.title }}&amp;summary={{ article.summary }} #}
<a href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ SITEURL }}/{{ article.url }}&amp;title={{ article.title }}" class="item" title="linkedin">
<i class="linkedin icon"></i> </a>
<a href="mailto:?&amp;subject={{ article.title }}&amp;body={{ SITEURL }}/{{ article.url }}" class="item">
<i class="mail icon"></i></a>
</footer>
</main>
{% endblock main %}
{% endblock local %}

20
templates/author.html Normal file
View File

@ -0,0 +1,20 @@
{% extends "index.html" %}
{% block title %}{{ author }} | {{ SITENAME }}{% endblock %}
{% block breadcrumb %}
<a href="/" class="item"><i class="home icon"></i></a>
<span class="active item" data-content="{{ tag }}"><i class="user icon"></i> {{ author }}</span>
{% endblock %}
{% block feeds %}
{% if AUTHOR_FEED_ATOM %}{# TO DO : formatage ur categorie #}
<a href="{{ FEED_DOMAIN }}/{{ AUTHOR_FEED_ATOM | format(author) }}" type="application/atom+xml" rel="alternate" class="item">
<i class="user icon"></i><i class="feed icon"></i>
</a>
{% elif AUTHOR_FEED_RSS %}
<a href="{{ FEED_DOMAIN }}/{{ AUTHOR_FEED_RSS | format(author) }}" type="application/rss+xml" rel="alternate" class="item">
<i class="user icon"></i><i class="feed icon"></i>
</a>
{% endif %}
{% endblock %}

50
templates/base.html Normal file
View File

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Properties -->
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
{% 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 %}
<!-- styles + JS -->
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}/semantic-ui/semantic.css">
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}/screen.css" media="screen">
</head>
{# TODO indentation, commentaires #}
{# FIXME appels javascript ko ? #}
<body>{% block body %}
<div id="grid" class="ui stackable grid">
{% block header %}<header id="header" class="sixteen wide column">
<a href="/" class="ui header title">
{{ SITENAME }}
{% if SITESUBTITLE %}<small class="subtitle">{{ SITESUBTITLE }}</small>{% endif %}
</a>
</header>
{% endblock %}
{# pages (changing) content #}
{% block local %}<div id="local" class="fourteen wide computer column">
<article class="ui segment">
<p>hello content</p>
</article>
</div>{% endblock %}
{# global / fixed content #}
{% block global %}
{% include "inc/global-navs.aside.html" %}
{% endblock %}
{% endblock %}</div>{# end grid #}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/jquery/jquery.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/semantic-ui/semantic.min.js"></script>
</body>
</html>

20
templates/category.html Normal file
View File

@ -0,0 +1,20 @@
{% extends "index.html" %}
{% block title %}{{ category }} | {{ SITENAME }}{% endblock %}
{% block breadcrumb %}
<a href="/" class="item"><i class="home icon"></i></a>
<span class="active item" data-content="{{ category }}"><i class="folder icon"></i> {{ category }}</span>
{% endblock %}
{% block feeds %}
{% if CATEGORY_FEED_ATOM %}{# TO DO : formatage ur categorie #}
<a href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM | format(category) }}" type="application/atom+xml" rel="alternate" class="item">
<i class="folder icon"></i><i class="feed icon"></i>
</a>
{% elif CATEGORY_FEED_RSS %}
<a href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS | format(category) }}" type="application/rss+xml" rel="alternate" class="item">
<i class="folder icon"></i><i class="feed icon"></i>
</a>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,37 @@
<article class="card">
{#}<header class="extra content">
<a class="meta category" href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
</header>#}
<section class="content">
<a class="header" href="/{{ article.url }}">{{ article.title }}</a>
{# TODO : si systeme d'icones par categorie, remplacer l'icone ici #}
{% if category %}
<div class="ui horizontal divider">
<i class="folder icon"></i>
</div>
{% else %}
<a class="ui horizontal divider category" href="/{{ article.category.url }}">
<i class="folder icon"></i> {{ article.category }}
</a>
{% endif %}
<section class="summary">
{{ article.summary }}
</section>
</section>
{% if article.metadata.image %}
<div class="image">
<img src="{{ article.metadata.image }}" />
</div>
{% else %}
{#}<div class="center aligned">
<i class="large circular leaf icon"></i>
</div>#}
{% endif %}
<footer class="extra content">
<a href="/{{ article.url }}"><i class="angle double right icon"></i> lire</a>
<!--<span class="right floated">{{ article.locale_date }}</span>-->
<a href="https://getpocket.com/save?url={{ SITEURL }}/{{ article.category.url }}" title="Save to pocket" class="right floated">
<i class="cloud upload icon"></i> pocket
</a>
</footer>
</article>

View File

@ -0,0 +1,11 @@
{% if articles %}{# contenu principal : cartes articles #}
<main id="main" class="ui cards">{% for article in articles_page.object_list %}
{% include "inc/article-card.html" %}{% endfor %}
</main>
{% else %}
<main class="">
<article class="ui segment">
<p>Nothing yet !</p>
</article>
</main>
{% endif %}

View File

@ -0,0 +1,54 @@
{# navigation globale #}
<aside id="global" class="two wide computer column">
{% if DISPLAY_CATEGORIES_ON_MENU %}
<div class="ui horizontal divider">
<i class="folder icon"></i>
</div>
<nav class="ui vertical secondary icon menu">
{% for cat, articles in categories %}
{% if cat==category %}
<a href="/{{ cat.url }}" class="active item">{{ cat }}</a>
{% else %}
<a href="/{{ cat.url }}" class="item">{{ cat }}</a>
{% endif %}
{% endfor %}
</nav>
{% endif %}
<div class="ui horizontal divider">
<i class="file icon"></i>
</div>
<nav class="ui vertical secondary icon menu">
{% for p in pages %}
{% if page and p==page %}
<a href="/{{ p.url }}" class="active item">{{ p.title }}</a>
{% else %}
<a href="/{{ p.url }}" class="item">{{ p.title }}</a>
{% endif %}{% endfor %}
</nav>
<div class="ui horizontal divider">
<i class="share alternate icon"></i>
</div>
<nav class="ui vertical secondary icon menu">
{#}{% if FEED_ALL_ATOM %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" class="item">
<i class="large feed icon"></i>
</a>
{% endif %}#}
{% for name, link in SOCIAL %}
<a href="{{ link }}" class="item"><i class="large {{ name }} icon"></i></a>{% endfor %}
</nav>
<div class="ui horizontal divider">
<i class="pointing down icon"></i>
</div>
<nav class="ui vertical secondary icon menu">
{% for name, link in LINKS %}
<a href="{{ link }}" class="item">{{ name }}</a>
{% endfor %}
</nav>
</aside>

View File

@ -0,0 +1,10 @@
<div class="ui horizontal divider"><i class="file icon"></i></div>
<nav class="ui large vertical fluid secondary menu">{% for p in PAGES %}
{% if page and p.slug == page.slug %}
<a href="{{ SITEURL }}/{{ p.url }}" class="active item">{{ p.title }}</a>
{% else %}
<a href="{{ SITEURL }}/{{ p.url }}" class="item">{{ p.title }}</a>
{% endif %}
{% endfor %}
</nav>

51
templates/index.html Normal file
View File

@ -0,0 +1,51 @@
{% extends "base.html" %}
{% block title %}{% if category %}{% elif tag %}{{ tag }} | {{ SITENAME }}{% else %}{{ SITENAME }}{% endif %}{% endblock %}
{% block local %}<div id="local" class="fourteen wide computer column">
{# local navigation : 1 semantic-ui menu, three jinja blocks :
- breadcrumb links items
- pagination links
- feeds links
#}
<nav id="local-nav" class="ui secondary menu">
<span class="header item">
<i class="location arrow icon"></i>
</span>
{% block breadcrumb %}
<a href="/" class="active item"><i class="home icon"></i></a>
{% endblock %}
{% block pagination %}
{% if articles_page.has_previous() %}
<a href="/{{ articles_previous_page.url }}" class="item"><i class="backward icon"></i></a>
{% else %}
<span class="disabled item"><i class="backward icon"></i></span>
{% endif %}
<span class="text item">{{ articles_page.number }} / {{ articles_paginator.num_pages }}</span>
{% if articles_page.has_next() %}
<a href="/{{ articles_next_page.url }}" class="item"><i class="forward icon"></i></a>
{% else %}
<span class="disabled item"><i class="forward icon"></i></span>
{% endif %}
{% endblock %}{# end pagination items #}
{% block feeds %}
{% if FEED_ALL_ATOM %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" class="item" title="full atom feed">
<i class="feed icon"></i>
</a>
{% elif FEED_ALL_RSS %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" class="item" title="full RSS feed">
<i class="feed icon"></i>
</a>
{% endif %}
{% endblock %}
</nav>
{# local content #}
{% block local_content %}
{% include "inc/article-cards.main.html" %}
{% endblock %}
</div>{% endblock %}{# end block local #}

28
templates/page.html Normal file
View File

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block title %}{{ page.title }} | {{ SITENAME }}{% endblock %}
{% block local %}
{% block local_aside %}
<aside class="five wide column">
<div class="ui horizontal divider"><i class="location arrow icon"></i></div>
<nav class="ui large secondary menu">
<a href="{{ SITEURL }}/" class="header item"><i class="home icon"></i></a>
<a class="item" href="{{ page.url }}"><i class="file icon"></i> {{ page.title }}</a>
</nav>
{#}{% include "inc/pages.nav.html" %}#}
</aside>
{% endblock %}
{% block main %}<main class="nine wide column">
<article class="ui segment">
<h1 class="entry-title">{{ page.title }}</h1>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }}
{{ page.content }}
</article>
</main>
{% endblock %}
{% endblock %}

View File

@ -0,0 +1,27 @@
{% extends "index.html" %}
{% block breadcrumb %}
<a href="/" class="item"><i class="home icon"></i></a>
{% if period|length==2 %}
<a class="item" href="/{{ period[0] }}/"><i class="calendar icon"></i> {{ period[0] }}</a>
<span class="active item"><i class="calendar outline icon"></i> {{ period[1] }}</span>
{% else %}
<a class="active item" href="/{{ period[0] }}/"><i class="calendar icon"></i> {{ period[0] }}</a>
{% endif %}
{% endblock breadcrumb %}
{% block pagination %}{% endblock pagination %}
{% block local_content %}
{% if articles %}{# contenu principal : cartes articles #}
<main id="main" class="ui cards">{% for article in dates %}
{% include "inc/article-card.html" %}{% endfor %}
</main>
{% else %}
<main class="">
<article class="ui segment">
<p>Nothing yet !</p>
</article>
</main>
{% endif %}
{% endblock %}

20
templates/tag.html Normal file
View File

@ -0,0 +1,20 @@
{% extends "index.html" %}
{% block title %}{{ tag }} | {{ SITENAME }}{% endblock %}
{% block breadcrumb %}
<a href="/" class="item"><i class="home icon"></i></a>
<span class="active item" data-content="{{ tag }}"><i class="tag icon"></i> {{ tag }}</span>
{% endblock %}
{% block feeds %}
{% if TAG_FEED_ATOM %}{# TO DO : formatage ur categorie #}
<a href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM | format(tag) }}" type="application/atom+xml" rel="alternate" class="item">
<i class="tag icon"></i><i class="feed icon"></i>
</a>
{% elif TAG_FEED_RSS %}
<a href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS | format(tag) }}" type="application/rss+xml" rel="alternate" class="item">
<i class="tag icon"></i><i class="feed icon"></i>
</a>
{% endif %}
{% endblock %}