From a775ae2cba1cd102d07be3ad377aa8a9ae28adf8 Mon Sep 17 00:00:00 2001 From: "mb@mb" Date: Tue, 8 May 2018 13:37:12 +0200 Subject: [PATCH 1/4] set pagination to 500 --- pelicanconf.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index b924bb6..2dc1183 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -13,16 +13,11 @@ THEME_STATIC_DIR = 'theme/' TIMEZONE = 'Europe/Paris' DEFAULT_LANG = 'en' - DEFAULT_DATE = "fs" - DISPLAY_PAGES_ON_MENU = False - DISPLAY_CATEGORIES_ON_MENU = False - SLUGIFY_SOURCE = 'title' - # feed FEED_DOMAIN = SITEURL FEED_ALL_RSS = 'feeds/all.rss.xml' @@ -35,8 +30,7 @@ TRANSLATION_FEED_RSS = None AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None - -DEFAULT_PAGINATION = 5 +DEFAULT_PAGINATION = 500 # Uncomment following line if you want document-relative URLs when developing #RELATIVE_URLS = True From 9689cb0ece1473b0b96e1e58dd0ca13360f45e27 Mon Sep 17 00:00:00 2001 From: "mb@mb" Date: Tue, 8 May 2018 13:37:44 +0200 Subject: [PATCH 2/4] i think it's clearer to not shorten MDD but write it fully out? --- content/meet_the_dev_1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/meet_the_dev_1.md b/content/meet_the_dev_1.md index 5a459a7..57df1c4 100644 --- a/content/meet_the_dev_1.md +++ b/content/meet_the_dev_1.md @@ -1,4 +1,4 @@ -Title: MDD: Daniel Gultsch +Title: Meet the developer: Daniel Gultsch Category: meet the developer slug: conversations-gultsch tags: instant messaging, conversations, xmpp From f8ef4f4c61132172faf65ffa48a4f600815a0c4d Mon Sep 17 00:00:00 2001 From: "mb@mb" Date: Tue, 8 May 2018 13:38:04 +0200 Subject: [PATCH 3/4] date strftime added --- theme/wttf/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/wttf/templates/index.html b/theme/wttf/templates/index.html index 780e4fd..4167386 100644 --- a/theme/wttf/templates/index.html +++ b/theme/wttf/templates/index.html @@ -23,7 +23,7 @@ {% endfor %} published on - +
{{ article.content }}
From 077b3059b73eb048ea3b28cddf64147b261864a6 Mon Sep 17 00:00:00 2001 From: "mb@mb" Date: Tue, 8 May 2018 13:38:22 +0200 Subject: [PATCH 4/4] added a theme alternative --- theme/wttf2/static/main.css | 150 +++++++++++++++++++++ theme/wttf2/templates/archives.html | 11 ++ theme/wttf2/templates/article.html | 33 +++++ theme/wttf2/templates/author.html | 7 + theme/wttf2/templates/authors.html | 13 ++ theme/wttf2/templates/base.html | 60 +++++++++ theme/wttf2/templates/categories.html | 8 ++ theme/wttf2/templates/category.html | 5 + theme/wttf2/templates/gosquared.html | 14 ++ theme/wttf2/templates/index.html | 86 ++++++++++++ theme/wttf2/templates/page.html | 15 +++ theme/wttf2/templates/pagination.html | 11 ++ theme/wttf2/templates/period_archives.html | 11 ++ theme/wttf2/templates/tag.html | 2 + theme/wttf2/templates/tags.html | 10 ++ theme/wttf2/templates/translations.html | 9 ++ 16 files changed, 445 insertions(+) create mode 100644 theme/wttf2/static/main.css create mode 100644 theme/wttf2/templates/archives.html create mode 100644 theme/wttf2/templates/article.html create mode 100644 theme/wttf2/templates/author.html create mode 100644 theme/wttf2/templates/authors.html create mode 100644 theme/wttf2/templates/base.html create mode 100644 theme/wttf2/templates/categories.html create mode 100644 theme/wttf2/templates/category.html create mode 100644 theme/wttf2/templates/gosquared.html create mode 100644 theme/wttf2/templates/index.html create mode 100644 theme/wttf2/templates/page.html create mode 100644 theme/wttf2/templates/pagination.html create mode 100644 theme/wttf2/templates/period_archives.html create mode 100644 theme/wttf2/templates/tag.html create mode 100644 theme/wttf2/templates/tags.html create mode 100644 theme/wttf2/templates/translations.html diff --git a/theme/wttf2/static/main.css b/theme/wttf2/static/main.css new file mode 100644 index 0000000..38388bd --- /dev/null +++ b/theme/wttf2/static/main.css @@ -0,0 +1,150 @@ +body{ + margin:0px; + font: 14px "SnigletRegular"; + color:midnightblue; +} + +h1{ + font-size: 42px; + line-height:45px; + margin: 0.3em 0; + font: 36px "SnigletRegular"; + text-align:left; + font-weight: bold; +} +blockquote{ + font-weight:bold; +} +a{ + color:lightseagreen; + text-decoration: none; +} +h1 a{ + color:black; +} +hr{ + border:0; + border-bottom:1px solid midnightblue; +} + +header, section{ + width: calc(100% - 4em); + padding:0 2em; +} +header{ + height: 200px; + margin:0; +} + #menu{ + position: absolute; + top:0.3em; + left:calc(50% + 2em); + width: 250px; + margin:0; + } + #menu select{ + height:3em; + vertical-align: middle; + } +#content{ +} + .featured { + max-width: calc(50% - 5.5em); + float: left; + padding: 0 2em; + margin:2em 0; + /*background-color: #7781ef;*/ + /*background-color: rgba(240,240,240,1);*/ + /*background-color: powderblue;*/ + /*box-shadow: 1.1em 1.1em gainsboro;*/ + } + .featured:nth-child(even) { + float:right; + margin-top: 10em; + } + .featured:last-of-type{ + margin-bottom:5em; + } + + .entry-title{ + /*margin:2em 1.5em 2em 50px;*/ + border: 0; + border-radius: 100%; + background-color: #95cc74; + padding: 2em; + text-align: center; + box-shadow: 0em 3em gainsboro; + } + .entry-subtitle{ + font-size: 12px; + line-height: 1.5; + text-align:left; + margin:2em 0 1em; + /*margin-left:50px;*/ + color:black; + } + .entry-content{ + font: 16px serif; + line-height: 28px; + letter-spacing: 0.01em; + /*font-weight:500;*/ + line-break:strict; + } + .entry-tags a{ + font-weight:bold; + text-decoration: underline; + /*color:midnightblue;*/ + color:black; + } + .entry-category{ + font-weight:bold; + font-style: italic; + } + .entry-date{ + font-style:italic; + } +#list{ + margin:3em 0; + clear: both; +} + #list ul, #list li{ + list-style: none; + padding:0; + margin:2em 0; + } + #list .entry-title{ + margin-top:0; /* reset */ + margin-bottom:0; /* reset */ + } +footer{ + width: calc(100% - 4em); + margin:0; + padding:2em; + left:0; + background-color: black; + color:white; + clear:both; +} + + +@media only screen and (orientation:portrait) { + body { + + } + #menu{ + clear:both; + max-width: 100%; + } + .featured{ + max-width: calc(100% - 8em); !important + clear:both; !important + } + .featured:nth-child(even) { + clear:both; !important + } + .entry-content{ + max-width: 90%; + } + + +} \ No newline at end of file diff --git a/theme/wttf2/templates/archives.html b/theme/wttf2/templates/archives.html new file mode 100644 index 0000000..050f268 --- /dev/null +++ b/theme/wttf2/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/wttf2/templates/article.html b/theme/wttf2/templates/article.html new file mode 100644 index 0000000..307256e --- /dev/null +++ b/theme/wttf2/templates/article.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} +{% block head %} + {{ super() }} + {% if article.description %} + + {% endif %} +{% endblock %} + +{% block content %} +
+

