initial commit

This commit is contained in:
lubuwest 2023-03-16 21:40:13 +01:00
parent 96cb0b262f
commit 7d4e7046e9
52 changed files with 1147 additions and 3 deletions

View File

@ -1,3 +1,79 @@
# simplyOpen
Theme for static website generator pelican inspired by pelican-simplegrey, but without all the datadealer (Google, Twitter, Facebook) stuff.
## simplyOpen ##
## Screenshot ##
![screenshot](screenshot.png)
## Options ##
Theme inspired by the mkdocs default theme, without all the datadealer (Google, Twitter, Facebook) stuff. [Federation Widget](https://github.com/LubuWest/federation-widget) in sidebar (works currently only with Friendica). Social links to Mastodon, Matrix, Friendica, Diaspora, Misskey,...
EMail and License is displayed in the footer.
Javascript only used for Federation Widget.
Configuration in pelicanconf.py:
```
EMAIL='x@y.com'
SOCIAL = (('Diaspora', 'https://diasp.eu/...'),
('Friendica', 'https://friendica.eu/profile/...'),
('Forgejo', 'https://codeberg.org...'),
('Funkwhale', 'https://abc.de/...'),
('Gitea', 'https://abc.de/...'),
('Github', 'https://github.com/...'),
('Gitlab', 'https://gitlab.com/...'),
('Gnusocial', 'https://www.gnusocial.no/...'),
('Hubzilla', 'https://abc.de/...'),
('Mastodon', 'https://mastodon.social/...'),
('Matrix', 'https://mastodon.social/...'),
('Misskey', 'https://misskey.com/...'),
('Movim', 'https://pod.movim.eu/?q=...'),
('Peertube', 'https://peertube.com/'),
('Pixelfed', 'https://pixelfed.com/...'),
('Pleroma', 'https://pleroma.com/...'),
('Pixelfed', 'https://pixelfed.com/...'),
('Plume', 'http://plume.come/'),
('Pixelfed', 'https://pixelfed.com/...'),
('Pump.io', 'https://pump.io/...'),
('RedMatrix', 'https://red.com/...'),
('XMPP', 'abc@jabber.de'))
# License (choose one)
LICENSE = 'CC-BY-SA', 'CC-BY', 'CC-BY-NC', 'CC-BY-NC-SA', 'ALL RIGHTS RESERVED'
FEDERATION_TIMELINE = (('domain','https://loma.ml'), # CORS headers must be set at the Friendica server, add the following to .htaccess
# Header add Access-Control-Allow-Origin "https://myblog.com"
# Header add Access-Control-Allow-Methods: "GET"
('user','startrek'),
('max','5'),
('type','user'), # could be 'group' to follow a group
('servertype','friendica'),) # could be 'diaspora', 'friendica' or 'hubzilla'
```
## Project documentation ##
For displaying project Markdown files as website similar to mkdocs, additional parameters should be set:
```
CATEGORIES_ON_SIDEBAR = 'left' # 'right' or 'none'
# If 'left', directory names are used as menu button. If files are not in subdirectories, filenames are used
FILENAME_METADATA = '(?P<title>.*)' # to retrieve the title from filename, if there is no Title field in te Markdown file
DEFAULT_DATE = 'fs' # to retrieve the date from file savedate of file, if there is no Date field in te Markdown file
# last saved file will be used as the start page of the website
STATIC_PATHS = ['Screenshots'] # place of image files should be set
SITEDESCRIPTION = 'Lorem ipsum dolor sit ..' # Additional text shown on the start page
DISPLAY_PAGES_ON_MENU = True # Markdown files in the 'pages' directory are shown as links in the header
```
## Credits ##
* Icons copyright by their respective owners
## License ##
In line with Federation Widget (https://github.com/LubuWest/federation-widget) this template is under the [WTF Public License](http://sam.zoy.org/wtfpl/COPYING).

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

484
static/css/main.css Normal file
View File

@ -0,0 +1,484 @@
/*
Colors :
- #40403F
- #4D4D4C
- #7F7F7E
- #E5E5E3
- #F0F0F0
*/
/* Imports */
@import url("pygment.css");
/* Layout */
article,
figcaption,
figure,
footer,
header,
nav,
section{
display: block;
}
html {
font-size: 100%;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
font-family: 'Verdana', sans-serif;
font-size: 16px;
line-height: 150%;
text-align: left;
padding: 0;
margin: 0;
}
header {
margin:0
}
[role=banner]{
background-image: linear-gradient(#54b4eb, #2FA4E7 60%, #1d9ce5);
height: auto; /*50px;*/
line-height: 50px;
padding: 0 1%;
position: fixed;
width: 100%;
margin: 0;
}
.wrapper {
margin-top: 0;
padding: 50px 0 0 0;
display:flex;
flex-flow: row wrap;
width: 100%;
}
.content {
border-left: 1px solid #d6d6d6;
border-right: 1px dotted #D6D6D6;
padding: 0 20px 1em 20px;
width: calc(70% - 50px - 10em);
overflow: auto;
}
.sidebar {
width: 30%;
border-right: 1px solid #d6d6d6;
padding: 0 10px 1em 0;
}
.left-sidebar {
min-width: 8em;
width: 8em;
border-right: 1px solid #d6d6d6;
padding: 0 10px 1em 10px;
height: inherit;
overflow: auto;
}
.left-sidebar nav {
position:fixed;
}
.left-sidebar ul {
list-style-type: none;
padding:0;
}
.left-sidebar li a{
display: block;
text-decoration: none;
}
.left-sidebar li a.active{
background-color: #4CAF50;
color: white;
}
.left-sidebar li a.:hover:not(.active){
background-color: #555;
color: white;
}
footer {
border-top: 1px dotted #D6D6D6;
line-height: 80%;
padding: 0 1em;
font-size: 0.8em;
}
/* Header */
header a {
color: #E5E5E3;
border-bottom: none;
}
header a.title {
font-size: 2em;
}
header .feeds {
float: right;
text-align: right;
width: 25%;
height: 41px;
padding-top: 9px;
padding-right: 9px;
}
header .feeds a {
display: block;
float: right;
padding-right: 5px;
width: 40px;
}
header .feeds a:hover,
header .feeds a:active {
border-bottom: none;
}
header .pages {
float: right;
}
header .pages a {
font-size: 1.1em;
}
/* Sidebar */
/* Titles */
h1, h2, h3, h4, h5, h6 {
font-family: "Verdana",sans-serif;
font-weight: 400;
text-shadow: 0.1em 0.1em 0.1em #EFEFEF;
line-height: 125%;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
padding: 0.7em 0 0.3em;
}
h1 a {
color: inherit;
border-bottom: none;
}
/* Texts */
p {
margin: 0.8em 0 0.5em;
}
a {
text-decoration: none;
border-bottom: 1px dotted #4D4D4C;
color: #4D4D4C;
}
a:hover, a:active {
text-decoration: none;
border-bottom: 1px dotted #4271AE;
color: #4271AE;
}
.literal {
font-size: 0.9em;
border: 1px solid #F0F0F0;
padding: 0px 5px;
}
pre {
font-family: 'Verdana',monospace;
background: none repeat scroll 0 0 #F0F0F0;
border-radius: 2px;
font-size: 0.9em;
font-style: normal;
letter-spacing: 0.015em;
line-height: 130%;
padding: 0.7em;
white-space: pre-wrap;
word-wrap: break-word;
}
hr {
margin: 40px 5% 60px 5%;
color: #d6d6d6;
box-shadow: 0.1em 0.1em 0.1em #EFEFEF;
border-radius: 5px;
}
/* Article */
article.summary {
margin-bottom: 40px;
clear: both;
}
article.full .metadata,
article.summary .metadata {
font-style: italic;
}
.metadata p {
margin: 0;
}
*/
/* Listings */
ol.archive li {
margin: 8px 0;
}
ol.archive li time,
ol.archive li .tags
{
line-height: 140%;
font-size: 0.8em;
margin: 0;
}
/* Social */
.social {
list-style-type: none;
padding-left: 0px;
}
.social li {
clear: both;
}
.social a {}
.social i {
float: left;
margin-right: 3px;
padding-top: 4px;
}
.social a[id*='Buddycloud'] + i:before {content: url('../images/icons/buddycloud-18px.png'); }
.social a[id*='Diaspora'] + i:before {content: url('../images/icons/Diaspora-18px.png'); }
.social a[id*='Friendica'] + i:before {content: url('../images/icons/friendica-18px.png'); }
.social a[id*='Forgejo'] + i:before {content: url('../images/icons/forgejo-18px.png'); }
.social a[id*='Funkwhale'] + i:before {content: url('../images/icons/funkwhale-16.png'); }
.social a[id*='Gitea'] + i:before {content: url('../images/icons/gitea-18px.png'); }
.social a[id*='Github'] + i:before {content: url('../images/icons/github-18px.png'); }
.social a[id*='Gitlab'] + i:before {content: url('../images/icons/gitlab-18px.png'); }
.social a[id*='Gnusocial'] + i:before {content: url('../images/icons/gnusocial-18px.png'); }
.social a[id*='Hubzilla'] + i:before {content: url('../images/icons/hubzilla-16.png'); }
.social a[id*='Mastodon'] + i:before {content: url('../images/icons/mastodon-18px.png'); }
.social a[id*='Matrix'] + i:before {content: url('../images/icons/matrix-16.png'); }
.social a[id*='Misskey'] + i:before {content: url('../images/icons/misskey-18px.png'); }
.social a[id*='Movim'] + i:before {content: url('../images/icons/movim-18px.png'); }
.social a[id*='Peertube'] + i:before {content: url('../images/icons/peertube-18px.png'); }
.social a[id*='Pixelfed'] + i:before {content: url('../images/icons/pixelfed-18px.png'); }
.social a[id*='Pleroma'] + i:before {content: url('../images/icons/pleroma-18px.png'); }
.social a[id*='Plume'] + i:before {content: url('../images/icons/plume-16.png'); }
.social a[id*='Pump.io'] + i:before {content: url('../images/icons/pumpio-18px.png'); }
.social a[id*='RedMatrix'] + i:before {content: url('../images/icons/redmatrix-18px.png'); }
.social a[id*='XMPP'] + i:before {content: url('../images/icons/xmpp-18px.png'); }
.social a[href*='rss.xml']:before {content: url('../images/icons/feed-18px.png'); }
.social a[href*='atom.xml']:before {content: url('../images/icons/feed-18px.png'); }
/* Tag cloud */
ul.tagcloud {
list-style: none;
padding: 0;
width: 90%;
margin: 0 auto;
line-height: 200%;
}
ul.tagcloud li {
display: inline-block;
}
li.tag-1 { font-size: 100%; margin: 0 1em; }
li.tag-2 { font-size: 80%; margin: 0 1em; }
li.tag-3 { font-size: 70%; margin: 0 1em; }
li.tag-4 { font-size: 60%; margin: 0 1em; }
/* Pagination */
.pagination {
width: 100px;
margin: 1em auto;
}
/* Federation Social Widget */
#federation_widget {
font-size: 0.7em;
margin-top: 20px;
height: 350px;
width: 230px;
padding: 0;
border-radius: 5px;
background-color: #FcFcFc;
overflow-y: auto;
}
#federation_widget header {
padding-bottom: 8px;
text-align: left;
font-size: 1.5em;
border-bottom: 3px solid #EEEEEE;
background-color: #FcFcFc;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
#federation_widget header a {
text-decoration: none;
color:black
}
#federation_widget header img {
margin: 5px;
background-color: #ffffff;
border-radius: 5px;
float: left;
max-width: 50px;
}
#federation_widget header p {
margin: 0px;
line-height: 60px;
}
#federation_widget article {
display: block;
margin-bottom: 5px;
padding: 5px;
border-bottom: thin solid #eeeeee;
overflow: hidden; /* For too long link: hide but enable click on it */
}
#federation_widget article img {
margin: 5px;
max-width: 230px;
}
#federation_widget article p {
margin-top: 0px;
}
.groupmember img {
border-radius: 5px;
}
.tooltip {position: relative;}
.tooltip span {display: none;}
.tooltip:hover span {
display: block;
position: absolute;
left: 0; top: 10%;
margin: 20px 0 0;
width: 200px;
font-size: 0.7em;
color: #4D4D4C;
border: thin solid #eeeeee;
padding: 4px;
background: white;
}
/* Friendica Comments */
#comments {
border-top: thin solid #eeeeee;
padding-top: 15px;
display: table;
margin-left: 60px;
width: calc(100% - 60px);
}
.comment-container {
display: table-cell;
float: right;
min-width: 100%;
padding: 5px;
border-bottom: thin solid #eeeeee;
}
.contact-photo {
float: left;
width: 60px;
height: 60px;
margin-left: 16px;
margin-right: 16px;
}
.wall-item-actions-author {
height: 10px;
font-size: 70%;
}
.wall-item-content {
margin-top: 10px;
font-size: 90%;
text-align: left;
}
/* Responsive */
@media (max-width: 900px) {
body {
min-width: 300px;
max-width: 600px;
}
.container {
border-right: none;
}
.wrapper {
padding: 100px 20px 20px 20px;
float: none;
width: 90%;
}
.wrapper .sidebar,
.wrapper .left-sidebar,
.wrapper .content {
display: block;
position: static;
padding: 0px 5px 1em;
border-left: none;
border-right: none;
width: 100%;
height: auto;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.left-sidebar nav {
position: static;
}
ul.tagcloud {
margin: 0;
}
}

205
static/css/pygment.css Normal file
View File

@ -0,0 +1,205 @@
.hll {
background-color:#FFFFCC;
}
.c {
color:#408090;
font-style:italic;
}
.err {
border:1px solid #FF0000;
}
.k {
color:#007020;
font-weight:bold;
}
.o {
color:#666666;
}
.cm {
color:#408090;
font-style:italic;
}
.cp {
color:#007020;
}
.c1 {
color:#408090;
font-style:italic;
}
.cs {
background-color:#FFF0F0;
color:#408090;
}
.gd {
color:#A00000;
}
.ge {
font-style:italic;
}
.gr {
color:#FF0000;
}
.gh {
color:#000080;
font-weight:bold;
}
.gi {
color:#00A000;
}
.go {
color:#303030;
}
.gp {
color:#C65D09;
font-weight:bold;
}
.gs {
font-weight:bold;
}
.gu {
color:#800080;
font-weight:bold;
}
.gt {
color:#0040D0;
}
.kc {
color:#007020;
font-weight:bold;
}
.kd {
color:#007020;
font-weight:bold;
}
.kn {
color:#007020;
font-weight:bold;
}
.kp {
color:#007020;
}
.kr {
color:#007020;
font-weight:bold;
}
.kt {
color:#902000;
}
.m {
color:#208050;
}
.s {
color:#4070A0;
}
.na {
color:#4070A0;
}
.nb {
color:#007020;
}
.nc {
color:#0E84B5;
font-weight:bold;
}
.no {
color:#60ADD5;
}
.nd {
color:#555555;
font-weight:bold;
}
.ni {
color:#D55537;
font-weight:bold;
}
.ne {
color:#007020;
}
.nf {
color:#06287E;
}
.nl {
color:#002070;
font-weight:bold;
}
.nn {
color:#0E84B5;
font-weight:bold;
}
.nt {
color:#062873;
font-weight:bold;
}
.nv {
color:#BB60D5;
}
.ow {
color:#007020;
font-weight:bold;
}
.w {
color:#BBBBBB;
}
.mf {
color:#208050;
}
.mh {
color:#208050;
}
.mi {
color:#208050;
}
.mo {
color:#208050;
}
.sb {
color:#4070A0;
}
.sc {
color:#4070A0;
}
.sd {
color:#4070A0;
font-style:italic;
}
.s2 {
color:#4070A0;
}
.se {
color:#4070A0;
font-weight:bold;
}
.sh {
color:#4070A0;
}
.si {
color:#70A0D0;
font-style:italic;
}
.sx {
color:#C65D09;
}
.sr {
color:#235388;
}
.s1 {
color:#4070A0;
}
.ss {
color:#517918;
}
.bp {
color:#007020;
}
.vc {
color:#BB60D5;
}
.vg {
color:#BB60D5;
}
.vi {
color:#BB60D5;
}
.il {
color:#208050;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1 @@
function getAtom(){window.XMLHttpRequest?xmlhttp=new XMLHttpRequest:xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"),xmlhttp.open("GET",url,!0),xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState===XMLHttpRequest.DONE)try{(xmlhttp.status=200)&&updateWidget(xmlhttp.responseXML)}catch(t){}},xmlhttp.send()}function updateWidget(t){"hubzilla"==servertype?userinfo=t.getElementsByTagNameNS("http://purl.org/zot","owner")[0]:userinfo=t.getElementsByTagName("author")[0];try{if("hubzilla"==servertype)for(var e=userinfo.getElementsByTagName("link"),a=0;a<e.length;a++)"avatar"==e[a].getAttribute("rel")&&(img=e[a].getAttribute("href"));else img=t.getElementsByTagName("logo")[0].firstChild.data}catch(t){img=""}try{profile=userinfo.getElementsByTagName("uri")[0].firstChild.data}catch(t){profile=""}try{displayname=userinfo.getElementsByTagName("name")[0].firstChild.data}catch(t){displayname=""}content='<div id="federation_widget"><header>',""!=img&&(content+='<a target= "_blank" href="'+profile+'"><img src="'+img+'" title="Avatar"/></a>'),content+=' <p><a target= "_blank" href="'+profile+'">'+displayname+"</a></p></header>";for(var r=t.getElementsByTagName("entry"),n=max-1,l=0;l<r.length;l++){try{var i="",s="",o="",m="";if("group"==type){s=r[l].getElementsByTagName("author")[0].getElementsByTagNameNS("http://portablecontacts.net/spec/1.0","displayName")[0].firstChild.data;var g=r[l].getElementsByTagName("link");for(a=0;a<g.length;a++)if("avatar"==g[a].getAttribute("rel"))o=g[a].getAttribute("href");i='<span class="groupmember"><a class="tooltip" target= "_blank" href="'+(m=r[l].getElementsByTagName("uri")[0].firstChild.data)+'"><img style="max-width:50px;" alt="Profile" align="left" src="'+o+'" />'+s+" <span>"+m+"</span> </a> </span>"}}catch(t){i="",o="",m=""}try{var p=r[l].getElementsByTagName("content")[0].firstChild.data}catch(t){p=""}try{var d="";d=new Date(r[l].getElementsByTagName("updated")[0].firstChild.data).toLocaleString(),d='<span class="tooltip">&#x231B;<span>'+posttime_label+" "+d+"</span> </span>"}catch(t){d=""}content+="<article>"+i+d+"<br />"+p+"</article>",n<r.length&&l==n&&(l=r.length)}content+="<footer></footer></div>",document.getElementById(tag).innerHTML=content}"diaspora"==servertype?url=domain+"/public/"+user+".atom":"mastodon"==servertype?url=domain+"/@"+user+".atom":url=domain+"/feed/"+user,window.onload=getAtom;

View File

@ -0,0 +1,46 @@
var article = document.getElementsByTagName("article")[0].innerHTML;
var article_name= article.substring(article.indexOf('<p>')+3,article.indexOf('<p>')+33);
var search = friendica_domain + "/search?search=" + article_name.replace(/ /gi,'+');
var http, http2 = null;
var ergebnis = "";
http = new XMLHttpRequest();
if (http !== null) {
http.open("GET", search, true);
http.onreadystatechange = SearchFriendica;
http.send(null);
}
function SearchFriendica() {
if (http.readyState == 4 && http.status==200) {
var SearchResult= http.responseText;
var start = SearchResult.indexOf('wall-item-bottom');
var start2 = SearchResult.indexOf('a href=\'http',start);
var end = SearchResult.indexOf('id',start);
ergebnis = SearchResult.substring(start2+8,end-2);
}
http2 = new XMLHttpRequest();
if (http2 !== null) {
http2.open("GET", ergebnis, true);
http2.onreadystatechange = SearchComments;
http2.send(null);
}
function SearchComments() {
if (http.readyState == 4 && http.status == 200) {
var CommentsResult = http2.responseText;
var ergebnisse = ("<div class='comment'> <a href='" + ergebnis +"'> Comments</a> powered by Friendica</div>" );
var arr = new Array();
arr = CommentsResult.split("wall-item-container comment");
for (i=1;i<arr.length;i++){
var photo = arr[i].substring(arr[i].indexOf('<a href'),arr[i].indexOf('</a>')+4);
var start = arr[i].indexOf('<div class=\"wall-item-actions-author\">');
var end = arr[i].indexOf('<div class=\"wall-item-bottom\">',start);
var comment = arr[i].substring(start,end-1);
ergebnisse = ergebnisse + '<div class=\"comment-container\">' + photo + comment + '</div>';
}
document.getElementById("comments").innerHTML = ergebnisse;
}
}
}

18
templates/article.html Normal file
View File

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block title %}{{ article.title }} - {{ SITENAME }}{% endblock %}
{% block extra_meta %}
<meta name="description" content="{{ article.summary|striptags }}">
{% endblock %}
{% block content %}
<article class="full">
<h1>{{ article.title }}</h1>
{% include 'metadata.inc.html' %}
{{ article.content }}
</article>
{% if FRIENDICA_COMMENTS %}
<div id="comments">
</div>
<script type="text/javascript" src=./theme/js/friendica_comments.js></script>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,4 @@
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a>
<time datetime="{{ article.date.isoformat() }}" pubdate>{{ article.locale_date }}</time>
{% if article.tags %}<p class="tags">tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }} </a>{% endfor %}</p>{% endif %}
</a>

