diff --git a/content/blog/2012-02-08_vertical_bars_in_graphite.rst b/content/blog/2012-02-08_vertical_bars_in_graphite.rst index f41fc8a..696fd7e 100644 --- a/content/blog/2012-02-08_vertical_bars_in_graphite.rst +++ b/content/blog/2012-02-08_vertical_bars_in_graphite.rst @@ -3,7 +3,7 @@ Vertical Bars In Graphite :date: 2012-02-08 15:10 :author: tyrel :category: Tech -:tags: graphite, txStatsD +:tags: graphite, statsd :slug: vertical-bars-in-graphite :status: published diff --git a/content/blog/2012-11-07_cfengine3-install-on-centos-5-7.rst b/content/blog/2012-11-07_cfengine3-install-on-centos-5-7.rst index ea5330b..751ba7d 100644 --- a/content/blog/2012-11-07_cfengine3-install-on-centos-5-7.rst +++ b/content/blog/2012-11-07_cfengine3-install-on-centos-5-7.rst @@ -2,7 +2,7 @@ CFEngine3 Install on CentOS 5.7 ############################### :date: 2012-05-25 03:57 :author: tyrel -:category: outdated +:category: Outdated :tags: cfengine, centos :slug: cfengine3-install-on-centos-5-7 :status: published diff --git a/content/blog/2022-01-09_garage-door-opener.rst b/content/blog/2022-01-09_garage-door-opener.rst index 88604fa..0ed7321 100644 --- a/content/blog/2022-01-09_garage-door-opener.rst +++ b/content/blog/2022-01-09_garage-door-opener.rst @@ -2,8 +2,8 @@ Garage Door Opener ################## :date: 2022-01-09 22:46 :author: tyrel -:category: Tech, -:tags: HomeAssistant, home +:category: Tech +:tags: home-assistant, home :slug: garage-door-opener :status: published diff --git a/content/blog/2022-10-17_comparing-go-gorm-and-sqlx.rst b/content/blog/2022-10-17_comparing-go-gorm-and-sqlx.rst index c2aedac..9bab31e 100644 --- a/content/blog/2022-10-17_comparing-go-gorm-and-sqlx.rst +++ b/content/blog/2022-10-17_comparing-go-gorm-and-sqlx.rst @@ -19,13 +19,13 @@ You can do about 95% of your database queries automatically by using the ORM. .. code:: python - entry, created = Entry.objects.get_or_create(headline="blah blah blah") + entry, created = Entry.objects.get_or_create(headline="blah blah blah") .. code:: python - q = Entry.objects.filter(headline__startswith="What") - q = q.filter(pub_date__lte=datetime.date.today()) - q = q.exclude(body_text__icontains="food") + q = Entry.objects.filter(headline__startswith="What") + q = q.filter(pub_date__lte=datetime.date.today()) + q = q.exclude(body_text__icontains="food") Above are some samples from the DjangoDocs. But enough about Django. diff --git a/content/pages/about.rst b/content/pages/about.rst index 1a2d324..72513a4 100644 --- a/content/pages/about.rst +++ b/content/pages/about.rst @@ -6,9 +6,17 @@ About :slug: about :status: published +About Tyrel +=========== Senior Software Engineer with a back end focus. Specializing in Python and Go. Iā€™m a very infrequent blogger. I will go months without any posts, some time years. + + +Site notes +~~~~~~~~~~ + +This blog is proudly powered by `Pelican `_, which takes great advantage of Python. diff --git a/pelicanconf.py b/pelicanconf.py index f86aa2c..f4b2502 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -2,16 +2,18 @@ from pathlib import Path pwd = Path.cwd() AUTHOR = 'Tyrel Souza' -SITENAME = "Tyrel Souza's Blog" +SITENAME = "Tyrel's Blog" TWITTER_USERNAME = 'tyrelsouza' SITEURL = '' -SITESUBTITLE = 'Code, Tech, Home Automation, Personal Blog' +SITESUBTITLE = 'Code, Tech, Automation' + +SITEBASE = "" MENUITEMS = [ - ('Home', '/blog/'), - ('Tags', '/blog/tags.html'), - ('Categories', '/blog/categories.html'), + ('Home', f'{SITEBASE}/'), + ('Tags', f'{SITEBASE}/tags.html'), + ('Categories', f'{SITEBASE}/categories.html'), ] LINKS = ( ('Code', 'https://gitea.tyrel.dev/'), @@ -40,10 +42,15 @@ TRANSLATION_FEED_ATOM = None AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None +FEED_ATOM = 'tyrel-dev.atom.xml' +FEED_RSS = 'tyrel-dev.rss' +FEED_ALL_ATOM = 'tyrel-dev.all.xml' +FEED_ALL_RSS = 'tyrel-dev.all.rss' -PLUGINS = [ ] -DEFAULT_PAGINATION = 10 +PLUGINS = ["webassets"] + +DEFAULT_PAGINATION = False DISPLAY_CATEGORIES_ON_MENU = False DELETE_OUTPUT_DIRECTORY = True @@ -65,4 +72,4 @@ DEFAULT_METADATA = { 'extras/favicon.ico': {'path': 'favicon.ico'}, } -THEME = "./themes/custom" +THEME = "./themes/simple" diff --git a/publishconf.py b/publishconf.py index 5abf65e..42fe53b 100644 --- a/publishconf.py +++ b/publishconf.py @@ -5,6 +5,7 @@ import os import sys sys.path.append(os.curdir) from pelicanconf import * +SITEBASE = "/blog" # If your site is available via HTTPS, make sure SITEURL begins with https:// SITEURL = 'https://tyrel.dev/blog' diff --git a/requirements.txt b/requirements.txt index 755e7d7..41fd45a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,3 +21,7 @@ soupsieve==2.3.2.post1 Unidecode==1.3.6 python-slugify + +webassets==2.0 +libsass==0.21.0 +livereload==2.6.3 diff --git a/themes/simple/static/css/main.css b/themes/simple/static/css/main.css new file mode 100644 index 0000000..fcbe9aa --- /dev/null +++ b/themes/simple/static/css/main.css @@ -0,0 +1,113 @@ +@import url("reset.css"); +@import url("pygment.css"); + +body { + font-family: 'Lato', 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + line-height: 1.429; + margin: 0; + padding: 0; + text-align: left; + min-height: 95vh; +} +p { + color: rgb(131, 148, 150); + margin: 0 10 0 10; + padding-left: 0.75rem; + line-height: 1.2rem; + font-size: 14px; + text-align: left +} + +.literal { + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #BCBEC0; + padding: 2px; + font:12px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace +} + +.literal-block { + width: 95%; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + background-color: #eee8d5; + border: 1px solid #BCBEC0; + padding: 0.5rem; + margin: 0.75rem; + font:12px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace +} + + +article h2 { + line-height: 2rem; +} +article ul { + margin-left: 1rem; +} + +.caps {font-size:.92em;} +.amp {color:#666; font-size:1.05em;font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua",serif; font-style:italic;} +.dquo {margin-left:-.38em;} + + +.parent-panel { padding-left:20%;width:100%; } +.right-panel { position:relative;float:left;width:100%; } +.right-panel-content { + max-width: 60%; + border-left: 2px dashed #b58900; + min-height: 96vh; + padding-left: 0.75rem; + +} +.right-panel-content img { + margin: 1rem; + max-width: 50rem; +} +.left-panel { + position:relative; + float:left; + width:20%; + right:20%; + margin-left:-101%; + text-align:right; +} + +.small { + font-size: 0.75rem; +} + +.article-list-title { + font-size: 1.25rem; +} + +hr { + border: 2px dotted #b58900;; + border-style: none none dashed; +} + +.tags { + float: right; +} + +hr.end { + padding-top: 1rem; +} + +.indent { + font-size: 0.6rem; + margin-left: 5.1rem; + /*border-bottom: 2px dotted #b58900;*/ +} + +h3.entry-title{ + border-bottom: 1px dotted #b58900; + padding-bottom: 0.25rem; +} + +.permalink { + float:right; +} + +a:link.permalink { text-decoration: none; } diff --git a/themes/simple/static/css/pygment.css b/themes/simple/static/css/pygment.css new file mode 100644 index 0000000..fdd056f --- /dev/null +++ b/themes/simple/static/css/pygment.css @@ -0,0 +1,205 @@ +.hll { +background-color:#eee; +} +.c { +color:#408090; +font-style:italic; +} +.err { +border:1px solid #FF0000; +} +.k { +color:#007020; +font-weight:bold; +} +.o { +color:#666666; +} +.cm { +color:#408090; +font-style:italic; +} +.cp { +color:#007020; +} +.c1 { +color:#408090; +font-style:italic; +} +.cs { +background-color:#FFF0F0; +color:#408090; +} +.gd { +color:#A00000; +} +.ge { +font-style:italic; +} +.gr { +color:#FF0000; +} +.gh { +color:#000080; +font-weight:bold; +} +.gi { +color:#00A000; +} +.go { +color:#303030; +} +.gp { +color:#C65D09; +font-weight:bold; +} +.gs { +font-weight:bold; +} +.gu { +color:#800080; +font-weight:bold; +} +.gt { +color:#0040D0; +} +.kc { +color:#007020; +font-weight:bold; +} +.kd { +color:#007020; +font-weight:bold; +} +.kn { +color:#007020; +font-weight:bold; +} +.kp { +color:#007020; +} +.kr { +color:#007020; +font-weight:bold; +} +.kt { +color:#902000; +} +.m { +color:#208050; +} +.s { +color:#4070A0; +} +.na { +color:#4070A0; +} +.nb { +color:#007020; +} +.nc { +color:#0E84B5; +font-weight:bold; +} +.no { +color:#60ADD5; +} +.nd { +color:#555555; +font-weight:bold; +} +.ni { +color:#D55537; +font-weight:bold; +} +.ne { +color:#007020; +} +.nf { +color:#06287E; +} +.nl { +color:#002070; +font-weight:bold; +} +.nn { +color:#0E84B5; +font-weight:bold; +} +.nt { +color:#062873; +font-weight:bold; +} +.nv { +color:#BB60D5; +} +.ow { +color:#007020; +font-weight:bold; +} +.w { +color:#BBBBBB; +} +.mf { +color:#208050; +} +.mh { +color:#208050; +} +.mi { +color:#208050; +} +.mo { +color:#208050; +} +.sb { +color:#4070A0; +} +.sc { +color:#4070A0; +} +.sd { +color:#4070A0; +font-style:italic; +} +.s2 { +color:#4070A0; +} +.se { +color:#4070A0; +font-weight:bold; +} +.sh { +color:#4070A0; +} +.si { +color:#70A0D0; +font-style:italic; +} +.sx { +color:#C65D09; +} +.sr { +color:#235388; +} +.s1 { +color:#4070A0; +} +.ss { +color:#517918; +} +.bp { +color:#007020; +} +.vc { +color:#BB60D5; +} +.vg { +color:#BB60D5; +} +.vi { +color:#BB60D5; +} +.il { +color:#208050; +} diff --git a/themes/simple/static/css/reset.css b/themes/simple/static/css/reset.css new file mode 100644 index 0000000..f5123cf --- /dev/null +++ b/themes/simple/static/css/reset.css @@ -0,0 +1,52 @@ +/* + Name: Reset Stylesheet + Description: Resets browser's default CSS + Author: Eric Meyer + Author URI: https://meyerweb.com/eric/tools/css/reset/ +*/ + +/* v1.0 | 20080212 */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + background: transparent; + border: 0; + font-size: 100%; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; +} + +body {line-height: 1;} + +ol, ul {list-style: none;} + +blockquote, q {quotes: none;} + +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins {text-decoration: none;} +del {text-decoration: line-through;} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/themes/simple/static/css/solarized.scss b/themes/simple/static/css/solarized.scss new file mode 100644 index 0000000..2916849 --- /dev/null +++ b/themes/simple/static/css/solarized.scss @@ -0,0 +1,300 @@ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} +audio, +canvas, +video { + display: inline-block; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden] { + display: none; +} +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +a:focus { + outline: thin dotted; +} +a:active, +a:hover { + outline: 0; +} +h1 { + font-size: 2em; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +mark { + background: #ff0; + color: #000; +} +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} +pre { + white-space: pre-wrap; + word-wrap: break-word; +} +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 0; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +legend { + border: 0; + padding: 0; +} +button, +input, +select, +textarea { + font-family: inherit; + font-size: 100%; + margin: 0; +} +button, +input { + line-height: normal; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +input[disabled] { + cursor: default; +} +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +textarea { + overflow: auto; + vertical-align: top; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +html { + font-family: 'PT Sans', sans-serif; +} +pre, +code { + font-family: 'Inconsolata', sans-serif; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: 'PT Sans Narrow', sans-serif; + font-weight: 700; +} +html { + background-color: #002b36; + color: #839496; + margin: 1em; +} +body { + margin: 0 auto; + /*border: 1pt solid #586e75; */ + padding: 1em; +} +code { + background-color: #073642; + padding: 2px; +} +a { + color: #cb4b16; +} +a:visited { + color: #cb4b16; +} +a:hover { + color: #cb4b16; +} +h1 { + color: #d33682; +} +h2, +h3, +h4, +h5, +h6 { + color: #859900; +} +pre { + background-color: #002b36; + color: #839496; + border: 1pt solid #586e75; + padding: 1em; + box-shadow: 5pt 5pt 8pt #073642; +} +pre code { + background-color: #002b36; +} +/*h1 { + font-size: 2.8em; +} +h2 { + font-size: 2.4em; +} +h3 { + font-size: 1.8em; +} +h4 { + font-size: 1.4em; +} +h5 { + font-size: 1.3em; +} +h6 { + font-size: 1.15em; +} +*/ +.tag { + background-color: #073642; + color: #d33682; + padding: 0 0.2em; +} +.todo, +.next, +.done { + color: #002b36; + background-color: #dc322f; + padding: 0 0.2em; +} +.tag { + -webkit-border-radius: 0.35em; + -moz-border-radius: 0.35em; + border-radius: 0.35em; +} +.TODO { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #2aa198; +} +.NEXT { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #268bd2; +} +.ACTIVE { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #268bd2; +} +.DONE { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #859900; +} +.WAITING { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #cb4b16; +} +.HOLD { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #d33682; +} +.NOTE { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #d33682; +} +.CANCELLED { + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + background-color: #859900; +} + diff --git a/themes/simple/templates/archives.html b/themes/simple/templates/archives.html new file mode 100644 index 0000000..d23baa8 --- /dev/null +++ b/themes/simple/templates/archives.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Archives{% endblock %} + +{% block content %} +

