first commit
This commit is contained in:
59
themes/fsmi-theme/templates/archives.html
Normal file
59
themes/fsmi-theme/templates/archives.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% set name = 'Archives' %}
|
||||
{% set link = 'archives.html' %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if dates %}
|
||||
{# year list #}
|
||||
<div class="panel-group" id="accordion">
|
||||
{% for articles_group_by_year in dates|groupby('date.year')|reverse %}
|
||||
{% set year = articles_group_by_year %}
|
||||
{% set parent = ["Year",year.grouper]|join %}
|
||||
<div class="panel panel-primary">
|
||||
{# year list heading #}
|
||||
<div class="panel-heading panel-title">
|
||||
<a id="{{ parent }}" href="#{{ parent }}">{{ year.grouper }}</a>
|
||||
<a class="accordion-toggle" data-toggle="collapse"
|
||||
{# data-parent="#accordion" #}
|
||||
title="toggle folding"
|
||||
href="#collapseYear{{ year.grouper }}">
|
||||
<span class="badge pull-right">
|
||||
{{ year.list|count }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
{# end year list heading #}
|
||||
|
||||
{# year list body #}
|
||||
<div class="panel-collapse collapse in"
|
||||
id="collapseYear{{ year.grouper }}">
|
||||
<div class="panel-body">
|
||||
|
||||
{# month list #}
|
||||
<div class="panel-group" id="accordionYear{{ year.grouper }}">
|
||||
{% for articles_group_by_month in year.list|groupby('date.month')|reverse %}
|
||||
|
||||
{% set month = articles_group_by_month %}
|
||||
|
||||
{% from 'macro.html' import article_panel_list with context %}
|
||||
{% set id = [parent,"Month",month.grouper]|join %}
|
||||
{% set title_left = month.list[0].date|strftime('%B') %}
|
||||
{% set title_right = month.list|count %}
|
||||
{% set entry_list = month.list %}
|
||||
{{ article_panel_list(parent,id,title_left,title_right,entry_list,show_date=True) }}
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{# end month list #}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{# end year list body #}
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{# end year list #}
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
50
themes/fsmi-theme/templates/article.html
Normal file
50
themes/fsmi-theme/templates/article.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{% set name = article.title %}
|
||||
{% set link = article.url %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% from 'macro.html' import article_info with context %}
|
||||
{% from 'macro.html' import genurl with context %}
|
||||
|
||||
{{ article_info(article) }}
|
||||
<hr/>
|
||||
|
||||
<div id="article_content">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
{% if article.related_posts %}
|
||||
{% from 'macro.html' import article_panel_list with context %}
|
||||
{% set articles = article.related_posts %}
|
||||
{% set parent = '' %}
|
||||
{% set id = "collapseRelated" %}
|
||||
{% set title_left = "Verwandte Posts" %}
|
||||
{% set title_right = articles|count %}
|
||||
{% set entry_list = articles %}
|
||||
{{ article_panel_list(parent,id,title_left,title_right,entry_list) }}
|
||||
{% endif %}
|
||||
|
||||
{% for temp in dates %}
|
||||
{% if temp.url == article.url %}
|
||||
{% if not loop.first %}
|
||||
{% set prev = dates[loop.index0-1] %}
|
||||
{% endif %}
|
||||
{% if not loop.last %}
|
||||
{% set next = dates[loop.index0+1] %}
|
||||
{% endif %}
|
||||
<ul class="pager">
|
||||
<li class="previous{% if not prev %} disabled{% endif %}">
|
||||
<a {% if prev %}href="{{ genurl( prev.url, force=True ) }}"{% endif %}>
|
||||
« Neuer</a>
|
||||
</li>
|
||||
<li class="next{% if not next %} disabled{% endif %}">
|
||||
<a {% if next %}href="{{ genurl( next.url, force=True ) }}"{% endif %}>
|
||||
Älter »</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
15
themes/fsmi-theme/templates/author.html
Normal file
15
themes/fsmi-theme/templates/author.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% set name = author %}
|
||||
{% set link = ["author/",author,".html"]|join %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% from 'macro.html' import article_panel_list with context %}
|
||||
{% set parent = '' %}
|
||||
{% set id = ["collapse",author]|join %}
|
||||
{% set title_left = author %}
|
||||
{% set title_right = articles|count %}
|
||||
{% set entry_list = articles %}
|
||||
{{ article_panel_list(parent,id,title_left,title_right,entry_list) }}
|
||||
|
||||
{% endblock %}
|
||||
55
themes/fsmi-theme/templates/base.html
Normal file
55
themes/fsmi-theme/templates/base.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% from 'macro.html' import genurl with context %}
|
||||
{% set link = ['/',link]|join %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="{{ SITENAME }}">
|
||||
<meta name="author" content="{{ AUTHOR }}">
|
||||
{% if FAVICON and FAVICON_TYPE %}
|
||||
<link rel="icon" type="image/{{ FAVICON_TYPE }}" href="{{ genurl( FAVICON ) }}">
|
||||
{% endif %}
|
||||
|
||||
{% from 'macro.html' import pagetitle with context %}
|
||||
{{ pagetitle(name) }}
|
||||
|
||||
<link rel="stylesheet" href="{{ genurl( '/theme/css/main.css' ) }}">
|
||||
|
||||
{% if output_file == 'sprechstunden.html '%}
|
||||
<link rel="stylesheet" href="{{ genurl( '/theme/css/sprechstunden.css' ) }}">
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="wrap">
|
||||
{% from 'macro.html' import navbar with context %}
|
||||
{{ navbar(link) }}
|
||||
<div>
|
||||
{% block left_sidebar %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <div class="row">
|
||||
{% from 'macro.html' import pageheader with context %}
|
||||
{{ pageheader(name,link) }}
|
||||
</div> -->
|
||||
<div>
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% block pagefooter %}{% endblock %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% block right_sidebar %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% from 'macro.html' import footer with context %}
|
||||
{{ footer() }}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
36
themes/fsmi-theme/templates/categories.html
Normal file
36
themes/fsmi-theme/templates/categories.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% set name = "Categories" %}
|
||||
{% set link = "categories.html" %}
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if categories %}
|
||||
<p>
|
||||
{% from 'macro.html' import taglist %}
|
||||
{{ taglist(categories, "#", "") }}
|
||||
</p>
|
||||
|
||||
<div class="panel-group" id="accordion">
|
||||
{% for category, articles in categories|sort %}
|
||||
|
||||
{% from "macro.html" import article_panel_list with context %}
|
||||
{% set parent = "accordion" %}
|
||||
{% set id = category %}
|
||||
{% set title_left = category %}
|
||||
{% set title_left_link = "/category/%s.html" % (category) %}
|
||||
{% set title_right = articles|count %}
|
||||
{% set entry_list = articles %}
|
||||
{{ article_panel_list(
|
||||
parent=parent,
|
||||
id=id,
|
||||
title_left=title_left,
|
||||
title_left_link=title_left_link,
|
||||
title_right=title_right,
|
||||
entry_list=entry_list,
|
||||
) }}
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
13
themes/fsmi-theme/templates/category.html
Normal file
13
themes/fsmi-theme/templates/category.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% set name = ["Category: ",category]|join %}
|
||||
{% set link = ["category/",category,".html"]|join %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% from 'macro.html' import article_panel_list with context %}
|
||||
{% set parent = '' %}
|
||||
{% set id = category %}
|
||||
{% set title_left = category %}
|
||||
{% set title_right = articles|count %}
|
||||
{% set entry_list = articles %}
|
||||
{{ article_panel_list(parent,id,title_left,title_right,entry_list) }}
|
||||
{% endblock %}
|
||||
324
themes/fsmi-theme/templates/css/main.css
Normal file
324
themes/fsmi-theme/templates/css/main.css
Normal file
@@ -0,0 +1,324 @@
|
||||
h1 {font-size: 1.6em}
|
||||
h2 {font-size: 1.4em}
|
||||
h3 {font-size: 1.2em}
|
||||
h4 {font-size: 1.1em}
|
||||
h5 {font-size: 1.0em}
|
||||
h6 {font-size: 1.0em}
|
||||
|
||||
h1.title {
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
padding: 0.2em 0.5em;
|
||||
color:white;
|
||||
padding-right: 0em;
|
||||
border-radius: 0.3em 0.0em 0.0em 0.3em;
|
||||
}
|
||||
|
||||
#logo {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
#page-content h1, #page-content h2 {
|
||||
padding: 0.2em 0.5em;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
#page-content h1{
|
||||
background-color: rgba(0,0,0,0.9);
|
||||
}
|
||||
#page-content h1 a{
|
||||
color:white;
|
||||
}
|
||||
#page-content h2{
|
||||
background-color: rgba(0,0,0,0.65);
|
||||
|
||||
}
|
||||
/*Style for general links*/
|
||||
a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
a ,.navbar-text, #menu-toggle + label{
|
||||
text-decoration:none;
|
||||
color: #2c3e6e;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*Link styling for header*/
|
||||
a.menulink {
|
||||
text-decoration:none;
|
||||
padding-right:0.2em;
|
||||
padding-left:0.2em;
|
||||
display:inline-block;
|
||||
}
|
||||
a.head:hover, a.head:active, a.menulink:hover, a.menulink:active{
|
||||
|
||||
background-color: black;
|
||||
color:white;
|
||||
text-decoration:none;
|
||||
/*padding:0.1rem;*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#page-title > a:hover{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
font-size: 15px;
|
||||
font-family: "Gill Sans", "Gill Sans MT", "" sans-serif;
|
||||
background-image:url('/2017/theme/pattern.png'));
|
||||
color: black;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
height: auto
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: inline-block;
|
||||
}
|
||||
/*Navigation*/
|
||||
#navbar {
|
||||
font-size: 1.2rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#navbar .navbar-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#navbar .navbar-header > div {
|
||||
flex: initial;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
/*display: inline-block;*/
|
||||
/*width: 80%;*/
|
||||
font-size: 2rem;
|
||||
/*color: #2c3e6e;*/
|
||||
/*text-align: center;*/
|
||||
}
|
||||
|
||||
|
||||
.navbar-img {
|
||||
/*min-width: 9%;*/
|
||||
/*display: inline-block;*/
|
||||
/*text-align: center;*/
|
||||
margin-right: 2rem;
|
||||
}
|
||||
|
||||
#menuitem-list {
|
||||
text-align: center;
|
||||
font-size: 25pt;
|
||||
padding-left: 0em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center ;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
@media all and (max-width: 55rem) {
|
||||
#menuitem-list {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
li.dropdown {
|
||||
/*display: inline-block;*/
|
||||
/*vertical-align: top;*/
|
||||
padding-right:2%;
|
||||
padding-left:2%;
|
||||
list-style-type: none;
|
||||
flex-basis: max-content;
|
||||
}
|
||||
|
||||
|
||||
ul.dropdown-content {
|
||||
font-size:65%;
|
||||
display: none;
|
||||
list-style: none;
|
||||
text-align: left;
|
||||
padding-left: 2em;
|
||||
padding-right: 1em;
|
||||
border:thin solid #333;
|
||||
position:absolute;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
border-top: none;
|
||||
}
|
||||
#menu-toggle{
|
||||
display: none;
|
||||
}
|
||||
#menu-toggle + label {
|
||||
display: none;
|
||||
text-align: center;
|
||||
font-size:1.5em;
|
||||
border-bottom: dotted 2px darkgrey;
|
||||
border-top: dotted 2px darkgrey;
|
||||
|
||||
|
||||
}
|
||||
@media all and (max-width: 55rem) {
|
||||
ul.dropdown-content{
|
||||
text-align: center;
|
||||
}
|
||||
ul.dropdown-content{
|
||||
position: static;
|
||||
}
|
||||
#menu-toggle + label {
|
||||
display: block;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
#menu-toggle:checked + label{
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#menu-toggle {
|
||||
opacity: 0;
|
||||
display: block;
|
||||
|
||||
}
|
||||
#menu-toggle ~ #menuitem-list {
|
||||
display: none;
|
||||
}
|
||||
#menu-toggle:checked ~ #menuitem-list{
|
||||
display: block;
|
||||
border-bottom: dotted 2px darkgrey;
|
||||
|
||||
}
|
||||
}
|
||||
.dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin: 0;
|
||||
margin-bottom: 21px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.article_info {
|
||||
padding: 0.1em 1em;
|
||||
border-radius: 0.3em;
|
||||
background-color: rgba(84, 191, 199, 0.5);
|
||||
}
|
||||
|
||||
.pagination {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
td.code {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.panel-group {
|
||||
width:80%;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
|
||||
.panel, #page-content{
|
||||
background-color: rgba(183, 183, 183, 0.3);
|
||||
border-radius:0.3em 0.3em 0 0;
|
||||
|
||||
}
|
||||
|
||||
.panel{
|
||||
padding:1rem;
|
||||
/*margin-bottom:0.1em;*/
|
||||
/*background-color: #2c3e6e;*/
|
||||
margin-bottom: 1rem;
|
||||
/*border-bottom: 0.2em solid #ddd;*/
|
||||
}
|
||||
|
||||
ul.pagination {
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
ul.pagination li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
padding: 0 0.2em;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.container {
|
||||
width:90%;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
#page-content {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
/*background-color: #2c3e6e;*/
|
||||
/*color: #fff;*/
|
||||
padding: 1em;
|
||||
/*border-radius: 0.3em;*/
|
||||
}
|
||||
|
||||
/*#page-content p {*/
|
||||
/*color: #E1FFFF;*/
|
||||
/*}*/
|
||||
|
||||
#page-content .header {
|
||||
border-bottom: 0.1em dotted black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#page-content .content {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.wall-of-text {
|
||||
line-height: 1.5em;
|
||||
/*column-count: 2;*/
|
||||
column-width: 30em;
|
||||
column-gap: 1.5em;
|
||||
column-rule: dashed 0.1em red;
|
||||
widows: 3;
|
||||
orphans: 3;
|
||||
}
|
||||
|
||||
/*.wall-of-text p {*/
|
||||
/*-webkit-margin-before: 0;*/
|
||||
/*-webkit-margin-after: 0;*/
|
||||
/*}*/
|
||||
|
||||
.wall-of-text :not(p) {
|
||||
column-span: all;
|
||||
}
|
||||
45
themes/fsmi-theme/templates/index.html
Normal file
45
themes/fsmi-theme/templates/index.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% set name = '' %}
|
||||
{% set link = '' %}
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% from 'macro.html' import genurl with context %}
|
||||
|
||||
{% if articles %}
|
||||
{% if articles_page %}
|
||||
{% set articles = articles_page.object_list %}
|
||||
{% endif %}
|
||||
|
||||
<div class="panel-group">
|
||||
{% for article in articles %}
|
||||
{% set year = article.date|strftime('%Y') %}
|
||||
{% set month = article.date|strftime('%B') %}
|
||||
{% set month_index = article.date|strftime('%m') %}
|
||||
{% set article_url = genurl( article.url, force=True ) %}
|
||||
|
||||
<div class="panel">
|
||||
<a href="{{ article_url }}"><h1 class="title">
|
||||
{{- article.title -}}
|
||||
</h1></a>
|
||||
<div>
|
||||
{% from 'macro.html' import article_info with context %}
|
||||
{{ article_info(article) }}
|
||||
{% if article.summary %}
|
||||
{{- article.summary -}}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<a href="{{ article_url }}" title="permalink / read more">mehr...</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock content %}
|
||||
|
||||
{% block pagefooter %}
|
||||
{% from 'macro.html' import pagination with context %}
|
||||
{{ pagination() }}
|
||||
{% endblock %}
|
||||
219
themes/fsmi-theme/templates/macro.html
Normal file
219
themes/fsmi-theme/templates/macro.html
Normal file
@@ -0,0 +1,219 @@
|
||||
{% macro genurl(string, force=False) %}
|
||||
{% if (force or
|
||||
( string.startswith('/') and not string.startswith('//') )) %}
|
||||
{% set url = '/'.join([SITEURL.rstrip('/'),string.lstrip('/')]) %}
|
||||
{{- url -}}
|
||||
{% else %}
|
||||
{% set url = '/'.join([SITEURL, string]) %}
|
||||
{{- url -}}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro newtab(string, force=False) %}
|
||||
{% if ( string.startswith('http://') or
|
||||
string.startswith('https://')) %}
|
||||
target="_blank"
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro article_panel_list(parent='', id='', title_left='', title_right='', entry_list=[], show_date=False, title_left_link='') %}
|
||||
{% if not title_left_link %}
|
||||
{% set title_left_link = "#%s" % id %}
|
||||
{% endif %}
|
||||
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading panel-title">
|
||||
<a id="{{ id }}" href="{{ genurl( title_left_link ) }}">
|
||||
{{- title_left -}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="panel-body hidden"></div>
|
||||
|
||||
<ul class="list-group">
|
||||
<div class="panel-collapse collapse in" id="{{ id }}collapse">
|
||||
{% for article in entry_list %}
|
||||
<a href="{{ genurl( article.url, force=True ) }}">
|
||||
<li class="list-group-item">
|
||||
{% if show_date %}
|
||||
{{- article.date|strftime("%m-%d") -}}
|
||||
<b> · </b>
|
||||
{% endif %}
|
||||
{{- article.title -}}
|
||||
</li>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro pagetitle(name) %}
|
||||
{% if name and name != '' %}
|
||||
<title>{{ name }} · {{ SITENAME }}</title>
|
||||
{% else %}
|
||||
<title>{{ SITENAME }}</title>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro pageheader(name, link) %}
|
||||
{% if name and name != '' %}
|
||||
<div class="page-header">
|
||||
{% if link %}
|
||||
<h1><a href="{{ genurl( link ) }}">{{ name }}</a></h1>
|
||||
{% else %}
|
||||
<h1>{{ name }}</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro navbar(link) %}
|
||||
|
||||
<nav id="navbar" role="navigation">
|
||||
<div class="navbar-header">
|
||||
<div class="navbar-img">
|
||||
<a class="navbar-brand" href="{{ genurl('' ) }}">
|
||||
<img src="{{ SITEURL }}/images/logo.png" alt="{{ SITENAME }}" id="logo" />
|
||||
</a>
|
||||
</div>
|
||||
{%if SHOW_PAGE_TITLE %}
|
||||
<div class="navbar-text">
|
||||
<h1 id="page-title">
|
||||
<a href="{{ genurl( SITEURL ) }}">
|
||||
{{ SITENAME }}
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<input type="checkbox" id="menu-toggle" name="menu-toggle" checked="false"/>
|
||||
<label for="menu-toggle">hide/show menu</label>
|
||||
|
||||
<ul id="menuitem-list">
|
||||
{% for p in PAGES %}
|
||||
{% if p.url is string %}
|
||||
{% if p.title != 'Search' %}
|
||||
<li class="dropdown">
|
||||
<a class="menulink head {% if p.url == page %}active{% endif %}" href="{{ genurl( p.url ) }}" {{ newtab(p.url) }}>{{ p.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% elif p.url is iterable %}
|
||||
<li class="dropdown">
|
||||
<!-- FIXME Selecting a submenu link does not set the head link active, need a custom jinja test for that //-->
|
||||
<a href="#" class="dropdown-toggle menulink head {% if p.url == page %}active{% endif %}" data-toggle="dropdown">
|
||||
{{- title }}
|
||||
</a>
|
||||
<ul class="dropdown-content" role="menu">
|
||||
{% for title,item_url in url %}
|
||||
<li>
|
||||
<a class="menulink" href="{{ genurl( item_url ) }}" {{ newtab(item_url) }}>
|
||||
{{ title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro footer() %}
|
||||
<nav id="footer" class="navbar navbar-default">
|
||||
<div class="container">
|
||||
<p id="footer-text" class="text-center">
|
||||
Built with Pelican
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro pagination() %}
|
||||
{% if DEFAULT_PAGINATION %}
|
||||
<ul class="pagination">
|
||||
|
||||
{% if articles_page.has_previous() %}
|
||||
<li>
|
||||
{% if articles_page.previous_page_number() == 1 %}
|
||||
<a href="{{ genurl( page_name + '.html', force=True ) }}">«</a>
|
||||
{% else %}
|
||||
<a href="{{ genurl( page_name + articles_page.previous_page_number()|string + '.html' ) }}">«</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="disabled">
|
||||
<a>«</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for num in articles_paginator.page_range %}
|
||||
{% if articles_page.number != num %}
|
||||
<li>
|
||||
{% if num == 1 %}
|
||||
{% set page_link = page_name+'.html' %}
|
||||
{% else %}
|
||||
{% set page_link = page_name+num|string+'.html' %}
|
||||
{% endif %}
|
||||
<a href="{{ genurl( page_link, force=True ) }}">
|
||||
{{- num }}<span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="active">
|
||||
<a>{{- num }}<span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if articles_page.has_next() %}
|
||||
<li>
|
||||
<a href="{{ genurl( page_name + articles_page.next_page_number()|string + '.html' ) }}">»</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="disabled">
|
||||
<a>»</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro article_info(article) %}
|
||||
<span class="article_info">
|
||||
{% if article.tags %}
|
||||
<b> · </b>
|
||||
{% for tag in article.tags %}
|
||||
<a class="label label-primary"
|
||||
href="{{ genurl( '/tag/' + tag|string + '.html' ) }}">
|
||||
{{- tag -}}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<!--<span class="glyphicon glyphicon-calendar"></span>-->
|
||||
{% if article.locale_date %}
|
||||
{% set year = article.date|strftime('%Y') %}
|
||||
{% set month = article.date|strftime('%m') %}
|
||||
{% set day = article.date|strftime('%d') %}
|
||||
<a href="{{ genurl( '/archives.html#Year' + year ) }}">{{ year }}</a>
|
||||
{{- '-' -}}
|
||||
<a href="{{ genurl( '/archives.html#Year' + year + 'Month' + month ) }}">{{ month }}</a>
|
||||
{{- '-' -}}
|
||||
<a href="{{ genurl( '/archives.html#Year' + year + 'Month' + month ) }}">{{ day }}</a>
|
||||
|
||||
{% endif %}
|
||||
<!--<span class="glyphicon glyphicon-user"></span>-->
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro taglist(list,prefix='',suffix='') %}
|
||||
{% for tag, articles in list|sort %}
|
||||
<a class="label label-primary"
|
||||
href="{{prefix}}{{tag}}{{suffix}}">
|
||||
{{- tag }} {{ articles|count }}</a>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
14
themes/fsmi-theme/templates/page.html
Normal file
14
themes/fsmi-theme/templates/page.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% set name = page.title %}
|
||||
{% set link = page.url %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="page-content">
|
||||
<div class="header">
|
||||
{{ page.title }}
|
||||
</div>
|
||||
<div class="content wall-of-text">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
13
themes/fsmi-theme/templates/tag.html
Normal file
13
themes/fsmi-theme/templates/tag.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% set name = ["Tag: ",tag]|join %}
|
||||
{% set link = ["tag/",tag,".html"]|join %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% from 'macro.html' import article_panel_list with context %}
|
||||
{% set parent = '' %}
|
||||
{% set id = tag %}
|
||||
{% set title_left = tag %}
|
||||
{% set title_right = articles|count %}
|
||||
{% set entry_list = articles %}
|
||||
{{ article_panel_list(parent,id,title_left,title_right,entry_list) }}
|
||||
{% endblock %}
|
||||
12
themes/fsmi-theme/templates/taglist.html
Normal file
12
themes/fsmi-theme/templates/taglist.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% set name = 'Tag List' %}
|
||||
{% set link = 'taglist.html' %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if tags %}
|
||||
|
||||
{% from 'macro.html' import taglist %}
|
||||
{{ taglist('tag',tags) }}
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
35
themes/fsmi-theme/templates/tags.html
Normal file
35
themes/fsmi-theme/templates/tags.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% set name = "Tags" %}
|
||||
{% set link = "tags.html" %}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if tags %}
|
||||
<p>
|
||||
{% from "macro.html" import taglist %}
|
||||
{{ taglist(tags, "#", "") }}
|
||||
</p>
|
||||
|
||||
<div class="panel-group" id="accordion">
|
||||
{% for tag, articles in tags|sort %}
|
||||
|
||||
{% from "macro.html" import article_panel_list with context %}
|
||||
{% set parent = "accordion" %}
|
||||
{% set id = tag %}
|
||||
{% set title_left = tag %}
|
||||
{% set title_left_link = "/tag/%s.html" % (tag) %}
|
||||
{% set title_right = articles|count %}
|
||||
{% set entry_list = articles %}
|
||||
{{ article_panel_list(
|
||||
parent=parent,
|
||||
id=id,
|
||||
title_left=title_left,
|
||||
title_left_link=title_left_link,
|
||||
title_right=title_right,
|
||||
entry_list=entry_list,
|
||||
) }}
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
8
themes/fsmi-theme/templates/translations.html
Normal file
8
themes/fsmi-theme/templates/translations.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% macro translations_for(article) %}
|
||||
{% if article.translations %}
|
||||
Translations:
|
||||
{% for translation in article.translations %}
|
||||
<a href="{{ genurl( translation.url, force=True ) }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
3
themes/fsmi-theme/templates/twitter.html
Normal file
3
themes/fsmi-theme/templates/twitter.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% if TWITTER_USERNAME %}
|
||||
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user