From 0f9753c79e4afecbf7d60abcd89d17e0f215e925 Mon Sep 17 00:00:00 2001 From: Nabil Freij Date: Tue, 19 Jul 2022 14:25:58 -0700 Subject: [PATCH] Templates rework --- ablog/__init__.py | 5 +- ablog/locales/ca/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/de/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/es/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/et/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/fr/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/ru/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/tr/LC_MESSAGES/sphinx.po | 34 ++-- ablog/locales/zh_CN/LC_MESSAGES/sphinx.po | 34 ++-- ablog/post.py | 6 +- ablog/start.py | 2 +- ablog/templates/{ => ablog}/archives.html | 8 +- ablog/templates/{ => ablog}/authors.html | 2 + ablog/templates/ablog/catalog.html | 28 ++++ ablog/templates/{ => ablog}/categories.html | 8 +- ablog/templates/ablog/collection.html | 62 ++++++++ ablog/templates/{ => ablog}/languages.html | 2 + ablog/templates/{ => ablog}/locations.html | 8 +- ablog/templates/ablog/page.html | 60 +++++++ ablog/templates/ablog/postcard.html | 26 +++ ablog/templates/ablog/postcard2.html | 165 ++++++++++++++++++++ ablog/templates/ablog/postnavy.html | 33 ++++ ablog/templates/ablog/recentposts.html | 17 ++ ablog/templates/ablog/redirect.html | 8 + ablog/templates/ablog/tagcloud.html | 14 ++ ablog/templates/catalog.html | 26 --- ablog/templates/collection.html | 52 ------ ablog/templates/page.html | 81 ---------- ablog/templates/postcard.html | 15 -- ablog/templates/postcard2.html | 94 ----------- ablog/templates/postnavy.html | 26 --- ablog/templates/recentposts.html | 15 -- ablog/templates/redirect.html | 8 - ablog/templates/tagcloud.html | 41 ----- docs/release/ablog-v0.11-released.rst | 23 +++ setup.py | 2 +- 36 files changed, 605 insertions(+), 504 deletions(-) rename ablog/templates/{ => ablog}/archives.html (62%) rename ablog/templates/{ => ablog}/authors.html (84%) create mode 100644 ablog/templates/ablog/catalog.html rename ablog/templates/{ => ablog}/categories.html (62%) create mode 100644 ablog/templates/ablog/collection.html rename ablog/templates/{ => ablog}/languages.html (88%) rename ablog/templates/{ => ablog}/locations.html (65%) create mode 100644 ablog/templates/ablog/page.html create mode 100644 ablog/templates/ablog/postcard.html create mode 100644 ablog/templates/ablog/postcard2.html create mode 100644 ablog/templates/ablog/postnavy.html create mode 100644 ablog/templates/ablog/recentposts.html create mode 100644 ablog/templates/ablog/redirect.html create mode 100644 ablog/templates/ablog/tagcloud.html delete mode 100644 ablog/templates/catalog.html delete mode 100644 ablog/templates/collection.html delete mode 100644 ablog/templates/page.html delete mode 100644 ablog/templates/postcard.html delete mode 100644 ablog/templates/postcard2.html delete mode 100644 ablog/templates/postnavy.html delete mode 100644 ablog/templates/recentposts.html delete mode 100644 ablog/templates/redirect.html delete mode 100644 ablog/templates/tagcloud.html create mode 100644 docs/release/ablog-v0.11-released.rst diff --git a/ablog/__init__.py b/ablog/__init__.py index 9252bbf7..43676f97 100755 --- a/ablog/__init__.py +++ b/ablog/__init__.py @@ -22,12 +22,15 @@ ) from .version import version as __version__ +PKGDIR = os.path.abspath(os.path.dirname(__file__)) + + __all__ = ["setup"] def anchor(post): """ - Return anchor string for posts that arepage sections. + Return anchor string for posts that are page sections. """ if post.section: return "#" + post.section diff --git a/ablog/locales/ca/LC_MESSAGES/sphinx.po b/ablog/locales/ca/LC_MESSAGES/sphinx.po index a4330d74..d5b5d0a3 100644 --- a/ablog/locales/ca/LC_MESSAGES/sphinx.po +++ b/ablog/locales/ca/LC_MESSAGES/sphinx.po @@ -22,7 +22,7 @@ msgstr "" msgid "Updated on " msgstr "Actualitzat el " -#: ablog/post.py:601 ablog/templates/authors.html:2 +#: ablog/post.py:601 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Autors" @@ -30,7 +30,7 @@ msgstr "Autors" msgid "Posts by" msgstr "Publicacions de" -#: ablog/post.py:602 ablog/templates/locations.html:3 +#: ablog/post.py:602 ablog/templates/ablog/locations.html:3 msgid "Locations" msgstr "Ubicacions" @@ -38,7 +38,7 @@ msgstr "Ubicacions" msgid "Posts from" msgstr "Publicacions des de" -#: ablog/post.py:603 ablog/templates/languages.html:3 +#: ablog/post.py:603 ablog/templates/ablog/languages.html:3 msgid "Languages" msgstr "Idiomes" @@ -46,7 +46,7 @@ msgstr "Idiomes" msgid "Posts in" msgstr "Publicacions en" -#: ablog/post.py:604 ablog/templates/categories.html:3 +#: ablog/post.py:604 ablog/templates/ablog/categories.html:3 msgid "Categories" msgstr "Categories" @@ -58,8 +58,8 @@ msgstr "Totes les publicacions" msgid "Posted in" msgstr "Publicat al" -#: ablog/post.py:606 ablog/templates/postcard2.html:57 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:606 ablog/templates/ablog/postcard2.html:57 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Etiquetes" @@ -79,46 +79,46 @@ msgstr "Totes les" msgid "Drafts" msgstr "Borradors" -#: ablog/templates/archives.html:3 +#: ablog/templates/ablog/archives.html:3 msgid "Archives" msgstr "Arxius" -#: ablog/templates/collection.html:47 +#: ablog/templates/ablog/collection.html:47 msgid "Read more ..." msgstr "Llegir-ne més ..." -#: ablog/templates/postcard2.html:5 +#: ablog/templates/ablog/postcard2.html:5 msgid "Update" msgstr "Actualització" -#: ablog/templates/postcard2.html:12 +#: ablog/templates/ablog/postcard2.html:12 msgid "Author" msgstr "Autor" -#: ablog/templates/postcard2.html:24 +#: ablog/templates/ablog/postcard2.html:24 msgid "Location" msgstr "Ubicació" -#: ablog/templates/postcard2.html:35 +#: ablog/templates/ablog/postcard2.html:35 msgid "Language" msgstr "Idioma" -#: ablog/templates/postcard2.html:46 +#: ablog/templates/ablog/postcard2.html:46 msgid "Category" msgstr "Categoria" -#: ablog/templates/postcard2.html:60 +#: ablog/templates/ablog/postcard2.html:60 msgid "Tag" msgstr "Etiqueta" -#: ablog/templates/postnavy.html:5 +#: ablog/templates/ablog/postnavy.html:5 msgid "Previous" msgstr "Anterior" -#: ablog/templates/postnavy.html:15 +#: ablog/templates/ablog/postnavy.html:15 msgid "Next" msgstr "Següent" -#: ablog/templates/recentposts.html:3 +#: ablog/templates/ablog/recentposts.html:3 msgid "Recent Posts" msgstr "Publicacions recents" diff --git a/ablog/locales/de/LC_MESSAGES/sphinx.po b/ablog/locales/de/LC_MESSAGES/sphinx.po index e763b7c1..f7477264 100644 --- a/ablog/locales/de/LC_MESSAGES/sphinx.po +++ b/ablog/locales/de/LC_MESSAGES/sphinx.po @@ -21,7 +21,7 @@ msgstr "" msgid "Updated on" msgstr "Aktualisiert am" -#: ablog/post.py:387 ablog/templates/authors.html:2 +#: ablog/post.py:387 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Autoren" @@ -29,7 +29,7 @@ msgstr "Autoren" msgid "Posts by" msgstr "Einträge von" -#: ablog/post.py:388 ablog/templates/locations.html:2 +#: ablog/post.py:388 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "Orte" @@ -37,7 +37,7 @@ msgstr "Orte" msgid "Posts from" msgstr "Einträge aus" -#: ablog/post.py:389 ablog/templates/languages.html:2 +#: ablog/post.py:389 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "Sprachen" @@ -45,7 +45,7 @@ msgstr "Sprachen" msgid "Posts in" msgstr "Einträge in" -#: ablog/post.py:390 ablog/templates/categories.html:2 +#: ablog/post.py:390 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "Kategorien" @@ -57,8 +57,8 @@ msgstr "Alle Einträge" msgid "Posted in" msgstr "Einträge in" -#: ablog/post.py:392 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:392 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Schlagworte" @@ -70,46 +70,46 @@ msgstr "Einträge mit Schlagwort" msgid "Drafts" msgstr "Entwurf" -#: ablog/templates/archive.html:49 +#: ablog/templates/ablog/archive.html:49 msgid "Read more ..." msgstr "Weiter..." -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "Archive" -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "Aktualisierung" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "Autor" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "Ort" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "Sprache" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "Kategorie" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "Schlagwort" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "Vorige" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "Nächste" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "Neue Einträge" diff --git a/ablog/locales/es/LC_MESSAGES/sphinx.po b/ablog/locales/es/LC_MESSAGES/sphinx.po index 850e5620..7c62a61f 100644 --- a/ablog/locales/es/LC_MESSAGES/sphinx.po +++ b/ablog/locales/es/LC_MESSAGES/sphinx.po @@ -22,7 +22,7 @@ msgstr "" msgid "Updated on" msgstr "Actualizado el" -#: ablog/post.py:387 ablog/templates/authors.html:2 +#: ablog/post.py:387 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Autores" @@ -30,7 +30,7 @@ msgstr "Autores" msgid "Posts by" msgstr "Entradas por" -#: ablog/post.py:388 ablog/templates/locations.html:2 +#: ablog/post.py:388 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "Lugares" @@ -38,7 +38,7 @@ msgstr "Lugares" msgid "Posts from" msgstr "Entradas desde" -#: ablog/post.py:389 ablog/templates/languages.html:2 +#: ablog/post.py:389 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "Idiomas" @@ -46,7 +46,7 @@ msgstr "Idiomas" msgid "Posts in" msgstr "Entradas en" -#: ablog/post.py:390 ablog/templates/categories.html:2 +#: ablog/post.py:390 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "Categorías" @@ -58,8 +58,8 @@ msgstr "Todas las entradas" msgid "Posted in" msgstr "Publicado en" -#: ablog/post.py:392 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:392 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Etiquetas" @@ -71,46 +71,46 @@ msgstr "Entradas etiquetadas" msgid "Drafts" msgstr "Borradores" -#: ablog/templates/archive.html:49 +#: ablog/templates/ablog/archive.html:49 msgid "Read more ..." msgstr "Leer más ..." -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "Archivos" -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "Actualizado" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "Autor" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "Lugar" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "Idioma" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "Categoría" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "Etiqueta" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "Anterior" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "Siguiente" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "Entradas recientes" diff --git a/ablog/locales/et/LC_MESSAGES/sphinx.po b/ablog/locales/et/LC_MESSAGES/sphinx.po index daa43898..579fd266 100644 --- a/ablog/locales/et/LC_MESSAGES/sphinx.po +++ b/ablog/locales/et/LC_MESSAGES/sphinx.po @@ -21,7 +21,7 @@ msgstr "" msgid "Updated on" msgstr "Uuendus" -#: ablog/post.py:387 ablog/templates/authors.html:2 +#: ablog/post.py:387 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Autorid" @@ -29,7 +29,7 @@ msgstr "Autorid" msgid "Posts by" msgstr "Postitused autorilt" -#: ablog/post.py:388 ablog/templates/locations.html:2 +#: ablog/post.py:388 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "Kohad" @@ -37,7 +37,7 @@ msgstr "Kohad" msgid "Posts from" msgstr "" -#: ablog/post.py:389 ablog/templates/languages.html:2 +#: ablog/post.py:389 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "Keeltes" @@ -45,7 +45,7 @@ msgstr "Keeltes" msgid "Posts in" msgstr "" -#: ablog/post.py:390 ablog/templates/categories.html:2 +#: ablog/post.py:390 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "Kategooriad" @@ -57,8 +57,8 @@ msgstr "Kõik postitused" msgid "Posted in" msgstr "Postitused kategoorias" -#: ablog/post.py:392 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:392 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Märksõnad" @@ -70,46 +70,46 @@ msgstr "Postitused märksõnaga" msgid "Drafts" msgstr "Eelnõu" -#: ablog/templates/archive.html:49 +#: ablog/templates/ablog/archive.html:49 msgid "Read more ..." msgstr "Edasi..." -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "Arhiiv" -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "Ajakohastama" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "Autor" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "Koht" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "Keel" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "Kategooria" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "Märksõna" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "Eelmine" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "Järgmine" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "Viimased postitused" diff --git a/ablog/locales/fr/LC_MESSAGES/sphinx.po b/ablog/locales/fr/LC_MESSAGES/sphinx.po index 09a7e22c..f258d3d8 100644 --- a/ablog/locales/fr/LC_MESSAGES/sphinx.po +++ b/ablog/locales/fr/LC_MESSAGES/sphinx.po @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" -#: ablog/post.py:525 ablog/templates/authors.html:2 +#: ablog/post.py:525 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Auteurs" @@ -26,7 +26,7 @@ msgstr "Auteurs" msgid "Posts by" msgstr "Billets par" -#: ablog/post.py:526 ablog/templates/locations.html:2 +#: ablog/post.py:526 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "Lieux" @@ -34,7 +34,7 @@ msgstr "Lieux" msgid "Posts from" msgstr "Billets depuis" -#: ablog/post.py:527 ablog/templates/languages.html:2 +#: ablog/post.py:527 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "Langues" @@ -42,7 +42,7 @@ msgstr "Langues" msgid "Posts in" msgstr "Billets dans" -#: ablog/post.py:528 ablog/templates/categories.html:2 +#: ablog/post.py:528 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "Catégories" @@ -54,8 +54,8 @@ msgstr "Tous les billets" msgid "Posted in" msgstr "Publié dans" -#: ablog/post.py:530 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:530 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Tags" @@ -75,46 +75,46 @@ msgstr "Tous les billets" msgid "Drafts" msgstr "Brouillons" -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "Archives" -#: ablog/templates/collection.html:48 +#: ablog/templates/ablog/collection.html:48 msgid "Read more ..." msgstr "Lire plus…" -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "Mis à jour" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "Auteur" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "Lieu" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "Langue" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "Catégorie" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "Tag" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "Précédent" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "Suivant" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "Billets récents" diff --git a/ablog/locales/ru/LC_MESSAGES/sphinx.po b/ablog/locales/ru/LC_MESSAGES/sphinx.po index 63edab0a..d117a471 100644 --- a/ablog/locales/ru/LC_MESSAGES/sphinx.po +++ b/ablog/locales/ru/LC_MESSAGES/sphinx.po @@ -23,7 +23,7 @@ msgstr "" msgid "Updated on" msgstr "Обновлено" -#: ablog/post.py:387 ablog/templates/authors.html:2 +#: ablog/post.py:387 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Авторы" @@ -31,7 +31,7 @@ msgstr "Авторы" msgid "Posts by" msgstr "Опубликовано" -#: ablog/post.py:388 ablog/templates/locations.html:2 +#: ablog/post.py:388 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "" @@ -39,7 +39,7 @@ msgstr "" msgid "Posts from" msgstr "Сообщения из" -#: ablog/post.py:389 ablog/templates/languages.html:2 +#: ablog/post.py:389 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "Языки" @@ -47,7 +47,7 @@ msgstr "Языки" msgid "Posts in" msgstr "Сообщений в" -#: ablog/post.py:390 ablog/templates/categories.html:2 +#: ablog/post.py:390 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "Категории" @@ -59,8 +59,8 @@ msgstr "Все записи" msgid "Posted in" msgstr "Опубликовано в" -#: ablog/post.py:392 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:392 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Теги" @@ -72,46 +72,46 @@ msgstr "Сообщения с тегом" msgid "Drafts" msgstr "Черновик" -#: ablog/templates/archive.html:49 +#: ablog/templates/ablog/archive.html:49 msgid "Read more ..." msgstr "Читать ..." -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "Архив" -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "Обновить" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "Автор" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "Расположение" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "Язык" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "Категория" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "Тег" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "Предыдущий" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "Следующий" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "Недавние Записи" diff --git a/ablog/locales/tr/LC_MESSAGES/sphinx.po b/ablog/locales/tr/LC_MESSAGES/sphinx.po index bd79826f..8652d2e5 100644 --- a/ablog/locales/tr/LC_MESSAGES/sphinx.po +++ b/ablog/locales/tr/LC_MESSAGES/sphinx.po @@ -21,7 +21,7 @@ msgstr "" msgid "Updated on" msgstr "Güncelleme" -#: ablog/post.py:387 ablog/templates/authors.html:2 +#: ablog/post.py:387 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "Yazarlar" @@ -29,7 +29,7 @@ msgstr "Yazarlar" msgid "Posts by" msgstr "Yazar" -#: ablog/post.py:388 ablog/templates/locations.html:2 +#: ablog/post.py:388 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "Mevkiler" @@ -37,7 +37,7 @@ msgstr "Mevkiler" msgid "Posts from" msgstr "Mevki" -#: ablog/post.py:389 ablog/templates/languages.html:2 +#: ablog/post.py:389 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "Diller" @@ -45,7 +45,7 @@ msgstr "Diller" msgid "Posts in" msgstr "Kategori" -#: ablog/post.py:390 ablog/templates/categories.html:2 +#: ablog/post.py:390 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "Kategoriler" @@ -57,8 +57,8 @@ msgstr "Bütün yazılar" msgid "Posted in" msgstr "Sene" -#: ablog/post.py:392 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:392 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "Etiketler" @@ -70,46 +70,46 @@ msgstr "Etiket" msgid "Drafts" msgstr "Taslaklar" -#: ablog/templates/archive.html:49 +#: ablog/templates/ablog/archive.html:49 msgid "Read more ..." msgstr "Okumaya devam et ..." -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "Arşiv" -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "Güncelleme" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "Yazar" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "Mevki" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "Dil" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "Kategori" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "Etiket" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "Önceki" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "Sonraki" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "Yeni Yazılar" diff --git a/ablog/locales/zh_CN/LC_MESSAGES/sphinx.po b/ablog/locales/zh_CN/LC_MESSAGES/sphinx.po index 588e32d4..7f213e8d 100644 --- a/ablog/locales/zh_CN/LC_MESSAGES/sphinx.po +++ b/ablog/locales/zh_CN/LC_MESSAGES/sphinx.po @@ -18,7 +18,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.7.0\n" -#: ablog/post.py:525 ablog/templates/authors.html:2 +#: ablog/post.py:525 ablog/templates/ablog/authors.html:2 msgid "Authors" msgstr "作者" @@ -26,7 +26,7 @@ msgstr "作者" msgid "Posts by" msgstr "文章" -#: ablog/post.py:526 ablog/templates/locations.html:2 +#: ablog/post.py:526 ablog/templates/ablog/locations.html:2 msgid "Locations" msgstr "地点" @@ -34,7 +34,7 @@ msgstr "地点" msgid "Posts from" msgstr "文章自" -#: ablog/post.py:527 ablog/templates/languages.html:2 +#: ablog/post.py:527 ablog/templates/ablog/languages.html:2 msgid "Languages" msgstr "语言" @@ -42,7 +42,7 @@ msgstr "语言" msgid "Posts in" msgstr "文章:" -#: ablog/post.py:528 ablog/templates/categories.html:2 +#: ablog/post.py:528 ablog/templates/ablog/categories.html:2 msgid "Categories" msgstr "类别" @@ -54,8 +54,8 @@ msgstr "所有文章" msgid "Posted in" msgstr "文章:" -#: ablog/post.py:530 ablog/templates/postcard2.html:43 -#: ablog/templates/tagcloud.html:2 +#: ablog/post.py:530 ablog/templates/ablog/postcard2.html:43 +#: ablog/templates/ablog/tagcloud.html:2 msgid "Tags" msgstr "标签" @@ -75,46 +75,46 @@ msgstr "所有" msgid "Drafts" msgstr "草稿" -#: ablog/templates/archives.html:2 +#: ablog/templates/ablog/archives.html:2 msgid "Archives" msgstr "归档" -#: ablog/templates/collection.html:48 +#: ablog/templates/ablog/collection.html:48 msgid "Read more ..." msgstr "更多 ..." -#: ablog/templates/postcard2.html:2 +#: ablog/templates/ablog/postcard2.html:2 msgid "Update" msgstr "更新" -#: ablog/templates/postcard2.html:7 +#: ablog/templates/ablog/postcard2.html:7 msgid "Author" msgstr "作者" -#: ablog/templates/postcard2.html:16 +#: ablog/templates/ablog/postcard2.html:16 msgid "Location" msgstr "地点" -#: ablog/templates/postcard2.html:25 +#: ablog/templates/ablog/postcard2.html:25 msgid "Language" msgstr "语言" -#: ablog/templates/postcard2.html:34 +#: ablog/templates/ablog/postcard2.html:34 msgid "Category" msgstr "类别" -#: ablog/templates/postcard2.html:44 +#: ablog/templates/ablog/postcard2.html:44 msgid "Tag" msgstr "标签" -#: ablog/templates/postnavy.html:7 +#: ablog/templates/ablog/postnavy.html:7 msgid "Previous" msgstr "上一篇" -#: ablog/templates/postnavy.html:17 +#: ablog/templates/ablog/postnavy.html:17 msgid "Next" msgstr "下一篇" -#: ablog/templates/recentposts.html:2 +#: ablog/templates/ablog/recentposts.html:2 msgid "Recent Posts" msgstr "最近文章" diff --git a/ablog/post.py b/ablog/post.py index 3595302f..3998d5ba 100644 --- a/ablog/post.py +++ b/ablog/post.py @@ -100,6 +100,10 @@ def run(self): return ad +def _split(a): + return {s.strip() for s in a.split(",")} + + class PostListDirective(Directive): """ Handle ``postlist`` directives. @@ -157,7 +161,7 @@ class CheckFrontMatter(SphinxTransform): def apply(self): # Check if page-level metadata has been given - docinfo = list(self.document.traverse(nodes.docinfo)) + docinfo = list(self.document.findall(nodes.docinfo)) if not docinfo: return None docinfo = docinfo[0] diff --git a/ablog/start.py b/ablog/start.py index d0b6d9c7..2f8c579b 100644 --- a/ablog/start.py +++ b/ablog/start.py @@ -216,7 +216,7 @@ def w(t, ls=80): ] # Add any paths that contain templates here, relative to this directory. -templates_path = ["{dot}templates", ablog.get_html_templates_path()] +templates_path = [ablog.get_html_templates_path(), "{dot}templates"] # The suffix(es) of source filenames. source_suffix = "{suffix}" diff --git a/ablog/templates/archives.html b/ablog/templates/ablog/archives.html similarity index 62% rename from ablog/templates/archives.html rename to ablog/templates/ablog/archives.html index 95d4465f..d846d137 100644 --- a/ablog/templates/archives.html +++ b/ablog/templates/ablog/archives.html @@ -1,12 +1,16 @@ {% if ablog.archive %} +