Archives for {{ SITENAME }}

+
+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/themes/simple/templates/article.html b/themes/simple/templates/article.html new file mode 100644 index 0000000..ea419b2 --- /dev/null +++ b/themes/simple/templates/article.html @@ -0,0 +1,62 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ article.title|striptags }}{% endblock %} + +{% block head %} + {{ super() }} + + {% import 'translations.html' as translations with context %} + {% if translations.entry_hreflang(article) %} + {{ translations.entry_hreflang(article) }} + {% endif %} + + {% if article.description %} + + {% endif %} + + {% for tag in article.tags %} + + {% endfor %} + +{% endblock %} + +{% block content %} +
+

+ {{ article.title }} +

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
+
+ + +
+
+ {{ article.content }} +
+{% endblock %} diff --git a/themes/simple/templates/author.html b/themes/simple/templates/author.html new file mode 100644 index 0000000..79d22c7 --- /dev/null +++ b/themes/simple/templates/author.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} + +{% block content_title %} +

Articles by {{ author }}

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

Authors on {{ SITENAME }}

+ +{% endblock %} diff --git a/themes/simple/templates/base.html b/themes/simple/templates/base.html new file mode 100644 index 0000000..467b3cc --- /dev/null +++ b/themes/simple/templates/base.html @@ -0,0 +1,102 @@ + + + + {% 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 %} + + {% assets filters="libsass", output="css/solarized.css", "css/solarized.scss" %} + + {% endassets %} + + + +
+
+
+
+ {% block content %} + {% endblock %} +
+
+
+
+
+

