init
This commit is contained in:
parent
ca8e39e641
commit
3b75097fed
45 changed files with 3567 additions and 0 deletions
14
web/nfc-theme/LICENSE
Normal file
14
web/nfc-theme/LICENSE
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Copyright (c) 2015 Michael Cardell Widerkrantz <mc@hack.org>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
16
web/nfc-theme/Makefile
Normal file
16
web/nfc-theme/Makefile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
VERSION=20150208
|
||||
DIST=mc-pelican-$(VERSION)
|
||||
DISTFILES=README.txt LICENSE Makefile static templates
|
||||
|
||||
$(DIST).tar.bz2:
|
||||
mkdir $(DIST)
|
||||
cp -r $(DISTFILES) $(DIST)/
|
||||
tar cf $(DIST).tar --exclude .git $(DIST)
|
||||
bzip2 -9 $(DIST).tar
|
||||
$(RM) -rf $(DIST)
|
||||
|
||||
dist: $(DIST).tar.bz2
|
||||
|
||||
clean:
|
||||
$(RM) -f $(DIST).tar.bz2
|
||||
|
||||
28
web/nfc-theme/README.txt
Normal file
28
web/nfc-theme/README.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
A minimalist theme for the Pelican static blog generator:
|
||||
|
||||
http://blog.getpelican.com/
|
||||
|
||||
It's based on the built-in simple theme with some small changes to the
|
||||
templates and some very minimalist CSS.
|
||||
|
||||
Install like this:
|
||||
|
||||
# pelican-themes -i mc-pelican
|
||||
|
||||
Then, in your pelicanconf.py:
|
||||
|
||||
THEME = 'mc-pelican'
|
||||
|
||||
You add menu items with MENUITEMS like this:
|
||||
|
||||
MENUITEMS = (
|
||||
('Homepage', '/mc/'),
|
||||
('About MC', '/mc/bio.html'),
|
||||
('Contact', '/mc/contact.html'),
|
||||
('Archives', '{0}/archives.html'.format(SITEURL)), )
|
||||
|
||||
If you want a blog description in the footer of all pages, define
|
||||
DESCRIPTION.
|
||||
|
||||
Happy blogging,
|
||||
MC.
|
||||
BIN
web/nfc-theme/static/DavidLibre-Regular.ttf
Normal file
BIN
web/nfc-theme/static/DavidLibre-Regular.ttf
Normal file
Binary file not shown.
10
web/nfc-theme/static/geo.js
Normal file
10
web/nfc-theme/static/geo.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
const ua = String(platform.os).toLowerCase();
|
||||
const android = ua.indexOf("android") > -1;
|
||||
const ios = ua.indexOf("ios") > -1;
|
||||
const windows = ua.indexOf("windows") > -1;
|
||||
const linux = ua.indexOf("linux") > -1;
|
||||
const mac = ua.indexOf("macos") > -1;
|
||||
var hashlink = document.querySelector(".geo a");
|
||||
if ( windows || mac || linux ) hashlink.href = "https://maps.google.com/?q=" + hashlink.getAttribute("latlon");
|
||||
else if ( android ) hashlink.href = "geo:0,0?q=" + hashlink.getAttribute("latlon");
|
||||
else if ( ios ) hashlink.href = "http://maps.apple.com/?ll=" + hashlink.getAttribute("latlon") + "&q=" + hashlink.innerHTML;
|
||||
144
web/nfc-theme/static/local.css
Normal file
144
web/nfc-theme/static/local.css
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
@font-face {
|
||||
font-family: 'David Libre';
|
||||
src: local('David Libre'), local('DavidLibre'),
|
||||
url('DavidLibre-Regular.ttf') format('ttf')
|
||||
}
|
||||
|
||||
/* CSS Reset */
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
/* HTML5 tag defaults. */
|
||||
header, footer, aside, nav, article
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
margin-block-start: 0;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'David Libre';
|
||||
padding: 1em;
|
||||
font-size: 1.4em;
|
||||
line-height: 1.2em;
|
||||
text-align: left;
|
||||
color: #090A0E;
|
||||
height: 100vh;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
margin: auto;
|
||||
max-width: 40em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
ul, ul li {
|
||||
margin:0;
|
||||
padding:0;
|
||||
list-style:none
|
||||
}
|
||||
|
||||
ul li::before {
|
||||
content: '*\00a0';
|
||||
}
|
||||
|
||||
/* Use a thin border around all images. */
|
||||
img
|
||||
{
|
||||
border: 1px solid;
|
||||
max-width: 40em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Navigation bar. */
|
||||
nav
|
||||
{
|
||||
padding-bottom: 1ex;
|
||||
margin-bottom: 4em;
|
||||
}
|
||||
|
||||
nav::after {
|
||||
clear:left;
|
||||
}
|
||||
|
||||
nav ul
|
||||
{
|
||||
padding: 0;
|
||||
margin-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
nav ul li
|
||||
{
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: .4em; /* How far between items. */
|
||||
margin-top: .3em;
|
||||
}
|
||||
|
||||
nav li::before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
nav ul li a
|
||||
{
|
||||
display: inline;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use a border around tables, but don't draw lines around individual
|
||||
* cells.
|
||||
*/
|
||||
table
|
||||
{
|
||||
border-style: solid;
|
||||
border-collapse: collapse;
|
||||
border-width: thin;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
th, td
|
||||
{
|
||||
border-style: solid;
|
||||
border-width: thin;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 1px solid #090A0E;
|
||||
}
|
||||
|
||||
/* for unvisited links: blue */
|
||||
a:link
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* for visited links: purple */
|
||||
a:visited
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* when mouse is over link or the link is active*/
|
||||
a:hover, a:active
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border: 1px solid;
|
||||
margin: 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
1260
web/nfc-theme/static/platform.js
Normal file
1260
web/nfc-theme/static/platform.js
Normal file
File diff suppressed because it is too large
Load diff
39
web/nfc-theme/templates/404.html
Normal file
39
web/nfc-theme/templates/404.html
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="english">
|
||||
<head>
|
||||
<title>404</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/theme/local.css" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
color: white;
|
||||
background-color: blue;
|
||||
display: table;
|
||||
height: 100vh;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
}
|
||||
a {
|
||||
color: blue
|
||||
}
|
||||
div {
|
||||
display: table-cell;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body id="index">
|
||||
<div id="404">
|
||||
<center><a>Windows</a></center>
|
||||
<p>An exception 404 has occurred. The page could not be found. It may be possible to continue normally.</p>
|
||||
<ul>
|
||||
<li>Press the backspace key to attempt to continue.</li>
|
||||
<li>Press CTRL+ALT+DEL to restart your computer. You will<br />
|
||||
lose any unsaved information in all applications.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
web/nfc-theme/templates/archives.html
Normal file
1
web/nfc-theme/templates/archives.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{% extends "base.html" %}
|
||||
13
web/nfc-theme/templates/article.html
Normal file
13
web/nfc-theme/templates/article.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
<div class="entry-content">
|
||||
{{ article.content }}
|
||||
{% if article.metadata.geohash %}
|
||||
<span class="geo"><a latlon="{{ article.metadata.latlon }}" href="geo:{{ article.metadata.latlon }}">{{ article.metadata.geohash }}</a></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
<script src="{{ SITEURL }}/theme/platform.js"></script>
|
||||
<script src="{{ SITEURL }}/theme/geo.js"></script>
|
||||
{% endblock %}
|
||||
1
web/nfc-theme/templates/author.html
Normal file
1
web/nfc-theme/templates/author.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{% extends "base.html" %}
|
||||
13
web/nfc-theme/templates/authors.html
Normal file
13
web/nfc-theme/templates/authors.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Authors{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Authors on {{ SITENAME }}</h1>
|
||||
|
||||
<ul>
|
||||
{%- for author, articles in authors|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
23
web/nfc-theme/templates/base.html
Normal file
23
web/nfc-theme/templates/base.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{ SITEURL }}/theme/local.css" rel="stylesheet">
|
||||
{% endblock head %}
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
{% if DESCRIPTION %}
|
||||
<footer id="contentinfo" class="body">
|
||||
<hr>
|
||||
{{ DESCRIPTION }}
|
||||
</footer>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
8
web/nfc-theme/templates/categories.html
Normal file
8
web/nfc-theme/templates/categories.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for category, articles in categories %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
5
web/nfc-theme/templates/category.html
Normal file
5
web/nfc-theme/templates/category.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% extends "index.html" %}
|
||||
{% block content_title %}
|
||||
<h2>{{ category }}</h2>
|
||||
{% endblock %}
|
||||
|
||||
14
web/nfc-theme/templates/gosquared.html
Normal file
14
web/nfc-theme/templates/gosquared.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{% if GOSQUARED_SITENAME %}
|
||||
<script type="text/javascript">
|
||||
var GoSquared={};
|
||||
GoSquared.acct = "{{ GOSQUARED_SITENAME }}";
|
||||
(function(w){
|
||||
function gs(){
|
||||
w._gstc_lt=+(new Date); var d=document;
|
||||
var g = d.createElement("script"); g.type = "text/javascript"; g.async = true; g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js";
|
||||
var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(g, s);
|
||||
}
|
||||
w.addEventListener?w.addEventListener("load",gs,false):w.attachEvent("onload",gs);
|
||||
})(window);
|
||||
</script>
|
||||
{% endif %}
|
||||
21
web/nfc-theme/templates/index.html
Normal file
21
web/nfc-theme/templates/index.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<section id="content">
|
||||
{% block content_title %}
|
||||
{% endblock %}
|
||||
|
||||
{% for article in articles_page.object_list %}
|
||||
|
||||
<article class="hentry">
|
||||
<header>
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
|
||||
</h2>
|
||||
<span class="entry-summary">{{ article.summary }}</span>
|
||||
</header>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
{% include 'pagination.html' %}
|
||||
</section><!-- /#content -->
|
||||
{% endblock content %}
|
||||
15
web/nfc-theme/templates/page.html
Normal file
15
web/nfc-theme/templates/page.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title }}{%endblock%}
|
||||
{% block content %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
|
||||
{{ page.content }}
|
||||
|
||||
{% if page.modified %}
|
||||
<p>
|
||||
Last updated: {{ page.locale_modified }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
11
web/nfc-theme/templates/pagination.html
Normal file
11
web/nfc-theme/templates/pagination.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% if DEFAULT_PAGINATION %}
|
||||
<p class="paginator">
|
||||
{% if articles_page.has_previous() %}
|
||||
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a>
|
||||
{% endif %}
|
||||
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
|
||||
{% if articles_page.has_next() %}
|
||||
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
11
web/nfc-theme/templates/period_archives.html
Normal file
11
web/nfc-theme/templates/period_archives.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1>Archives for {{ period | reverse | join(' ') }}</h1>
|
||||
|
||||
<dl>
|
||||
{% for article in dates %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
0
web/nfc-theme/templates/tag.html
Normal file
0
web/nfc-theme/templates/tag.html
Normal file
10
web/nfc-theme/templates/tags.html
Normal file
10
web/nfc-theme/templates/tags.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Tags{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Tags for {{ SITENAME }}</h1>
|
||||
{%- for tag, articles in tags|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
8
web/nfc-theme/templates/translations.html
Normal file
8
web/nfc-theme/templates/translations.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% macro translations_for(article) %}
|
||||
{% if article.translations %}
|
||||
{% for translation in article.translations %}
|
||||
<a class="translation" href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue