From 9839a49f36ee0b637b08b76e8ed5560409c9db3b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 23 Nov 2014 00:29:11 -0500 Subject: Simplify theme. --- themes/lv2/templates/archives.html | 31 +-- themes/lv2/templates/article.html | 104 +--------- themes/lv2/templates/article_list.html | 22 -- themes/lv2/templates/author.html | 15 +- themes/lv2/templates/authors.html | 19 -- themes/lv2/templates/base.html | 228 ++++----------------- themes/lv2/templates/categories.html | 38 +--- themes/lv2/templates/category.html | 17 +- themes/lv2/templates/github.html | 5 + themes/lv2/templates/includes/aboutme.html | 9 - themes/lv2/templates/includes/addthis.html | 20 -- themes/lv2/templates/includes/article_info.html | 36 ---- themes/lv2/templates/includes/cc-license.html | 64 ------ themes/lv2/templates/includes/comment_count.html | 1 - themes/lv2/templates/includes/comments.html | 41 ---- themes/lv2/templates/includes/disqus_script.html | 17 -- themes/lv2/templates/includes/footer.html | 23 --- themes/lv2/templates/includes/ga.html | 32 --- themes/lv2/templates/includes/github-js.html | 35 ---- themes/lv2/templates/includes/github.html | 11 - themes/lv2/templates/includes/links.html | 13 -- .../templates/includes/liquid_tags_nb_header.html | 157 -------------- themes/lv2/templates/includes/pagination.html | 38 ---- themes/lv2/templates/includes/piwik.html | 20 -- themes/lv2/templates/includes/related-posts.html | 10 - themes/lv2/templates/includes/series.html | 22 -- themes/lv2/templates/includes/sidebar.html | 104 ---------- themes/lv2/templates/includes/taglist.html | 9 - themes/lv2/templates/includes/translations.html | 8 - themes/lv2/templates/includes/twitter_cards.html | 27 --- .../lv2/templates/includes/twitter_timeline.html | 10 - themes/lv2/templates/index.html | 35 +++- themes/lv2/templates/page.html | 72 ++----- themes/lv2/templates/pagination.html | 15 ++ themes/lv2/templates/tag.html | 17 +- themes/lv2/templates/taglist.html | 2 + themes/lv2/templates/tags.html | 40 +--- themes/lv2/templates/translations.html | 6 + 38 files changed, 152 insertions(+), 1221 deletions(-) delete mode 100644 themes/lv2/templates/article_list.html create mode 100644 themes/lv2/templates/github.html delete mode 100644 themes/lv2/templates/includes/aboutme.html delete mode 100644 themes/lv2/templates/includes/addthis.html delete mode 100644 themes/lv2/templates/includes/article_info.html delete mode 100644 themes/lv2/templates/includes/cc-license.html delete mode 100644 themes/lv2/templates/includes/comment_count.html delete mode 100644 themes/lv2/templates/includes/comments.html delete mode 100644 themes/lv2/templates/includes/disqus_script.html delete mode 100644 themes/lv2/templates/includes/footer.html delete mode 100644 themes/lv2/templates/includes/ga.html delete mode 100644 themes/lv2/templates/includes/github-js.html delete mode 100644 themes/lv2/templates/includes/github.html delete mode 100644 themes/lv2/templates/includes/links.html delete mode 100644 themes/lv2/templates/includes/liquid_tags_nb_header.html delete mode 100644 themes/lv2/templates/includes/pagination.html delete mode 100644 themes/lv2/templates/includes/piwik.html delete mode 100644 themes/lv2/templates/includes/related-posts.html delete mode 100644 themes/lv2/templates/includes/series.html delete mode 100644 themes/lv2/templates/includes/sidebar.html delete mode 100644 themes/lv2/templates/includes/taglist.html delete mode 100644 themes/lv2/templates/includes/translations.html delete mode 100644 themes/lv2/templates/includes/twitter_cards.html delete mode 100644 themes/lv2/templates/includes/twitter_timeline.html create mode 100644 themes/lv2/templates/pagination.html create mode 100644 themes/lv2/templates/taglist.html create mode 100644 themes/lv2/templates/translations.html (limited to 'themes/lv2/templates') diff --git a/themes/lv2/templates/archives.html b/themes/lv2/templates/archives.html index 8875de0..9386c3e 100644 --- a/themes/lv2/templates/archives.html +++ b/themes/lv2/templates/archives.html @@ -1,24 +1,13 @@ {% extends "base.html" %} -{% block title %}Archives - {{ SITENAME }}{% endblock %} -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} - {% block content %} -
-