{{ SITENAME }}

+ {% if SITESUBTITLE %}

{{ SITESUBTITLE }}

{% endif %} +
+ + {% if LINKS %} +
+

{{ LINKS_WIDGET_NAME | default('EXTERNAL LINKS') }}

+
    + {% for name, link in LINKS %} +
  • {{ name }}
  • + {% endfor %} +
+
+ {% endif %} + {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %} + + {% endif %} +
+
+
+ + diff --git a/themes/simple/templates/categories.html b/themes/simple/templates/categories.html new file mode 100644 index 0000000..3738972 --- /dev/null +++ b/themes/simple/templates/categories.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Categories{% endblock %} + +{% block content %} +

Categories on {{ SITENAME }}

+
+ +{% endblock %} diff --git a/themes/simple/templates/category.html b/themes/simple/templates/category.html new file mode 100644 index 0000000..5f3ab2d --- /dev/null +++ b/themes/simple/templates/category.html @@ -0,0 +1,9 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - {{ category }} category{% endblock %} + +{% block content_title %} +

Articles in the {{ category }} category

+
+{% endblock %} + diff --git a/themes/simple/templates/gosquared.html b/themes/simple/templates/gosquared.html new file mode 100644 index 0000000..49ccbbe --- /dev/null +++ b/themes/simple/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} + +{% endif %} diff --git a/themes/simple/templates/index.html b/themes/simple/templates/index.html new file mode 100644 index 0000000..c6b6c61 --- /dev/null +++ b/themes/simple/templates/index.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% block content %} +
+{% block content_title %} +

