From 0290aee70d071b3d5db2ce14635842043763acb5 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 1 May 2016 23:53:51 -0400 Subject: create a basic theme (from bnewnet style) --- theme/templates/404.html | 3 ++ theme/templates/500.html | 3 ++ theme/templates/archives.html | 11 +++++ theme/templates/article.html | 48 ++++++++++++++++++ theme/templates/author.html | 7 +++ theme/templates/authors.html | 13 +++++ theme/templates/base.html | 91 ++++++++++++++++++++++++++++++++++ theme/templates/categories.html | 8 +++ theme/templates/category.html | 5 ++ theme/templates/index.html | 94 ++++++++++++++++++++++++++++++++++++ theme/templates/page.html | 15 ++++++ theme/templates/pagination.html | 11 +++++ theme/templates/period_archives.html | 11 +++++ theme/templates/simple_base.html | 63 ++++++++++++++++++++++++ theme/templates/simple_index.html | 28 +++++++++++ theme/templates/tag.html | 0 theme/templates/tags.html | 10 ++++ theme/templates/translations.html | 9 ++++ 18 files changed, 430 insertions(+) create mode 100644 theme/templates/404.html create mode 100644 theme/templates/500.html create mode 100644 theme/templates/archives.html create mode 100644 theme/templates/article.html create mode 100644 theme/templates/author.html create mode 100644 theme/templates/authors.html create mode 100644 theme/templates/base.html create mode 100644 theme/templates/categories.html create mode 100644 theme/templates/category.html create mode 100644 theme/templates/index.html create mode 100644 theme/templates/page.html create mode 100644 theme/templates/pagination.html create mode 100644 theme/templates/period_archives.html create mode 100644 theme/templates/simple_base.html create mode 100644 theme/templates/simple_index.html create mode 100644 theme/templates/tag.html create mode 100644 theme/templates/tags.html create mode 100644 theme/templates/translations.html (limited to 'theme') diff --git a/theme/templates/404.html b/theme/templates/404.html new file mode 100644 index 0000000..e1f116e --- /dev/null +++ b/theme/templates/404.html @@ -0,0 +1,3 @@ +{% extends "base.html"%} +{% block title %}For oh four{% endblock %} +{% block content %}Whoopsie!{% endblock %} diff --git a/theme/templates/500.html b/theme/templates/500.html new file mode 100644 index 0000000..78786b7 --- /dev/null +++ b/theme/templates/500.html @@ -0,0 +1,3 @@ +{% extends "base.html"%} +{% block title %}Server Error{% endblock %} +{% block content %}Sorry...{% endblock %} diff --git a/theme/templates/archives.html b/theme/templates/archives.html new file mode 100644 index 0000000..050f268 --- /dev/null +++ b/theme/templates/archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +

Archives for {{ SITENAME }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/theme/templates/article.html b/theme/templates/article.html new file mode 100644 index 0000000..d558183 --- /dev/null +++ b/theme/templates/article.html @@ -0,0 +1,48 @@ +{% extends "base.html" %} +{% block head %} + {{ super() }} + {% for keyword in article.keywords %} + + {% endfor %} + + {% for description in article.description %} + + {% endfor %} + + {% for tag in article.tags %} + + {% endfor %} + +{% endblock %} + +{% block content %} +
+
+

+ {{ article.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
+
+ + {{ article.locale_date }} + + {% if article.modified %} + + {{ article.locale_modified }} + + {% endif %} + {% if article.authors %} +
+ By {% for author in article.authors %} + {{ author }} + {% endfor %} +
+ {% endif %} +
+
+ {{ article.content }} +
+
+{% endblock %} diff --git a/theme/templates/author.html b/theme/templates/author.html new file mode 100644 index 0000000..e9f7870 --- /dev/null +++ b/theme/templates/author.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} +{% block content_title %} +

Articles by {{ author }}

+{% endblock %} + diff --git a/theme/templates/authors.html b/theme/templates/authors.html new file mode 100644 index 0000000..4914904 --- /dev/null +++ b/theme/templates/authors.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} +

Authors on {{ SITENAME }}

+ + +{% endblock %} diff --git a/theme/templates/base.html b/theme/templates/base.html new file mode 100644 index 0000000..5c9fb0e --- /dev/null +++ b/theme/templates/base.html @@ -0,0 +1,91 @@ + + + +{% block head %} +{% block title %}{{ SITENAME }}{% endblock title %} + +{% if FEED_ALL_ATOM %} + +{% endif %} +{% if FEED_ALL_RSS %} + +{% endif %} +{% if FEED_ATOM %} + +{% endif %} +{% if FEED_RSS %} + +{% endif %} +{% if CATEGORY_FEED_ATOM and category %} + +{% endif %} +{% if CATEGORY_FEED_RSS and category %} + +{% endif %} +{% if TAG_FEED_ATOM and tag %} + +{% endif %} +{% if TAG_FEED_RSS and tag %} + +{% endif %} +{% block stylesheets %} + + + + +{% endblock %} +{% block externaljs %} {% endblock %} {% block otherhead %} {% endblock %} +{% endblock head %} + + +
+
+ + journal  + photos  + code  + knowledge + bnewbold.net +
+
+
+
+
+
+ + + +
+ +
+ +{% block path %}{% endblock %} + +

{% block pagetitle %}Hey Hey Hey!{% endblock %}

+

{% block pagesubtitle %}{% endblock %}

+
+{% block right_stuff %} +{% endblock %} +
+
+ + +
+{% block content %} +Here lies content! +{% endblock %} +
+{% block commentary %} {% endblock %} + + + diff --git a/theme/templates/categories.html b/theme/templates/categories.html new file mode 100644 index 0000000..e29be0c --- /dev/null +++ b/theme/templates/categories.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content %} + +{% endblock %} diff --git a/theme/templates/category.html b/theme/templates/category.html new file mode 100644 index 0000000..4e6fd24 --- /dev/null +++ b/theme/templates/category.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block content_title %} +