Archives for {{ SITENAME }}

-
- {% for article in dates %} -

- - {{ article.title }}{% if article.subtitle %} - {{ article.subtitle }}{% endif %} -

- {% endfor %} -
-
+
+

Archives for {{ SITENAME }}

+ +
+ {% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+ {% endfor %} +
+
{% endblock %} diff --git a/themes/lv2/templates/article.html b/themes/lv2/templates/article.html index fcfab20..6a10c55 100644 --- a/themes/lv2/templates/article.html +++ b/themes/lv2/templates/article.html @@ -1,96 +1,12 @@ {% extends "base.html" %} -{% block title %}{{ article.title|striptags }} - {{ SITENAME }}{% endblock %} -{% block html_lang %}{{ article.lang }}{% endblock %} -{% block meta %} - {% if article.author %} - - {% else %} - - {% endif %} - {% if article.tags %} - - {% endif %} - {% if article.summary %} - - {% endif %} -{% endblock %} -{% block opengraph %} - {% if OPEN_GRAPH_FB_APP_ID %} - - - - - - - - {% if article.category %} - - {% endif %} - {% for tag in article.tags %} - - {% endfor %} - {% if article.author %} - - {% elif AUTHOR %} - - {% endif %} - {% if article.og_image %} - - {% elif OPEN_GRAPH_IMAGE %} - - {% endif %} - {% endif %} -{% endblock %} - -{% block canonical_rel %} - -{% endblock %} - -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - {% if DISPLAY_CATEGORY_IN_BREADCRUMBS %} - - {% else %} - - {% endif %} - {% endif %} -{% endblock %} - -{% block content %} -
-
- -
-
-
- {% include "includes/article_info.html" %} -
-
- {{ article.content }} -
- - {% include 'includes/related-posts.html' %} - {% include 'includes/series.html' %} - {% include 'includes/addthis.html' %} - {% include 'includes/comments.html' %} -
-
- +{% block title %}{{ super() }} : {{ article.title }}{% endblock %} +{% block content %} +
+

{{ article.title }}

+ {{ SITENAME }} {% if SITESUBTITLE %} {{ SITESUBTITLE }}{% endif %} + {% if not HIDE_DATE %}{% endif %} +
+
+ {{ article.content }} +
{% endblock %} diff --git a/themes/lv2/templates/article_list.html b/themes/lv2/templates/article_list.html deleted file mode 100644 index 2d3c8cd..0000000 --- a/themes/lv2/templates/article_list.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} -{% block content %} - {% if articles %} - {% for article in (articles_page.object_list if articles_page else articles) %} -
-

{{ article.title }}

- {% if DISPLAY_ARTICLE_INFO_ON_INDEX %} -
- {% include "includes/article_info.html" %} -
- {% endif %} -
{{ article.summary }} - {% include 'includes/comment_count.html' %} - more ... -
-
-
- {% endfor %} - {% endif %} - - {% include 'includes/pagination.html' %} -{% endblock content %} diff --git a/themes/lv2/templates/author.html b/themes/lv2/templates/author.html index 07dab6e..0b37290 100644 --- a/themes/lv2/templates/author.html +++ b/themes/lv2/templates/author.html @@ -1,13 +1,2 @@ -{% extends "article_list.html" %} - -{% block title %}Articles by {{ author }} - {{ SITENAME }}{% endblock %} - -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ author }}{% endblock %} diff --git a/themes/lv2/templates/authors.html b/themes/lv2/templates/authors.html index 9aa93ac..e69de29 100644 --- a/themes/lv2/templates/authors.html +++ b/themes/lv2/templates/authors.html @@ -1,19 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Authors - {{ SITENAME }}{% endblock %} - -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} - -{% block content %} -

Authors on {{ SITENAME }}