View File

@ -0,0 +1,9 @@
<article class="summary">
<div>
<h2>
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a>
</h2>
{% include 'metadata.inc.html' %}
<p>{{ article.summary }}</p>
</div>
</article>

14
templates/author.html Normal file
View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}{{ author }} - {{ SITENAME }}{% endblock %}
{% block content %}
<h1>Posts published by: {{ author }}</h1>
{% for article in articles_page.object_list %}
{% include 'article_summary.inc.html' %}
{% endfor %}
{% include 'pagination.inc.html' %}
{% endblock %}

168
templates/base.html Normal file
View File

@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="{{ HTML_LANG }}">
<head>
<meta charset="utf-8"/>
<title>{% block title %}{{ SITENAME }}{%endblock%}</title>
<meta name="author" content="{{ AUTHOR }}">
{% block extra_meta %}
{% endblock %}
<link rel="top" href="#" />
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
{% block scripts %}
{% if FRIENDICA_COMMENTS %}
<script type="text/javascript">
var friendica_domain = "{{ FRIENDICA_COMMENTS }}"
</script>
{% endif %}
{% endblock %}
{% 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 %}
{% if FEDERATION_TIMELINE %}
<script type="text/javascript">
{% for variable, value in FEDERATION_TIMELINE %}
var {{ variable }} = '{{ value }}';
{% endfor %}
parseInt(max);
var tag = 'federation_timeline';
</script>
{% endif %}
</head>
<body>
{{ FEED_ATOM }}
<div class="container"><header role="banner">
<div class="feeds">
{% if FEED_ALL_ATOM %}
<a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/feed-32px.png" alt="atom feed"/></a>
{% endif %}
{% if FEED_ALL_RSS %}
<a href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/feed-32px.png" alt="rss feed"/></a>
{% endif %}
</div>
<a href="{{ SITEURL }}" class="title">{{ SITENAME }}</a>
{% if pages %}
<nav class="pages">
{% for p in pages %}
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}{% if not loop.last %} -{% endif %}</a>
{% endfor %}
</nav>
{% endif %}
</header>
<div class="wrapper">
{% if CATEGORIES_ON_SIDEBAR =='left' %}
<div role="main" class="left-sidebar">
<nav>
<h2>Categories</h2>
<ul>
{% for cat, null in categories %}
{% if cat != DEFAULT_CATEGORY %}
<li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% else %}
{% for article in articles %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
</nav>
</div>
{% endif %}
<div role="main" class="content">
{% block content %}{% endblock %}
</div>
<div class="sidebar">
{% if CATEGORIES_ON_SIDEBAR =='right' %}
<nav>
<h2>Categories</h2>
<ul>
{% for cat, null in categories %}
<li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
{% if DISPLAY_TAGS_ON_SIDEBAR %}
<h2>Tags</h2>
<ul class="tagcloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if FEDERATION_TIMELINE %}
<h2>News</h2>
<div id="federation_timeline">
<p>Enable Javascript to view Social timeline!</p>
</div>
<script type="text/javascript" src="{{ SITEURL }}/theme/js/federation_widget.js"></script>
{% endif %}
{% if SOCIAL %}
<aside>
<h2>Social Networks</h2>
<ul class="social">
{% for name, link in SOCIAL %}
<li><a href="{{ link }}" id="{{ name }}">{{ link }}</a><i></i></li>
{% endfor %}
</ul>
</aside>
{% endif %}
{% if LINKS %}
<aside>
<h2>Links</h2>
<ul>
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
</aside>
{% endif %}
</div>
</div>
<footer>
<p role="contentinfo">
{% if LICENSE=="CC-BY" %}
<a href="http://creativecommons.org/licenses/by/4.0/legalcode" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/licenses/cc-by-88x31.png" alt="CC-BY"/></a>
{% endif %}
{% if LICENSE=="CC-BY-NC" %}
<a href="http://creativecommons.org/licenses/by-nc/4.0/legalcode" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/licenses/cc-by-nc-88x31.png" alt="CC-BY-NC"/></a>
{% endif %}
{% if LICENSE=="CC-BY-SA" %}
<a href="http://creativecommons.org/licenses/by-sa/4.0/legalcode" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/licenses/cc-by-sa-88x31.png" alt="CC-BY-SA"/></a>
{% endif %}
{% if LICENSE=="CC-BY-NC-SA" %}
<a href="http://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/licenses/cc-by-nc-sa-88x31.png" alt="CC-BY-NC-SA"/></a>
{% endif %}
{% if LICENSE=="ALL-RIGHTS-RESERVED" %}
All rights reserved.
{% endif %}
</p>
<p role="contentinfo">
{{ AUTHOR }} -
{% if EMAIL %}
E-Mail: {{ EMAIL }}
{% endif %}
</p>
<p role="contentinfo">
Proudly powered by <a href="https://getpelican.com/">pelican</a>.
</p>
</footer>
</div>
</body>
</html>

14
templates/category.html Normal file
View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}{{ category }} - {{ SITENAME }}{% endblock %}
{% block content %}
<h1>Category: {{ category }}</h1>
{% for article in articles_page.object_list %}
{% include 'article_summary.inc.html' %}
{% endfor %}
{% include 'pagination.inc.html' %}
{% endblock %}