{{ gettext('Archives') }}

+
{% endif %} diff --git a/ablog/templates/authors.html b/ablog/templates/ablog/authors.html similarity index 84% rename from ablog/templates/authors.html rename to ablog/templates/ablog/authors.html index 5ba0c92b..fbf0bf5a 100644 --- a/ablog/templates/authors.html +++ b/ablog/templates/ablog/authors.html @@ -1,4 +1,5 @@ {% if ablog.author %} +

{{ gettext('Authors') }}

+
{% endif %} diff --git a/ablog/templates/ablog/catalog.html b/ablog/templates/ablog/catalog.html new file mode 100644 index 00000000..dc333c60 --- /dev/null +++ b/ablog/templates/ablog/catalog.html @@ -0,0 +1,28 @@ +{%- extends "page.html" %} +{% block body %} +{% for collection in catalog %} +{% if collection %} +
+

+ {{ header }} + {{ collection }} +

+ {% for post in collection %} +
+

+ {% if post.published %} + {{ post.date.strftime(ablog.post_date_format) }} + {% else %} + Draft + {% endif %} + - + {{ post.title }} +

+
+ {% endfor %} +
+{% endif %} +{% endfor %} +{% endblock %} diff --git a/ablog/templates/categories.html b/ablog/templates/ablog/categories.html similarity index 62% rename from ablog/templates/categories.html rename to ablog/templates/ablog/categories.html index 772de52e..5396b0a4 100644 --- a/ablog/templates/categories.html +++ b/ablog/templates/ablog/categories.html @@ -1,12 +1,16 @@ {% if ablog.category %} +