Articles in the {{ category }} category

+{% endblock %} + diff --git a/theme/templates/index.html b/theme/templates/index.html new file mode 100644 index 0000000..33f1a6a --- /dev/null +++ b/theme/templates/index.html @@ -0,0 +1,94 @@ +{% extends "base.html" %} + +{% block overhead %} + + + + +{% endblock %} + +{% block path %}{% endblock %} + +{% block pagetitle %}{% endblock %} + +{% block right_stuff %} +
+
+
+
+RSS feeds:
+   - web links
+   - site code changes
+

+Other sites:
+   - github
+   - keybase
+   - equator
+{% endblock %} + +{% block content %} +
+
+
+
+

Where am I?

+As of Fall 2015 I am living in Seattle (WA) working as a freelance embedded +engineer. I spent the last year working remotely, building digital control +systems for optical atomic magnetometers at +Twinleaf , a small company headquartered +in Princeton, NJ. + + + + + + More... +
+ +
+ + +{% endblock %} + diff --git a/theme/templates/page.html b/theme/templates/page.html new file mode 100644 index 0000000..5ceb779 --- /dev/null +++ b/theme/templates/page.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{%endblock%} +{% block content %} +

{{ page.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + + {{ page.content }} + + {% if page.modified %} +

+ Last updated: {{ page.locale_modified }} +

+ {% endif %} +{% endblock %} diff --git a/theme/templates/pagination.html b/theme/templates/pagination.html new file mode 100644 index 0000000..4219a5c --- /dev/null +++ b/theme/templates/pagination.html @@ -0,0 +1,11 @@ +{% if DEFAULT_PAGINATION %} +

+ {% if articles_page.has_previous() %} + « + {% endif %} + Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + » + {% endif %} +

+{% endif %} diff --git a/theme/templates/period_archives.html b/theme/templates/period_archives.html new file mode 100644 index 0000000..d930dbb --- /dev/null +++ b/theme/templates/period_archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +

Archives for {{ period | reverse | join(' ') }}

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/theme/templates/simple_base.html b/theme/templates/simple_base.html new file mode 100644 index 0000000..bde7983 --- /dev/null +++ b/theme/templates/simple_base.html @@ -0,0 +1,63 @@ + + + + {% block head %} + {% block title %}{{ SITENAME }}{% endblock title %} + + {% if FEED_ALL_ATOM %} + + {% endif %} + {% if FEED_ALL_RSS %} + + {% endif %} + {% if FEED_ATOM %} + + {% endif %} + {% if FEED_RSS %} + + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + + {% endif %} + {% if TAG_FEED_ATOM and tag %} + + {% endif %} + {% if TAG_FEED_RSS and tag %} + + {% endif %} + {% endblock head %} + + + + + + {% block content %} + {% endblock %} + + + diff --git a/theme/templates/simple_index.html b/theme/templates/simple_index.html new file mode 100644 index 0000000..4bd8198 --- /dev/null +++ b/theme/templates/simple_index.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% block content %} +
+{% block content_title %} +

All articles

+{% endblock %} + +
    +{% for article in articles_page.object_list %} +
  1. +

    {{ article.title }}

    +
    + {{ article.locale_date }} +
    By + {% for author in article.authors %} + {{ author }} + {% endfor %} +
    +
    +
    {{ article.summary }}
    +
  2. +{% endfor %} +
+{% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} +{% endif %} +
+{% endblock content %} diff --git a/theme/templates/tag.html b/theme/templates/tag.html new file mode 100644 index 0000000..e69de29 diff --git a/theme/templates/tags.html b/theme/templates/tags.html new file mode 100644 index 0000000..b5d1482 --- /dev/null +++ b/theme/templates/tags.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} + +{% block content %} +

Tags for {{ SITENAME }}

+ {%- for tag, articles in tags|sort %} +
  • {{ tag }} ({{ articles|count }})
  • + {% endfor %} +{% endblock %} diff --git a/theme/templates/translations.html b/theme/templates/translations.html new file mode 100644 index 0000000..db8c372 --- /dev/null +++ b/theme/templates/translations.html @@ -0,0 +1,9 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations %} +{{ translation.lang }} +{% endfor %} +{% endif %} +{% endmacro %} + -- cgit v1.2.3