+ {{ article.title }} +

+
+ A + + about + + published on + +
+
{{ article.content }}
+
+ +{% endblock %} diff --git a/theme/wttf2/templates/author.html b/theme/wttf2/templates/author.html new file mode 100644 index 0000000..e9f7870 --- /dev/null +++ b/theme/wttf2/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/wttf2/templates/authors.html b/theme/wttf2/templates/authors.html new file mode 100644 index 0000000..4914904 --- /dev/null +++ b/theme/wttf2/templates/authors.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Authors{% endblock %} + +{% block content %} +

Authors on {{ SITENAME }}

+ +
    + {%- for author, articles in authors|sort %} +
  • {{ author }} ({{ articles|count }})
  • + {% endfor %} +
+{% endblock %} diff --git a/theme/wttf2/templates/base.html b/theme/wttf2/templates/base.html new file mode 100644 index 0000000..d60a036 --- /dev/null +++ b/theme/wttf2/templates/base.html @@ -0,0 +1,60 @@ + + + + {% 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 %} +
+ {% for page in pages %} + {{ page.title }} + {{ page.content }} + {% endfor %} +
+ + diff --git a/theme/wttf2/templates/categories.html b/theme/wttf2/templates/categories.html new file mode 100644 index 0000000..e29be0c --- /dev/null +++ b/theme/wttf2/templates/categories.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content %} +
    +{% for category, articles in categories %} +
  • {{ category }}
  • +{% endfor %} +
