From 381e40f2b9c87b6a9359f2c79cf4687064625288 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 30 Aug 2017 21:04:39 -0700 Subject: bootstrap 3 + pelican template repo --- theme/templates/404.html | 3 ++ theme/templates/500.html | 3 ++ theme/templates/archives.html | 10 +++++ theme/templates/article.html | 48 ++++++++++++++++++++ theme/templates/author.html | 5 +++ theme/templates/authors.html | 12 +++++ theme/templates/base.html | 86 ++++++++++++++++++++++++++++++++++++ theme/templates/categories.html | 8 ++++ theme/templates/category.html | 3 ++ theme/templates/index.html | 11 +++++ theme/templates/list.html | 28 ++++++++++++ theme/templates/page.html | 15 +++++++ theme/templates/pagination.html | 11 +++++ theme/templates/period_archives.html | 11 +++++ theme/templates/simple_base.html | 63 ++++++++++++++++++++++++++ theme/templates/tag.html | 0 theme/templates/tags.html | 9 ++++ theme/templates/translations.html | 9 ++++ 18 files changed, 335 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/list.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/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..d43d0ad --- /dev/null +++ b/theme/templates/404.html @@ -0,0 +1,3 @@ +{% extends "base.html"%} +{% block pagetitle %}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..db660a3 --- /dev/null +++ b/theme/templates/500.html @@ -0,0 +1,3 @@ +{% extends "base.html"%} +{% block pagetitle %}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..e50272b --- /dev/null +++ b/theme/templates/archives.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% block pagetitle %}Archives for {{ SITENAME }}{% endblock %} +{% block content %} +
+{% 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..dd17efd --- /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 pagetitle %} +{{ article.title }} +{% endblock %} +{% block content %} +{#
+
#} + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +{#
+
#} +
+ + {{ article.locale_date }} + + {% if article.modified %} + + {{ article.locale_modified }} + + {% endif %} + {% if article.authors %} +
+ {% 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..9285e43 --- /dev/null +++ b/theme/templates/author.html @@ -0,0 +1,5 @@ +{% extends "list.html" %} + +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} +{% block pagetitle %}Articles by {{ author }}{% endblock %} + diff --git a/theme/templates/authors.html b/theme/templates/authors.html new file mode 100644 index 0000000..001e11e --- /dev/null +++ b/theme/templates/authors.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} +{% block pagetitle %}Authors on {{ SITENAME }}{% endblock %} + +{% block content %} + +{% endblock %} diff --git a/theme/templates/base.html b/theme/templates/base.html new file mode 100644 index 0000000..2f0be01 --- /dev/null +++ b/theme/templates/base.html @@ -0,0 +1,86 @@ + + + + + +{% block head %} +{% block title %}{{ SITENAME }}{% endblock title %} + +{% block stylesheets %} + + +{% endblock %}{% block externaljs %} +{% endblock %}{% block otherhead %}{% endblock %} +{% endblock head %} + + + + + + + +
+{% block content %} + +
+

Navbar example

+

This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

+

To see the difference between static and fixed top navbars, just scroll.

+

+ View navbar docs » +

+
+{% 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..2a5d250 --- /dev/null +++ b/theme/templates/category.html @@ -0,0 +1,3 @@ +{% extends "list.html" %} +{% block pagetitle %}Articles in the {{ category }} category{% endblock %} + diff --git a/theme/templates/index.html b/theme/templates/index.html new file mode 100644 index 0000000..e397ee7 --- /dev/null +++ b/theme/templates/index.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block overhead %}{% endblock %} + +{% block path %}{% endblock %} + +{% block pagetitle %}{% endblock %} + +{% block content %} +Main Content Goes Here +{% endblock %} diff --git a/theme/templates/list.html b/theme/templates/list.html new file mode 100644 index 0000000..4bd8198 --- /dev/null +++ b/theme/templates/list.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/page.html b/theme/templates/page.html new file mode 100644 index 0000000..bcbcf5e --- /dev/null +++ b/theme/templates/page.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{%endblock%} +{% block pagetitle %}{{ page.title }}{% endblock %} +{% block content %} + {% 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..9f7da56 --- /dev/null +++ b/theme/templates/period_archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block pagetitle %}Archives for {{ period | reverse | join(' ') }}{% endblock %} +{% block content %} + +
+{% 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/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..1d49d42 --- /dev/null +++ b/theme/templates/tags.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} +{% block pagetitle %}Tags for {{ SITENAME }}{% endblock %} +{% block content %} + {%- 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