{{ gettext('Categories') }}

+
{% endif %} diff --git a/ablog/templates/ablog/collection.html b/ablog/templates/ablog/collection.html new file mode 100644 index 00000000..4d63718d --- /dev/null +++ b/ablog/templates/ablog/collection.html @@ -0,0 +1,62 @@ +{%- extends "page.html" %} {% block body %} +
+

+ {% if archive_feed and fa %} + + + {% endif %} + {{ header }} + {% if collection.href %} + {{ collection }} + {% else %} + {{ collection }} + {% endif %} +

+ {% if ablog.blog_archive_titles %} + {% for post in collection %} +
+

+ {% if post.published %} + {{ post.date.strftime(ablog.post_date_format) }} + {% else %} + Draft + {% endif %} + - + {{ post.title }} +

+
+ {% endfor %} + {% else %} + {% for post in collection %} +
+

+ {{ post.title }} +

+
    +
  • + {% if post.published %} + {% if fa %} + + {% endif %} + {{ post.date.strftime(ablog.post_date_format) }} + {% else %} + {% if fa %} + + {% endif %} + {% if post.date %} + {{ post.date.strftime(ablog.post_date_format) }} + {% else %} + Draft + {% endif %} + {% endif %} +
  • + {% include "postcard2.html" %} +