All articles

+
+{% endblock %} + + +{% if articles_page.has_other_pages() %} + {% include 'pagination.html' %} +{% endif %} +
+{% endblock content %} diff --git a/themes/simple/templates/page.html b/themes/simple/templates/page.html new file mode 100644 index 0000000..c4e53fd --- /dev/null +++ b/themes/simple/templates/page.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% block html_lang %}{{ page.lang }}{% endblock %} + +{% block title %}{{ SITENAME }} - {{ page.title|striptags }}{%endblock%} + +{% block head %} + {{ super() }} + + {% import 'translations.html' as translations with context %} + {% if translations.entry_hreflang(page) %} + {{ translations.entry_hreflang(page) }} + {% endif %} +{% 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/themes/simple/templates/pagination.html b/themes/simple/templates/pagination.html new file mode 100644 index 0000000..588f130 --- /dev/null +++ b/themes/simple/templates/pagination.html @@ -0,0 +1,15 @@ +{% if DEFAULT_PAGINATION %} +{% set first_page = articles_paginator.page(1) %} +{% set last_page = articles_paginator.page(articles_paginator.num_pages) %} +

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

+{% endif %} diff --git a/themes/simple/templates/period_archives.html b/themes/simple/templates/period_archives.html new file mode 100644 index 0000000..e1ddf62 --- /dev/null +++ b/themes/simple/templates/period_archives.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - {{ period | reverse | join(' ') }} archives{% endblock %} + +{% block content %} +

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

+ +
+{% for article in dates %} +
{{ article.locale_date }}
+
{{ article.title }}
+{% endfor %} +
+{% endblock %} diff --git a/themes/simple/templates/tag.html b/themes/simple/templates/tag.html new file mode 100644 index 0000000..9387813 --- /dev/null +++ b/themes/simple/templates/tag.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - {{ tag }} tag{% endblock %} + +{% block content_title %} +

Articles tagged with {{ tag }}

+{% endblock %} diff --git a/themes/simple/templates/tags.html b/themes/simple/templates/tags.html new file mode 100644 index 0000000..dab2c42 --- /dev/null +++ b/themes/simple/templates/tags.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}{{ SITENAME }} - Tags{% endblock %} + +{% block content %} +

Tags for {{ SITENAME }}

+
+ +{% endblock %} diff --git a/themes/simple/templates/translations.html b/themes/simple/templates/translations.html new file mode 100644 index 0000000..f0e2478 --- /dev/null +++ b/themes/simple/templates/translations.html @@ -0,0 +1,16 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations %} +{{ translation.lang }} +{% endfor %} +{% endif %} +{% endmacro %} + +{% macro entry_hreflang(entry) %} +{% if entry.translations %} + {% for translation in entry.translations %} + + {% endfor %} +{% endif %} +{% endmacro %}