From a173b791d93d4481437d678433ebe684f744fa52 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Wed, 2 Nov 2022 22:55:14 -0400 Subject: [PATCH 1/4] custom theme simple solarized --- themes/simple/static/css/main.css | 85 ++++++ themes/simple/static/css/pygment.css | 205 +++++++++++++ themes/simple/static/css/reset.css | 52 ++++ themes/simple/static/css/solarized.scss | 300 +++++++++++++++++++ themes/simple/templates/archives.html | 14 + themes/simple/templates/article.html | 61 ++++ themes/simple/templates/author.html | 8 + themes/simple/templates/authors.html | 12 + themes/simple/templates/base.html | 102 +++++++ themes/simple/templates/categories.html | 12 + themes/simple/templates/category.html | 8 + themes/simple/templates/gosquared.html | 14 + themes/simple/templates/index.html | 26 ++ themes/simple/templates/page.html | 27 ++ themes/simple/templates/pagination.html | 15 + themes/simple/templates/period_archives.html | 14 + themes/simple/templates/tag.html | 7 + themes/simple/templates/tags.html | 12 + themes/simple/templates/translations.html | 16 + 19 files changed, 990 insertions(+) create mode 100644 themes/simple/static/css/main.css create mode 100644 themes/simple/static/css/pygment.css create mode 100644 themes/simple/static/css/reset.css create mode 100644 themes/simple/static/css/solarized.scss create mode 100644 themes/simple/templates/archives.html create mode 100644 themes/simple/templates/article.html create mode 100644 themes/simple/templates/author.html create mode 100644 themes/simple/templates/authors.html create mode 100644 themes/simple/templates/base.html create mode 100644 themes/simple/templates/categories.html create mode 100644 themes/simple/templates/category.html create mode 100644 themes/simple/templates/gosquared.html create mode 100644 themes/simple/templates/index.html create mode 100644 themes/simple/templates/page.html create mode 100644 themes/simple/templates/pagination.html create mode 100644 themes/simple/templates/period_archives.html create mode 100644 themes/simple/templates/tag.html create mode 100644 themes/simple/templates/tags.html create mode 100644 themes/simple/templates/translations.html diff --git a/themes/simple/static/css/main.css b/themes/simple/static/css/main.css new file mode 100644 index 0000000..c548fa6 --- /dev/null +++ b/themes/simple/static/css/main.css @@ -0,0 +1,85 @@ +@import url("reset.css"); + +body { + font-size: 87.5%; /* Base font size: 14px */ + font-family: '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; + 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: 100%; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border: 1px solid #BCBEC0; + padding: 0.5rem; + margin: 0.75rem; + font:12px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace +} + +.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 { + 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.article-split { + border: 2px dotted #b58900;; + border-style: none none dashed; +} + +.tags { + float: right; +} + +hr.end { + padding-top: 1rem; +} 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..cd12950 --- /dev/null +++ b/themes/simple/templates/archives.html @@ -0,0 +1,14 @@ +{% 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..20cfe9c --- /dev/null +++ b/themes/simple/templates/article.html @@ -0,0 +1,61 @@ +{% 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..7999de4 --- /dev/null +++ b/themes/simple/templates/categories.html @@ -0,0 +1,12 @@ +{% 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..d73f6e3 --- /dev/null +++ b/themes/simple/templates/category.html @@ -0,0 +1,8 @@ +{% 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..53c0806 --- /dev/null +++ b/themes/simple/templates/index.html @@ -0,0 +1,26 @@ +{% 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..33344ea --- /dev/null +++ b/themes/simple/templates/page.html @@ -0,0 +1,27 @@ +{% 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..b90b0ac --- /dev/null +++ b/themes/simple/templates/tags.html @@ -0,0 +1,12 @@ +{% 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 %} From 7899f1a42e72994ff4f9440323c2debb63fdb9dc Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Wed, 2 Nov 2022 23:36:10 -0400 Subject: [PATCH 2/4] theme work more --- .../2012-02-08_vertical_bars_in_graphite.rst | 2 +- ...-11-07_cfengine3-install-on-centos-5-7.rst | 2 +- .../blog/2022-01-09_garage-door-opener.rst | 4 +-- .../2022-10-17_comparing-go-gorm-and-sqlx.rst | 8 ++--- pelicanconf.py | 23 +++++++----- publishconf.py | 1 + themes/simple/static/css/main.css | 36 ++++++++++++++++--- themes/simple/templates/archives.html | 1 + themes/simple/templates/article.html | 9 ++--- themes/simple/templates/categories.html | 1 + themes/simple/templates/category.html | 3 +- themes/simple/templates/index.html | 10 ++++++ themes/simple/templates/page.html | 1 + themes/simple/templates/tags.html | 1 + 14 files changed, 77 insertions(+), 25 deletions(-) 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/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/themes/simple/static/css/main.css b/themes/simple/static/css/main.css index c548fa6..fcbe9aa 100644 --- a/themes/simple/static/css/main.css +++ b/themes/simple/static/css/main.css @@ -1,8 +1,8 @@ @import url("reset.css"); +@import url("pygment.css"); body { - font-size: 87.5%; /* Base font size: 14px */ - font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + font-family: 'Lato', 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; line-height: 1.429; margin: 0; padding: 0; @@ -12,6 +12,7 @@ body { 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 @@ -27,16 +28,25 @@ p { } .literal-block { - width: 100%; + 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;} @@ -52,6 +62,7 @@ p { } .right-panel-content img { + margin: 1rem; max-width: 50rem; } .left-panel { @@ -71,7 +82,7 @@ p { font-size: 1.25rem; } -hr.article-split { +hr { border: 2px dotted #b58900;; border-style: none none dashed; } @@ -83,3 +94,20 @@ hr.article-split { 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/templates/archives.html b/themes/simple/templates/archives.html index cd12950..d23baa8 100644 --- a/themes/simple/templates/archives.html +++ b/themes/simple/templates/archives.html @@ -4,6 +4,7 @@ {% block content %}

Archives for {{ SITENAME }}

+
{% for article in dates %} diff --git a/themes/simple/templates/article.html b/themes/simple/templates/article.html index 20cfe9c..ea419b2 100644 --- a/themes/simple/templates/article.html +++ b/themes/simple/templates/article.html @@ -24,14 +24,15 @@ {% block content %}

- {{ article.title }}

+ {{ article.title }} + {% import 'translations.html' as translations with context %} {{ translations.translations_for(article) }} +
diff --git a/themes/simple/templates/categories.html b/themes/simple/templates/categories.html index 7999de4..3738972 100644 --- a/themes/simple/templates/categories.html +++ b/themes/simple/templates/categories.html @@ -4,6 +4,7 @@ {% block content %}

Categories on {{ SITENAME }}

+
    {% for category, articles in categories|sort %}
  • {{ category }} ({{ articles|count }})
  • diff --git a/themes/simple/templates/category.html b/themes/simple/templates/category.html index d73f6e3..5f3ab2d 100644 --- a/themes/simple/templates/category.html +++ b/themes/simple/templates/category.html @@ -3,6 +3,7 @@ {% block title %}{{ SITENAME }} - {{ category }} category{% endblock %} {% block content_title %} -

    Articles in the {{ category }} category

    +

    Articles in the {{ category }} category

    +
    {% endblock %} diff --git a/themes/simple/templates/index.html b/themes/simple/templates/index.html index 53c0806..c6b6c61 100644 --- a/themes/simple/templates/index.html +++ b/themes/simple/templates/index.html @@ -3,6 +3,7 @@
    {% block content_title %}

    All articles

    +
    {% endblock %}
      @@ -11,8 +12,17 @@

      +
      {{ article.title }} +
      + + {{ article.category }} + + {% for tag in article.tags|sort %} + {{ tag }} + {% endfor %} +

      diff --git a/themes/simple/templates/page.html b/themes/simple/templates/page.html index 33344ea..c4e53fd 100644 --- a/themes/simple/templates/page.html +++ b/themes/simple/templates/page.html @@ -14,6 +14,7 @@ {% block content %}

      {{ page.title }}

      +
      {% import 'translations.html' as translations with context %} {{ translations.translations_for(page) }} diff --git a/themes/simple/templates/tags.html b/themes/simple/templates/tags.html index b90b0ac..dab2c42 100644 --- a/themes/simple/templates/tags.html +++ b/themes/simple/templates/tags.html @@ -4,6 +4,7 @@ {% block content %}

      Tags for {{ SITENAME }}

      +
        {% for tag, articles in tags|sort %}
      • {{ tag }} ({{ articles|count }})
      • From 8d5ac1a7b0f14e69bad9f6d71d4f0c5dc562a4d0 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Wed, 2 Nov 2022 23:37:42 -0400 Subject: [PATCH 3/4] parser and sass --- requirements.txt | 4 ++++ 1 file changed, 4 insertions(+) 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 From 83a1642aa5451046e621d0bba442d01fbff71c0c Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Wed, 2 Nov 2022 23:40:52 -0400 Subject: [PATCH 4/4] about --- content/pages/about.rst | 8 ++++++++ 1 file changed, 8 insertions(+) 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.