+ {{ post.to_html(collection.docname) }} +

{{ _("Read more ...") }}

+
+
+ {% endfor %} + {% endif %} +
+{% endblock %} diff --git a/ablog/templates/languages.html b/ablog/templates/ablog/languages.html similarity index 88% rename from ablog/templates/languages.html rename to ablog/templates/ablog/languages.html index 57f30cf8..fc69e3cd 100644 --- a/ablog/templates/languages.html +++ b/ablog/templates/ablog/languages.html @@ -1,4 +1,5 @@ {% if ablog.language %} +

{{ gettext('Languages') }}

@@ -9,4 +10,5 @@

{% endif %} {% endfor %} +

{% endif %} diff --git a/ablog/templates/locations.html b/ablog/templates/ablog/locations.html similarity index 65% rename from ablog/templates/locations.html rename to ablog/templates/ablog/locations.html index 2ed8c7aa..970593db 100644 --- a/ablog/templates/locations.html +++ b/ablog/templates/ablog/locations.html @@ -1,12 +1,16 @@ {% if ablog.location %} +

{{ gettext('Locations') }}

+
{% endif %} diff --git a/ablog/templates/ablog/page.html b/ablog/templates/ablog/page.html new file mode 100644 index 00000000..08238bae --- /dev/null +++ b/ablog/templates/ablog/page.html @@ -0,0 +1,60 @@ +{%- extends "layout.html" %} +{% set fa = ablog.fontawesome %} +{%- block extrahead %} +{{ super() }} +{% if feed_path %} + +{% endif %} +{% if ablog.fontawesome_link_cdn%} + +{% elif ablog.fontawesome_css_file %} + +{% endif %} +{% endblock %} +{% block body %} +{{ body }} +
+ {% if pagename in ablog %} + {% include "postnavy.html" %} + {% endif %} + {% if ablog.disqus_shortname and ablog.blog_baseurl and (not ablog[pagename].nocomments) and ((pagename in ablog and (ablog[pagename].published or ablog.disqus_drafts)) or (not pagename in ablog and ablog.disqus_pages)) %} +
+