38
templates/index.html Normal file
View File

@ -0,0 +1,38 @@
{% extends "base.html" %}
{% block content_title %}{% endblock %}
{℅ block meta_other %}
<meta name="robots" content="noindex" />
{℅ endblock %}
{% if SITEDESCRIPTION %}
<p style="font-size: 1.25em">{{ SITEDESCRIPTION }}</h3>
{% endif %}
{% block content %}
{% for article in articles %}
{% if loop.index == 1 %}
<article>
<h1><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
{{ article.content }}
</article>
<hr />
{% if loop.length > 1 %}
<div>
<h3>Last posts</h3>
<ol class="archive">
{% endif %}
{% elif loop.index < 7 %}
<li>
{% include 'article_link.inc.html' %}
</li>
{% endif %}
{% endfor %}
{% if articles|length > 1 %}
</ol>
</div>
{% endif %}
{% endblock content %}

View File

@ -0,0 +1,15 @@
{% if not CATEGORIES_ON_SIDEBAR =='left' %}
<p class="metadata">
<!--<time datetime="{{ article.date.isoformat() }}" pubdate>-->
{{ article.locale_date }}
<!--</time>-->
{% if article.author %}
<!--<address class="vcard author">-->
by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
<!--</address>-->
{% endif %}
in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
{% if article.tags %}<p class="tags">tagged {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last%}, {% endif %}{% endfor %}</p>{% endif %}
{% if PDF_PROCESSOR %}<p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">Download the .pdf</a></p>{% endif %}
</p>
{% endif %}

9
templates/page.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block title %}{{ page.title }}- {{ SITENAME }}{% endblock %}
{% block content %}
<h1>{{ page.title }}</h1>
{{ page.content }}
{% endblock %}

View File

@ -0,0 +1,15 @@
{% if DEFAULT_PAGINATION %}
<div class="pagination">
{% if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %}
<a href="{{ SITEURL }}/{{ page_name }}.html">&laquo;</a>
{% else %}
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">&laquo;</a>
{% endif %}
{% endif %}
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&raquo;</a>
{% endif %}
</div>
{% endif %}

14
templates/tag.html Normal file
View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}{{ tag }} - {{ SITENAME }}{% endblock %}
{% block content %}
<h1>Post tagged: {{ tag }}</h1>
{% for article in articles_page.object_list %}
{% include 'article_summary.inc.html' %}
{% endfor %}
{% include 'pagination.inc.html' %}
{% endblock %}

14
templates/tags.html Normal file
View File

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block title %}{{ SITENAME }}{% endblock %}
{% block content %}
<h1>Tags</h1>
<ul class="tagcloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
{% endblock %}