+{% endblock %} diff --git a/theme/wttf2/templates/category.html b/theme/wttf2/templates/category.html new file mode 100644 index 0000000..4e6fd24 --- /dev/null +++ b/theme/wttf2/templates/category.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block content_title %} +

Articles in the {{ category }} category

+{% endblock %} + diff --git a/theme/wttf2/templates/gosquared.html b/theme/wttf2/templates/gosquared.html new file mode 100644 index 0000000..49ccbbe --- /dev/null +++ b/theme/wttf2/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} + +{% endif %} diff --git a/theme/wttf2/templates/index.html b/theme/wttf2/templates/index.html new file mode 100644 index 0000000..86c31f6 --- /dev/null +++ b/theme/wttf2/templates/index.html @@ -0,0 +1,86 @@ +{% extends "base.html" %} +{% block content %} +{% if articles %} +
+ {% for article in articles_page.object_list %} + {% if loop.index <= 3 %} + + {% if loop.index < 3 %} + {% if loop.last %} +
+ {% endif %} + {% endif %} + {% if loop.index == 3 %} + +
+
Other articles
+
+
    + {% endif %} + {# other items #} + {% else %} + {% if loop.first %} +
+
+
    + {% endif %} +
  1. +
    +
    +

    + {{ article.title }} +

    +
    + A + + about + + published on + +
    +
    + +
    +

    {{ article.summary }}

    + read more +
    +
    +
  2. + {% endif %} + {% endfor %} +
+{% endif %} +{% endblock content %} + + diff --git a/theme/wttf2/templates/page.html b/theme/wttf2/templates/page.html new file mode 100644 index 0000000..5ceb779 --- /dev/null +++ b/theme/wttf2/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/wttf2/templates/pagination.html b/theme/wttf2/templates/pagination.html new file mode 100644 index 0000000..4219a5c --- /dev/null +++ b/theme/wttf2/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/wttf2/templates/period_archives.html b/theme/wttf2/templates/period_archives.html new file mode 100644 index 0000000..d930dbb --- /dev/null +++ b/theme/wttf2/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/wttf2/templates/tag.html b/theme/wttf2/templates/tag.html new file mode 100644 index 0000000..c17cf1f --- /dev/null +++ b/theme/wttf2/templates/tag.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} + diff --git a/theme/wttf2/templates/tags.html b/theme/wttf2/templates/tags.html new file mode 100644 index 0000000..b5d1482 --- /dev/null +++ b/theme/wttf2/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/wttf2/templates/translations.html b/theme/wttf2/templates/translations.html new file mode 100644 index 0000000..db8c372 --- /dev/null +++ b/theme/wttf2/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 %} +