Comments

+
+ + + + comments powered by Disqus + +
+ {% endif %} +
+{% endblock %} diff --git a/ablog/templates/ablog/postcard.html b/ablog/templates/ablog/postcard.html new file mode 100644 index 00000000..92d3a1fe --- /dev/null +++ b/ablog/templates/ablog/postcard.html @@ -0,0 +1,26 @@ +{% if pagename in ablog %} +
+{% set fa = ablog.fontawesome %} +{% set post = ablog[pagename] %} +

+ {% if post.published %} + {% if fa %} + + {% endif %} + {{ post.date.strftime(ablog.post_date_format) }} + {% else %} + {% if fa %} + + {% endif %} + {% if post.date %} + {{ post.date.strftime(ablog.post_date_format)}} + {% else %} + Draft + {% endif %} + {% endif %} +

+ +
+{% endif %} diff --git a/ablog/templates/ablog/postcard2.html b/ablog/templates/ablog/postcard2.html new file mode 100644 index 00000000..163f2cfb --- /dev/null +++ b/ablog/templates/ablog/postcard2.html @@ -0,0 +1,165 @@ +{% if post.published and post.date != post.update %} +
+
  • + + {% if fa %} + + {% else %} + {{gettext('Update') }}: + {% endif %} + + {{ post.update.strftime(ablog.post_date_format) }} +
  • +{% endif %} +{% if post.author %} +
  • + + {% if fa %} + + {% else %} + {{ gettext('Author')}}: + {% endif %} + + {% for coll in post.author %} + {% if coll|length %} + {{ coll }} + {% if loop.index < post.author|length %} + , + {% endif %} + {% else %} + {{ coll }} + {% if loop.index < post.author|length %} + , + {% endif %} + {% endif %} + {% endfor %} +
  • +{% endif %} +{% if post.location %} +
  • + + {% if fa %} + + {% else %} + {{gettext('Location') }}: + {% endif %} + + {% for coll in post.location %} + {% if coll|length %} + {{ coll }} + {% if loop.index < post.location|length %} + , + {% endif %} + {% else %} + {{ coll }} + {% if loop.index < post.location|length %} + , + {% endif %} + {% endif %} + {% endfor %} +
  • +{% endif %} +{% if post.language %} +
  • + + {% if fa %} + + {% else %} + {{gettext('Language') }}: + {% endif %} + + {% for coll in post.language %} + {% if coll|length %} + {{ coll }} + {% if loop.index < post.language|length %} + , + {% endif %} + {% else %} + {{ coll }} + {% if loop.index < post.language|length %} + , + {% endif %} + {% endif %} + {% endfor %} +
  • +{% endif %} +{% if post.category %} +
  • + + {% if fa %} + + {% else %} + {{ gettext('Category') }}: + {% endif %} + + {% for coll in post.category %} + {% if coll|length %} + {{ coll }} + {% if loop.index < post.category|length %} + , + {% endif %} + {% else %} + {{ coll }} + {% if loop.index < post.category|length %} + , + {% endif %} + {% endif %} + {% endfor %} +
  • +{% endif %} +{% if post.tags %} +
  • + + {% if post.tags|length > 1 %} + {% if fa %} + + {% else %} + {{ gettext('Tags') }}: + {% endif %} + {% else %} + {% if fa %} + + {% else %} + {{ gettext('Tag') }}: + {% endif %}{% endif %} + + {% for coll in post.tags %} + {% if coll|length %} + {{ coll }} + {% if loop.index < post.tags|length %} + {% endif %} + {% else %} + {{ coll }} + {% if loop.index < post.tags|length %} + {% endif %} + {% endif %} + {% endfor %} +
  • +{% endif %} +{% if ablog.disqus_shortname and (ablog[pagename].published or ablog.disqus_drafts) %} +
  • + + {% if fa %} + + {% endif %} + + {% if not fa %} + Comments + {% endif %} + +
  • +
    +{% endif %} diff --git a/ablog/templates/ablog/postnavy.html b/ablog/templates/ablog/postnavy.html new file mode 100644 index 00000000..b64898bc --- /dev/null +++ b/ablog/templates/ablog/postnavy.html @@ -0,0 +1,33 @@ +{# prev/next are not set for drafts #} +{% set post = ablog[pagename] %} +{% if post.published and ablog.post_show_prev_next %} +
    + + {% if post.prev %} + {% if not ablog.fontawesome %} + {{ gettext('Previous') }}: + {% endif %} + + {% if ablog.fontawesome %} + + {% endif %} + {{ post.prev.title }} + + {% endif %} + +   + + {% if post.next %} + {% if not ablog.fontawesome %} + {{ gettext('Next') }}: + {% endif %} + + {{ post.next.title }} + {% if ablog.fontawesome %} + + {% endif %} + + {% endif %} + +
    +{% endif %} diff --git a/ablog/templates/ablog/recentposts.html b/ablog/templates/ablog/recentposts.html new file mode 100644 index 00000000..fe49c7b6 --- /dev/null +++ b/ablog/templates/ablog/recentposts.html @@ -0,0 +1,17 @@ +{% if ablog %} +
    +

    + {{ gettext('Recent Posts') }} +

    + +
    +{% endif %} diff --git a/ablog/templates/ablog/redirect.html b/ablog/templates/ablog/redirect.html new file mode 100644 index 00000000..baa3af6a --- /dev/null +++ b/ablog/templates/ablog/redirect.html @@ -0,0 +1,8 @@ +{%- extends "!layout.html" %} +{%- block extrahead %} +{{ super() }} + +{% endblock %} +{% block body %} +You are being redirected to {{ post.title }} in {{ ablog.post_redirect_refresh }} seconds; +{% endblock %} diff --git a/ablog/templates/ablog/tagcloud.html b/ablog/templates/ablog/tagcloud.html new file mode 100644 index 00000000..e3ca32f5 --- /dev/null +++ b/ablog/templates/ablog/tagcloud.html @@ -0,0 +1,14 @@ +{% if ablog.tags %} +
    +

    {{ gettext('Tags') }}

    + +
    +{% endif %} diff --git a/ablog/templates/catalog.html b/ablog/templates/catalog.html deleted file mode 100644 index e2769ec1..00000000 --- a/ablog/templates/catalog.html +++ /dev/null @@ -1,26 +0,0 @@ -{%- extends "page.html" %} {% block body %} {% for collection in catalog %} {% -if collection %} -
    -

    - {{ header }} - {{ collection }} -

    - {% for post in collection %} -
    -

    - {% if fa %}{% endif %} {% if post.published %} {{ - post.date.strftime(ablog.post_date_format) }} {% else %} Draft {% endif %} - - - {{ post.title }} -

    - {% if 0 %} -
      - {% include "postcard2.html" %} -
    - {% endif %} -
    - {% endfor %} -
    -{% endif %} {% endfor %} {% endblock %} diff --git a/ablog/templates/collection.html b/ablog/templates/collection.html deleted file mode 100644 index 8c07b451..00000000 --- a/ablog/templates/collection.html +++ /dev/null @@ -1,52 +0,0 @@ -{%- extends "page.html" %} {% block body %} -
    -

    - {% if archive_feed and fa %} - {% endif %} {{ header }} {% if collection.href %} - {{ collection }} - {% else %} {{ collection }} {% endif %} -

    - {% if ablog.blog_archive_titles %} {% for post in collection %} -
    -

    - {% if fa %}{% endif %} {% if post.published %} {{ - post.date.strftime(ablog.post_date_format) }} {% else %} Draft {% endif %} - - - {{ post.title }} -

    - {% if 0 %} -
      - {% include "postcard2.html" %} -
    - {% endif %} -
    - {% endfor %} {% else %} {% for post in collection %} - -
    -

    - {{ post.title }} -

    - -
      -
    • - {% if post.published %} {% if fa %}{% - endif %} {{ post.date.strftime(ablog.post_date_format) }} {% else %} {% - if fa %}{% endif %} {% if post.date %}{{ - post.date.strftime(ablog.post_date_format) }} {% else %} Draft {% endif - %} {% endif %} -
    • - {% include "postcard2.html" %} -
    - {{ post.to_html(collection.docname) }} -

    {{ _("Read more ...") }}

    -
    -
    - {% endfor %} {% endif %} -
    -{% endblock %} diff --git a/ablog/templates/page.html b/ablog/templates/page.html deleted file mode 100644 index 4c765364..00000000 --- a/ablog/templates/page.html +++ /dev/null @@ -1,81 +0,0 @@ -{%- extends "layout.html" %} {% set fa = ablog.fontawesome %} {%- block -extrahead %} {{ super() }} {% if feed_path %} - -{% endif %} {% if ablog.fontawesome_link_cdn%} - -{% elif ablog.fontawesome_css_file %} - -{% endif %} - -{% endblock %} {% block body %} {{ body }} -
    - {% if pagename in ablog %} {% include "postnavy.html" %} {% endif %} {% if - ablog.disqus_shortname and ablog.blog_baseurl and (not - ablog[pagename].nocomments) and ((pagename in ablog and - (ablog[pagename].published or ablog.disqus_drafts)) or (not pagename in ablog - and ablog.disqus_pages)) %} -
    -

    Comments

    -
    - - - comments powered by Disqus -
    - {% endif %} -
    -{% endblock %} diff --git a/ablog/templates/postcard.html b/ablog/templates/postcard.html deleted file mode 100644 index 2d1ddea4..00000000 --- a/ablog/templates/postcard.html +++ /dev/null @@ -1,15 +0,0 @@ -{% if pagename in ablog %} {% set fa = ablog.fontawesome %} {% set post = -ablog[pagename] %} -

    - {% if post.published %} {% if fa %}{% endif %} - {{ post.date.strftime(ablog.post_date_format) }} {% else %} {% if fa %}{% endif %} {% if post.date %}{{ post.date.strftime(ablog.post_date_format) - }} {% else %} Draft {% endif %} {% endif %} -

    - - -{% endif %} diff --git a/ablog/templates/postcard2.html b/ablog/templates/postcard2.html deleted file mode 100644 index 7329d575..00000000 --- a/ablog/templates/postcard2.html +++ /dev/null @@ -1,94 +0,0 @@ -{% if post.published and post.date != post.update %} -
  • - {% if fa %}{% else %}{{ - gettext('Update') }}:{% endif %} - {{ post.update.strftime(ablog.post_date_format) }} -
  • -{% endif %} {% if post.author %} -
  • - {% if fa %}{% else %}{{ gettext('Author') - }}:{% endif %} - {% for coll in post.author %} {% if coll|length %} - {{ coll }}{% if loop.index < - post.author|length %},{% endif %} {% else %}{{ coll }}{% if loop.index < - post.author|length %},{% endif %}{% endif %} {% endfor %} -
  • -{% endif %} {% if post.location %} -
  • - {% if fa %}{% else %}{{ - gettext('Location') }}:{% endif %} - {% for coll in post.location %} {% if coll|length %} - {{ coll }}{% if loop.index < - post.location|length %},{% endif %} {% else %}{{ coll }}{% if loop.index < - post.location|length %},{% endif %}{% endif %} {% endfor %} -
  • -{% endif %} {% if post.language %} -
  • - {% if fa %}{% else %}{{ - gettext('Language') }}:{% endif %} - {% for coll in post.language %} {% if coll|length %} - {{ coll }}{% if loop.index < - post.language|length %},{% endif %} {% else %}{{ coll }}{% if loop.index < - post.language|length %},{% endif %}{% endif %} {% endfor %} -
  • -{% endif %} {% if post.category %} -
  • - {% if fa %}{% else %}{{ - gettext('Category') }}:{% endif %} - {% for coll in post.category %} {% if coll|length %} - {{ coll }}{% if loop.index < - post.category|length %},{% endif %} {% else %}{{ coll }}{% if loop.index < - post.category|length %},{% endif %}{% endif %} {% endfor %} -
  • -{% endif %} {% if post.tags %} -
  • - {% if post.tags|length > 1 %}{% if fa %}{% - else %}{{ gettext('Tags') }}:{% endif %} {% else %}{% if fa %}{% else %}{{ gettext('Tag') }}:{% endif %}{% endif %} - {% for coll in post.tags %} {% if coll|length %} - {{ coll }}{% if loop.index < - post.tags|length %}{% endif %} {% else %}{{ coll }}{% if loop.index < - post.tags|length %}{% endif %}{% endif %} {% endfor %} -
  • -{% endif %} {% if ablog.disqus_shortname and (ablog[pagename].published or -ablog.disqus_drafts) %} -
  • - - {% if fa %}{% endif %} - - {% if not fa %}Comments{% endif %} -
  • -{% endif %} diff --git a/ablog/templates/postnavy.html b/ablog/templates/postnavy.html deleted file mode 100644 index a39f69ed..00000000 --- a/ablog/templates/postnavy.html +++ /dev/null @@ -1,26 +0,0 @@ -{# prev/next are not set for drafts #} {% set post = ablog[pagename] %} -{% if post.published and ablog.post_show_prev_next %} -
    - - {% if post.prev %} {% if not ablog.fontawesome %}{{ gettext('Previous') }}: - {% endif %} - - {% if ablog.fontawesome %}{% endif - %} {{ post.prev.title }} - - {% endif %} - -   - - {% if post.next %} {% if not ablog.fontawesome %}{{ gettext('Next') }}: {% - endif %} - - {{ post.next.title }} {% if ablog.fontawesome %}{% endif %} - - {% endif %} - -
    -{% endif %} diff --git a/ablog/templates/recentposts.html b/ablog/templates/recentposts.html deleted file mode 100644 index 3f738711..00000000 --- a/ablog/templates/recentposts.html +++ /dev/null @@ -1,15 +0,0 @@ -{% if ablog %} -

    - {{ gettext('Recent Posts') }} -

    - -{% endif %} diff --git a/ablog/templates/redirect.html b/ablog/templates/redirect.html deleted file mode 100644 index f8e25705..00000000 --- a/ablog/templates/redirect.html +++ /dev/null @@ -1,8 +0,0 @@ -{%- extends "!layout.html" %} {%- block extrahead %} {{ super() }} - -{% endblock %} {% block body %} You are being redirected to -{{ post.title }} in {{ -ablog.post_redirect_refresh }} seconds; {% endblock %} diff --git a/ablog/templates/tagcloud.html b/ablog/templates/tagcloud.html deleted file mode 100644 index fac869db..00000000 --- a/ablog/templates/tagcloud.html +++ /dev/null @@ -1,41 +0,0 @@ -{% if ablog.tags %} -

    {{ gettext('Tags') }}

    - - -{% endif %} diff --git a/docs/release/ablog-v0.11-released.rst b/docs/release/ablog-v0.11-released.rst new file mode 100644 index 00000000..33804116 --- /dev/null +++ b/docs/release/ablog-v0.11-released.rst @@ -0,0 +1,23 @@ +ABlog v0.11 released +==================== + +.. post:: july 25, 2022 + :author: Nabil Freij + :category: Release + :location: World + +ABlog v0.11 is released with the main focus being to update and tweak the HTML templates allow themes to override the default templates. +In addition, all ablog elements in the templates wrapped in ``ablog__*`` divs to allow custom CSS rules. + +Added support for external links to be posts. + +There are several breaking changes: + +- 1. The template files are now in the `templates/ablog` folder. +- 2. In theory ablog will now append the tempaltes to the start of the template list, this could break themes without support for it. + +Pull Requests merged in: + +`Template rework `__. + +`Add external links for posts `__ from `Chris Holdgraf `__. diff --git a/setup.py b/setup.py index 323297c5..103e2be3 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ message_extractors={ "ablog": [ ("**.py", "python", None), - ("templates/**.html", "jinja2", None), + ("templates/ablog/**.html", "jinja2", None), ], }, )