- {% for author, articles in authors|sort %} -
  • {{ author }} ({{ articles|count }})
  • - {% endfor %} -{% endblock %} diff --git a/themes/lv2/templates/base.html b/themes/lv2/templates/base.html index b23234c..db03cfa 100644 --- a/themes/lv2/templates/base.html +++ b/themes/lv2/templates/base.html @@ -1,192 +1,48 @@ - - - {% block title %}{{ SITENAME }}{% endblock %} - - - - - - {% if 'liquid_tags.notebook' in PLUGINS %} - {% include 'includes/liquid_tags_nb_header.html' %} - {% endif %} - - {# Favicons are a touchy subject. For reasoning for the following code, see: http://stackoverflow.com/a/23851464/872397 #} - {% if FAVICON %} - - {% endif %} - {% if FAVICON_IE %} - - {% endif %} - {% if TOUCHICON %} - - {% endif %} - - {% block canonical_rel %}{% endblock %} - - {% block meta %} - - {% endblock %} - - - {% if article and article.latex %} - {{ article.latex }} - {% endif %} - {% if page and page.latex %} - {{ page.latex }} - {% endif %} - - - {# Open Graph tags #} - {% if USE_OPEN_GRAPH is not defined %} - {% set USE_OPEN_GRAPH = True %} - {% endif %} - {% if USE_OPEN_GRAPH %} - {% block opengraph %} - - {% if OPEN_GRAPH_FB_APP_ID %} - - {% endif %} - - - - - - {% if OPEN_GRAPH_IMAGE %} - + + + {% block title %}{{ SITENAME }}{%endblock%} + + + + {% if FEED_RSS %} + + {% endif %} + + + + {% include 'github.html' %} + - {% block content %} - {% endblock %} - - {% if ABOUT_ME %} -
    - {% include 'includes/aboutme.html' %} -
    - {% endif %} - {% if not HIDE_SIDEBAR %} - - {% endif %} +
    + {% block content %} + {% endblock %}
    - -{% include 'includes/footer.html' %} - - - - - - - - - -{% include 'includes/github-js.html' %} -{% include 'includes/disqus_script.html' %} -{% include 'includes/ga.html' %} -{% include 'includes/piwik.html' %} - + diff --git a/themes/lv2/templates/categories.html b/themes/lv2/templates/categories.html index 6898f97..4287079 100644 --- a/themes/lv2/templates/categories.html +++ b/themes/lv2/templates/categories.html @@ -1,36 +1,8 @@ {% extends "base.html" %} -{% block title %}Categories - {{ SITENAME }}{% endblock %} - -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} - {% block content %} -
    -

    All Categories for {{ SITENAME }}

    -
    - {% for category, articles in categories %} -
    - -
    -
    - {% for article in articles %} -

    {{ article.title }}

    - {% endfor %} -
    -
    -
    - {% endfor %} -
    - -
    + {% endblock %} diff --git a/themes/lv2/templates/category.html b/themes/lv2/templates/category.html index 0eac7dd..56f8e93 100644 --- a/themes/lv2/templates/category.html +++ b/themes/lv2/templates/category.html @@ -1,15 +1,2 @@ -{% extends "article_list.html" %} -{% block title %}{{ category }} - {{ SITENAME }}{% endblock %} -{% block meta %} - - -{% endblock %} -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ category }}{% endblock %} diff --git a/themes/lv2/templates/github.html b/themes/lv2/templates/github.html new file mode 100644 index 0000000..328d03a --- /dev/null +++ b/themes/lv2/templates/github.html @@ -0,0 +1,5 @@ +{% if GITHUB_URL %} + + Fork me on GitHub + +{% endif %} diff --git a/themes/lv2/templates/includes/aboutme.html b/themes/lv2/templates/includes/aboutme.html deleted file mode 100644 index ba56070..0000000 --- a/themes/lv2/templates/includes/aboutme.html +++ /dev/null @@ -1,9 +0,0 @@ -{% if AVATAR %} -

    - -

    -{% endif %} -

    - About {{ AUTHOR }}
    - {{ ABOUT_ME }} -

    diff --git a/themes/lv2/templates/includes/addthis.html b/themes/lv2/templates/includes/addthis.html deleted file mode 100644 index 12e2e8a..0000000 --- a/themes/lv2/templates/includes/addthis.html +++ /dev/null @@ -1,20 +0,0 @@ -{% if ADDTHIS_PROFILE %} -
    - -
    - {% if ADDTHIS_FACEBOOK_LIKE|default(true) %} - - {% endif %} - {% if ADDTHIS_TWEET|default(true) %} - - {% endif %} - {% if ADDTHIS_GOOGLE_PLUSONE|default(true) %} - - {% endif %} -
    - {% if ADDTHIS_DATA_TRACK_ADDRESSBAR|default(true) %} - - {% endif %} - - -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/article_info.html b/themes/lv2/templates/includes/article_info.html deleted file mode 100644 index 787c360..0000000 --- a/themes/lv2/templates/includes/article_info.html +++ /dev/null @@ -1,36 +0,0 @@ - diff --git a/themes/lv2/templates/includes/cc-license.html b/themes/lv2/templates/includes/cc-license.html deleted file mode 100644 index 73c7720..0000000 --- a/themes/lv2/templates/includes/cc-license.html +++ /dev/null @@ -1,64 +0,0 @@ -{# ------------------------------------------------------------------------ #} -{# Creative Commons license mark generator for Jinja2 templates, including #} -{# Pelican-generated static sites (or blogs). #} -{# ------------------------------------------------------------------------ #} -{# To use, put this file in a location where your template can import it. #} -{# Then import into the template, for example like this: #} -{# {% from '/path/to/where/you/placed/the/file' import cc_license_mark %} #} -{# Then call as simply as {{ cc_license_mark("CC-BY") }}. #} -{# #} -{# If full attribution markup is desired in a Pelican template, the #} -{# attr_props dict can be defaulted to the following when calling the macro:#} -{# attr_props={'title':SITENAME,'name':AUTHOR,'url':SITEURL} -{# ------------------------------------------------------------------------ #} -{# Generate a license mark for Creative Commons licensed content. #} -{# Choose the license either by name (CC-BY, CC-BY-SA, CC-BY-NC-SA, or #} -{# CC-BY-NC-ND), or by its features (allow derivatives: Yes, No, ShareAlike;#} -{# allow commercial reuse: Yes, No). Name, if provided, takes precedence, #} -{# and case is ignored. #} -{# #} -{# Optional: #} -{# br_after_icon: if true put a line break after the license icon #} -{# attr_markup: if true create markup for fulll attribution #} -{# attr_props: if attr_markup, a dict with title, name, and url keys #} -{# specifying how under which title, to which creator, and #} -{# to which URL to attribute the work #} -{# The parameters all mirror the Creative Commone license chooser: #} -{# http://creativecommons.org/choose/ #} -{# ------------------------------------------------------------------------ #} -{# Copyright (c) 1994 Hilmar Lapp, hlapp@drycafe.net. #} -{# Licensed under the terms of the MIT License. #} -{# Source at http://github.com/hlapp/cc-tools. Please fork & contribute. #} -{# ------------------------------------------------------------------------ #} -{% macro cc_license_mark(cc_name, - derivatives, commercial, - br_after_icon=false, - attr_markup=false, - attr_props={}) %} - {% if cc_name %} - {% set cc_name = cc_name|lower|replace("cc-","") %} - {% else %} - {% set cc_name = "by" %} - {% set cc_title_suffix = "" %} - {% if (not commercial) or (commercial|lower == "no") %} - {% set cc_name = cc_name ~ "-nc" %} - {% set cc_title_suffix = "-NonCommercial" %} - {% endif %} - {% if derivatives|lower == "no" %} - {% set cc_name = cc_name ~ "-nd" %} - {% set cc_title_suffix = cc_title_suffix ~ "-NoDerivatives" %} - {% elif derivatives|lower == "sharealike" %} - {% set cc_name = cc_name ~ "-sa" %} - {% set cc_title_suffix = cc_title_suffix ~ "-ShareAlike" %} - {% endif %} - {% endif %} - {% set cc_title, cc_uri, cc_icon = ("Creative Commons Attribution 4.0 InternationalCCSUFFIX License","http://creativecommons.org/licenses/CCNAME/4.0/","//i.creativecommons.org/l/CCNAME/4.0/80x15.png") %} - Creative Commons License - {% if br_after_img %}
    {% endif %} - {% if attr_markup %} - "{{ attr_props['title'] }}" by {{ attr_props['name'] }} is - {% else %} - Content - {% endif %} - licensed under a {{ cc_title|replace('CCSUFFIX',cc_title_suffix) }}, except where indicated otherwise. -{% endmacro %} diff --git a/themes/lv2/templates/includes/comment_count.html b/themes/lv2/templates/includes/comment_count.html deleted file mode 100644 index 4b42dde..0000000 --- a/themes/lv2/templates/includes/comment_count.html +++ /dev/null @@ -1 +0,0 @@ -{% if DISQUS_SITENAME and DISQUS_DISPLAY_COUNTS %}

    View comments.

    {% endif %} diff --git a/themes/lv2/templates/includes/comments.html b/themes/lv2/templates/includes/comments.html deleted file mode 100644 index eade006..0000000 --- a/themes/lv2/templates/includes/comments.html +++ /dev/null @@ -1,41 +0,0 @@ -{% if DISQUS_SITENAME %} -
    -
    -

    Comments

    - -
    - - - comments powered by Disqus - -
    -{% endif %} diff --git a/themes/lv2/templates/includes/disqus_script.html b/themes/lv2/templates/includes/disqus_script.html deleted file mode 100644 index 02570b3..0000000 --- a/themes/lv2/templates/includes/disqus_script.html +++ /dev/null @@ -1,17 +0,0 @@ -{% if DISQUS_SITENAME %} - - - -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/footer.html b/themes/lv2/templates/includes/footer.html deleted file mode 100644 index 8026a5d..0000000 --- a/themes/lv2/templates/includes/footer.html +++ /dev/null @@ -1,23 +0,0 @@ - diff --git a/themes/lv2/templates/includes/ga.html b/themes/lv2/templates/includes/ga.html deleted file mode 100644 index 8663e73..0000000 --- a/themes/lv2/templates/includes/ga.html +++ /dev/null @@ -1,32 +0,0 @@ -{% if GOOGLE_ANALYTICS %} - - - -{% endif %} -{% if GOOGLE_ANALYTICS_UNIVERSAL %} - - - -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/github-js.html b/themes/lv2/templates/includes/github-js.html deleted file mode 100644 index 85d9ae5..0000000 --- a/themes/lv2/templates/includes/github-js.html +++ /dev/null @@ -1,35 +0,0 @@ -{% if GITHUB_USER %} - {% if GITHUB_REPO_COUNT is not defined %} - {% set GITHUB_REPO_COUNT = 5 %} - {% endif %} - {% if GITHUB_SKIP_FORK is not defined %} - {% set GITHUB_SKIP_FORK = "false" %} - {% else %} - {% if GITHUB_SKIP_FORK %} - {% set GITHUB_SKIP_FORK = "true" %} - {% else %} - {% set GITHUB_SKIP_FORK = "false" %} - {% endif %} - {% endif %} - - - - -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/github.html b/themes/lv2/templates/includes/github.html deleted file mode 100644 index 00ea0f3..0000000 --- a/themes/lv2/templates/includes/github.html +++ /dev/null @@ -1,11 +0,0 @@ -{% if GITHUB_USER %} - -
  • GitHub Repos

    -
    -

    Status updating...

    -
    - {% if GITHUB_SHOW_USER_LINK is defined %} - @{{ GITHUB_USER }} on GitHub - {% endif %} -
  • -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/links.html b/themes/lv2/templates/includes/links.html deleted file mode 100644 index 3286b5a..0000000 --- a/themes/lv2/templates/includes/links.html +++ /dev/null @@ -1,13 +0,0 @@ -{% if LINKS %} -
  • Links

    - -
  • -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/liquid_tags_nb_header.html b/themes/lv2/templates/includes/liquid_tags_nb_header.html deleted file mode 100644 index 3d70df5..0000000 --- a/themes/lv2/templates/includes/liquid_tags_nb_header.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - diff --git a/themes/lv2/templates/includes/pagination.html b/themes/lv2/templates/includes/pagination.html deleted file mode 100644 index 2627bb1..0000000 --- a/themes/lv2/templates/includes/pagination.html +++ /dev/null @@ -1,38 +0,0 @@ -{% if articles_page and articles_paginator.num_pages > 1 %} - {% if USE_PAGER %} - - {% else %} - - {% endif %} -{% endif %} diff --git a/themes/lv2/templates/includes/piwik.html b/themes/lv2/templates/includes/piwik.html deleted file mode 100644 index a386f2d..0000000 --- a/themes/lv2/templates/includes/piwik.html +++ /dev/null @@ -1,20 +0,0 @@ -{% if PIWIK_SITE_ID and PIWIK_URL %} - {% if PIWIK_SSL_URL is not defined %} - {% set PIWIK_SSL_URL = PIWIK_URL %} - {% endif %} - - - -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/related-posts.html b/themes/lv2/templates/includes/related-posts.html deleted file mode 100644 index 70a56f3..0000000 --- a/themes/lv2/templates/includes/related-posts.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if article.related_posts %} - -{% endif %} diff --git a/themes/lv2/templates/includes/series.html b/themes/lv2/templates/includes/series.html deleted file mode 100644 index 24729a2..0000000 --- a/themes/lv2/templates/includes/series.html +++ /dev/null @@ -1,22 +0,0 @@ -{% if article.series %} - -{% endif %} diff --git a/themes/lv2/templates/includes/sidebar.html b/themes/lv2/templates/includes/sidebar.html deleted file mode 100644 index 35811f6..0000000 --- a/themes/lv2/templates/includes/sidebar.html +++ /dev/null @@ -1,104 +0,0 @@ -{% if DISPLAY_TAGS_ON_SIDEBAR is not defined %} - {% set DISPLAY_TAGS_ON_SIDEBAR = True %} -{% endif %} - - diff --git a/themes/lv2/templates/includes/taglist.html b/themes/lv2/templates/includes/taglist.html deleted file mode 100644 index bcaa470..0000000 --- a/themes/lv2/templates/includes/taglist.html +++ /dev/null @@ -1,9 +0,0 @@ -{% if article.tags %} -Tags -{% for tag in article.tags %} - {{ tag }} - {% if not loop.last %} - / - {% endif %} -{% endfor %} -{% endif %} diff --git a/themes/lv2/templates/includes/translations.html b/themes/lv2/templates/includes/translations.html deleted file mode 100644 index ea693df..0000000 --- a/themes/lv2/templates/includes/translations.html +++ /dev/null @@ -1,8 +0,0 @@ -{% macro translations_for(article) %} -{% if article.translations %} -Lang -{% for translation in article.translations %} - {{ translation.lang }} -{% endfor %} -{% endif %} -{% endmacro %} \ No newline at end of file diff --git a/themes/lv2/templates/includes/twitter_cards.html b/themes/lv2/templates/includes/twitter_cards.html deleted file mode 100644 index 3145915..0000000 --- a/themes/lv2/templates/includes/twitter_cards.html +++ /dev/null @@ -1,27 +0,0 @@ -{% if TWITTER_CARDS and USE_OPEN_GRAPH %} - {# Do not include duplicates tag with og ones. #} - {# Twitter is able to infer them from og. #} - - {% if TWITTER_USERNAME %} - - - {% endif %} - - {% if article %} - {% if article.og_image %} - - {% elif OPEN_GRAPH_IMAGE %} - - {% endif %} - {% elif page %} - {% if page.og_image %} - - {% elif OPEN_GRAPH_IMAGE %} - - {% endif %} - {% endif %} -{% endif %} diff --git a/themes/lv2/templates/includes/twitter_timeline.html b/themes/lv2/templates/includes/twitter_timeline.html deleted file mode 100644 index ad1ce5d..0000000 --- a/themes/lv2/templates/includes/twitter_timeline.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if TWITTER_WIDGET_ID %} - -
  • Latest Tweets

  • -
    - -
    - - - -{% endif %} \ No newline at end of file diff --git a/themes/lv2/templates/index.html b/themes/lv2/templates/index.html index 29ba7d6..0fad03c 100644 --- a/themes/lv2/templates/index.html +++ b/themes/lv2/templates/index.html @@ -1,4 +1,35 @@ -{% extends "article_list.html" %} +{% extends "base.html" %} +{% block content_title %}{% endblock %} +{% block content %} + {% if articles %} + {% for article in articles %} -{% block canonical_rel %}{% endblock %} + {# First item #} + {% if loop.first %} +
    +

    {{ article.title }}

    + {{ SITENAME }} {% if SITESUBTITLE %} {{ SITESUBTITLE }}{% endif %} + {% if not HIDE_DATE %}{% endif %} +
    +
    + {{ article.content }} +
    + {% if loop.length > 1 %} +
    +

    Tous les articles

    +
      + {% endif %} + {# other items #} + {% else %} +
    1. {{ article.title }}
    2. + {% endif %} + {% endfor %} + {% if loop.length > 1 %} +
    +
    + {% endif %} + {% else %} + No articles. + {% endif %} +{% endblock content %} diff --git a/themes/lv2/templates/page.html b/themes/lv2/templates/page.html index f8757fa..33f6aca 100644 --- a/themes/lv2/templates/page.html +++ b/themes/lv2/templates/page.html @@ -1,64 +1,16 @@ {% extends "base.html" %} -{% block title %}{{ page.title }} - {{ SITENAME }}{% endblock %} -{% block html_lang %}{{ page.lang }}{% endblock %} -{% block meta %} - {% if page.author %} - - {% else %} - - {% endif %} - {% if page.summary %} - - {% endif %} +{% block title %} + {% if page.title %} + {{ page.title }} + {% else %} + {{ SITENAME }} + {% endif %} {% endblock %} -{% block opengraph %} - {% if OPEN_GRAPH_FB_APP_ID %} - +{% block content %} +
    + {% if page.title %} +

    {{ page.title }}

    {% endif %} - - - - - - {% if page.og_image %} - - {% elif OPEN_GRAPH_IMAGE %} - - {% endif %} -{% endblock %} - -{% block canonical_rel %} - -{% endblock %} - -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} - -{% block content %} -
    -

    {{ page.title }}

    - {% import 'includes/translations.html' as translations with context %} - {{ translations.translations_for(page) }} - {% if PDF_PROCESSOR %} - - get the pdf - - {% endif %} -
    - {{ page.content }} - {% if page.comments == 'enabled' %} - {% include 'includes/comments.html' %} - {% endif %} -
    -
    +
    + {{ page.content }} {% endblock %} diff --git a/themes/lv2/templates/pagination.html b/themes/lv2/templates/pagination.html new file mode 100644 index 0000000..a2759d9 --- /dev/null +++ b/themes/lv2/templates/pagination.html @@ -0,0 +1,15 @@ +{% if DEFAULT_PAGINATION %} +

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

    +{% endif %} diff --git a/themes/lv2/templates/tag.html b/themes/lv2/templates/tag.html index aa9edc8..68cdcba 100644 --- a/themes/lv2/templates/tag.html +++ b/themes/lv2/templates/tag.html @@ -1,15 +1,2 @@ -{% extends "article_list.html" %} -{% block title %}{{ tag }} - {{ SITENAME }}{% endblock %} -{% block meta %} - - -{% endblock %} -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} +{% extends "index.html" %} +{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %} diff --git a/themes/lv2/templates/taglist.html b/themes/lv2/templates/taglist.html new file mode 100644 index 0000000..c792fd7 --- /dev/null +++ b/themes/lv2/templates/taglist.html @@ -0,0 +1,2 @@ +{% if article.tags %}

    tags: {% for tag in article.tags %}{{ tag }}{% endfor %}

    {% endif %} +{% if PDF_PROCESSOR %}

    get the pdf

    {% endif %} diff --git a/themes/lv2/templates/tags.html b/themes/lv2/templates/tags.html index 3f29a36..eae212f 100644 --- a/themes/lv2/templates/tags.html +++ b/themes/lv2/templates/tags.html @@ -1,37 +1,9 @@ {% extends "base.html" %} - -{% block title %}Tags - {{ SITENAME }}{% endblock %} - -{% block breadcrumbs %} - {% if DISPLAY_BREADCRUMBS %} - - {% endif %} -{% endblock %} - {% block content %} -
    -

    Tags for {{ SITENAME }}

    -
    - {%- for tag, articles in tags|sort %} -
    - -
    -
    - {% for article in articles %} -

    {{ article.title }}

    - {% endfor %} -
    -
    -
    - {% endfor %} -
    - -
    + {% endblock %} + diff --git a/themes/lv2/templates/translations.html b/themes/lv2/templates/translations.html new file mode 100644 index 0000000..e5c7b53 --- /dev/null +++ b/themes/lv2/templates/translations.html @@ -0,0 +1,6 @@ +{% if article.translations %} + Translations: + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +{% endif %} -- cgit v1.2.1