From bf0109812e3cd66116e107ec62bb00d172aaaa3f Mon Sep 17 00:00:00 2001
From: Kyle Isom
Date: Mon, 28 Feb 2022 22:08:20 -0800
Subject: [PATCH] adjust styling
---
content/posts/20220223.md | 6 +--
monospace/static/css/main.css | 80 ++++++++++++++++++++++++++++++++++
monospace/templates/base.html | 13 +++---
monospace/templates/index.html | 6 +++
pelicanconf.py | 15 +++++++
5 files changed, 110 insertions(+), 10 deletions(-)
diff --git a/content/posts/20220223.md b/content/posts/20220223.md
index 2065145..177b81c 100644
--- a/content/posts/20220223.md
+++ b/content/posts/20220223.md
@@ -12,7 +12,7 @@ Summary: Design work on blobs.
I finished writing out the basic blob database and structure types. The
blob was a structure like
-```
+```go
type Blob struct {
ID string
Header *Header
@@ -24,7 +24,7 @@ type Blob struct {
I decided to make it an `io.Reader` to make it better handle large files;
rather than load them entirely into memory, we can do a straight buffer.
-```
+```go
type Blob struct {
ID string
Header *Header
@@ -52,7 +52,7 @@ with this are adding artifacts and adding quick notes.
A quick note would be a node named something like
-```
+```text
quick =>
2022 =>
02 =>
diff --git a/monospace/static/css/main.css b/monospace/static/css/main.css
index 1c9b1df..435e618 100644
--- a/monospace/static/css/main.css
+++ b/monospace/static/css/main.css
@@ -85,3 +85,83 @@ h1 {
position: relative;
top: 8px;
}
+pre { line-height: 125%; margin: 0; padding: 0}
+.highlight { line-height: 125%; margin: 0; padding: 0}
+td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
+span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
+td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
+.codehilite .hll { background-color: #ffffcc }
+.codehilite { line-height: 125%; background: #1e1e27; padding: 0; color: #cfbfad }
+.codehilite .c { color: #cd8b00 } /* Comment */
+.codehilite .err { color: #ffffff; background-color: #6e2e2e } /* Error */
+.codehilite .k { color: #808bed } /* Keyword */
+.codehilite .n { color: #cfbfad } /* Name */
+.codehilite .o { color: #666666 } /* Operator */
+.codehilite .x { color: #cfbfad } /* Other */
+.codehilite .p { color: #cfbfad } /* Punctuation */
+.codehilite .ch { color: #cd8b00 } /* Comment.Hashbang */
+.codehilite .cm { color: #cd8b00 } /* Comment.Multiline */
+.codehilite .cp { color: #409090 } /* Comment.Preproc */
+.codehilite .cpf { color: #ffcd8b; background-color: #404040 } /* Comment.PreprocFile */
+.codehilite .c1 { color: #cd8b00 } /* Comment.Single */
+.codehilite .cs { color: #808bed } /* Comment.Special */
+.codehilite .gd { color: #A00000 } /* Generic.Deleted */
+.codehilite .ge { font-style: italic } /* Generic.Emph */
+.codehilite .gr { color: #FF0000 } /* Generic.Error */
+.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.codehilite .gi { color: #00A000 } /* Generic.Inserted */
+.codehilite .go { color: #888888 } /* Generic.Output */
+.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.codehilite .gs { font-weight: bold } /* Generic.Strong */
+.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.codehilite .gt { color: #0044DD } /* Generic.Traceback */
+.codehilite .kc { color: #808bed } /* Keyword.Constant */
+.codehilite .kd { color: #808bed } /* Keyword.Declaration */
+.codehilite .kn { color: #808bed } /* Keyword.Namespace */
+.codehilite .kp { color: #808bed } /* Keyword.Pseudo */
+.codehilite .kr { color: #808bed } /* Keyword.Reserved */
+.codehilite .kt { color: #ff8bff } /* Keyword.Type */
+.codehilite .m { color: #f0ad6d } /* Literal.Number */
+.codehilite .s { color: #ffcd8b; background-color: #404040 } /* Literal.String */
+.codehilite .na { color: #cfbfad } /* Name.Attribute */
+.codehilite .nb { color: #808bed } /* Name.Builtin */
+.codehilite .nc { color: #ff8bff } /* Name.Class */
+.codehilite .no { color: #409090 } /* Name.Constant */
+.codehilite .nd { color: #409090 } /* Name.Decorator */
+.codehilite .ni { color: #cfbfad } /* Name.Entity */
+.codehilite .ne { color: #ff0000 } /* Name.Exception */
+.codehilite .nf { color: #c080d0 } /* Name.Function */
+.codehilite .nl { color: #808bed } /* Name.Label */
+.codehilite .nn { color: #ff0000 } /* Name.Namespace */
+.codehilite .nx { color: #cfbfad } /* Name.Other */
+.codehilite .py { color: #cfbfad } /* Name.Property */
+.codehilite .nt { color: #cfbfad } /* Name.Tag */
+.codehilite .nv { color: #cfbfad } /* Name.Variable */
+.codehilite .ow { color: #666666 } /* Operator.Word */
+.codehilite .w { color: #434357 } /* Text.Whitespace */
+.codehilite .mb { color: #f0ad6d } /* Literal.Number.Bin */
+.codehilite .mf { color: #f0ad6d } /* Literal.Number.Float */
+.codehilite .mh { color: #f0ad6d } /* Literal.Number.Hex */
+.codehilite .mi { color: #f0ad6d } /* Literal.Number.Integer */
+.codehilite .mo { color: #f0ad6d } /* Literal.Number.Oct */
+.codehilite .sa { color: #ffcd8b; background-color: #404040 } /* Literal.String.Affix */
+.codehilite .sb { color: #ffcd8b; background-color: #404040 } /* Literal.String.Backtick */
+.codehilite .sc { color: #ffcd8b; background-color: #404040 } /* Literal.String.Char */
+.codehilite .dl { color: #ffcd8b; background-color: #404040 } /* Literal.String.Delimiter */
+.codehilite .sd { color: #808bed; background-color: #404040 } /* Literal.String.Doc */
+.codehilite .s2 { color: #ffcd8b; background-color: #404040 } /* Literal.String.Double */
+.codehilite .se { color: #ffcd8b; background-color: #404040 } /* Literal.String.Escape */
+.codehilite .sh { color: #ffcd8b; background-color: #404040 } /* Literal.String.Heredoc */
+.codehilite .si { color: #ffcd8b; background-color: #404040 } /* Literal.String.Interpol */
+.codehilite .sx { color: #ffcd8b; background-color: #404040 } /* Literal.String.Other */
+.codehilite .sr { color: #ffcd8b; background-color: #404040 } /* Literal.String.Regex */
+.codehilite .s1 { color: #ffcd8b; background-color: #404040 } /* Literal.String.Single */
+.codehilite .ss { color: #ffcd8b; background-color: #404040 } /* Literal.String.Symbol */
+.codehilite .bp { color: #ffff00 } /* Name.Builtin.Pseudo */
+.codehilite .fm { color: #c080d0 } /* Name.Function.Magic */
+.codehilite .vc { color: #cfbfad } /* Name.Variable.Class */
+.codehilite .vg { color: #cfbfad } /* Name.Variable.Global */
+.codehilite .vi { color: #cfbfad } /* Name.Variable.Instance */
+.codehilite .vm { color: #cfbfad } /* Name.Variable.Magic */
+.codehilite .il { color: #f0ad6d } /* Literal.Number.Integer.Long */
diff --git a/monospace/templates/base.html b/monospace/templates/base.html
index 13aecb5..630db65 100644
--- a/monospace/templates/base.html
+++ b/monospace/templates/base.html
@@ -98,9 +98,9 @@ h1 {
.highlight code,
.highlight pre {
- color: #fdce93;
- background-color: #3f3f3f;
- padding: 10px;
+ color: #eceff4;
+ background-color: #2e3440;
+ padding: 5px;
}
.highlight .hll {
@@ -112,8 +112,7 @@ h1 {
}
.highlight .err {
- color: #e37170;
- background-color: #3d3535
+ color: #bf616a
}
.highlight .g {
@@ -211,7 +210,7 @@ h1 {
}
.highlight .kd {
- color: #ffff86
+ color: #ebcb8b;
}
.highlight .kn {
@@ -228,7 +227,7 @@ h1 {
}
.highlight .kt {
- color: #00cd00
+ color: #a3be8c
}
.highlight .ld {
diff --git a/monospace/templates/index.html b/monospace/templates/index.html
index 2975ab5..8a2bcb4 100644
--- a/monospace/templates/index.html
+++ b/monospace/templates/index.html
@@ -9,6 +9,12 @@ system into a format suitable for public sharing.
Current in-development milestone: M1.
{% if articles %}
+Latest stream
+
+{% for article in dates|select_journal %}
+- {{ article.date|strftime('%Y-%m-%d') }}: {{ article.title }}
+{% endfor %}
+
Recent posts
{% for article in dates|filter_journal %}
diff --git a/pelicanconf.py b/pelicanconf.py
index 914a630..3e9bc6a 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -18,6 +18,17 @@ EXTRA_PATH_METADATA = { }
PLUGIN_PATHS = ['plugins']
PLUGINS = ['pagehier']
+MARKDOWN = {
+ 'extension_configs': {
+ 'markdown.extensions.codehilite': {
+ 'css_class': 'highlight',
+ 'use_pygments': True,
+ },
+ 'markdown.extensions.extra': {},
+ 'markdown.extensions.meta': {},
+ },
+ 'output_format': 'html5',
+}
#ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/'
#ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
@@ -31,9 +42,13 @@ def select_journal(articles, limit=5):
def filter_journal(articles, limit=5):
return [article for article in articles if 'journal' not in article.tags][:limit]
+def select_stream(articles, limit=1):
+ return [article for article in articles if 'stream' in article.tags][:limit]
+
JINJA_FILTERS = {
'select_journal': select_journal,
'filter_journal': filter_journal,
+ 'select_stream': select_stream,
}
# Blogroll (('name',' http://example.net/'))