From 8376c0ffa92674651ee775c832d866964886e13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Tue, 11 Mar 2025 01:04:59 +0100 Subject: [PATCH 1/9] Explore usage of automatic icons on node graphs. --- scripts/gen_centered_graph.py | 20 +++++++++++++++++--- scripts/generate.py | 4 ++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/gen_centered_graph.py b/scripts/gen_centered_graph.py index 05692b1..b1913c1 100644 --- a/scripts/gen_centered_graph.py +++ b/scripts/gen_centered_graph.py @@ -102,11 +102,17 @@ def gen(headline_id, graph, doc_to_headline_remapping): f.write('K=0.3\n') f.write('edge[len = 1]\n') def draw_subgraph(node_id, depth): + emoji = '' + if g[node_id]['class'] == 'listing': + emoji = '🪧 ' + f.write("subgraph cluster_{} {{\n".format(node_id.replace("-", "_"))) f.write(' URL="./{}.node.html"\n'.format(node_id)) f.write(' class="{}"\n'.format('cluster-depth-' + str(depth - 1))) f.write(" fontname=\"{}\"\n".format(font_name)) - f.write(" label=\"{}\"\n".format(g[node_id]['title'].replace("\"", "'"))) + f.write(" label=\"{}\"\n".format( + emoji + g[node_id]['title'].replace("\"", "'") + )) f.write("\n") # print("T: {}".format(in_emacs_tree), file=sys.stderr) @@ -116,8 +122,12 @@ def gen(headline_id, graph, doc_to_headline_remapping): if k in in_emacs_tree: draw_subgraph(k, depth=depth + 1) else: + emoji = '' + if v['class'] == 'listing': + emoji = '🪧 ' + print(" _" + k.replace("-", "_") - + "[label=\"" + v["title"].replace("\"", "'") + "\", " + + "[label=\"" + emoji + v["title"].replace("\"", "'") + "\", " + "URL=\"" + k + ".node.html\", " + "fontname=\"" + font_name + "\", " + "class=\"cluster-depth-" + str(depth) + "\"" @@ -130,8 +140,12 @@ def gen(headline_id, graph, doc_to_headline_remapping): for k, v in g.items(): if k not in in_emacs: + emoji = '' + if v['class'] == 'listing': + emoji = '🪧 ' + print("_" + k.replace("-", "_") - + "[label=\"" + v["title"].replace("\"", "'") + "\", " + + "[label=\"" + emoji + v["title"].replace("\"", "'") + "\", " + "fontname=\"" + font_name + "\", " + "URL=\"" + k + ".node.html\"];", file=f) diff --git a/scripts/generate.py b/scripts/generate.py index e883e7f..b87fa68 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -273,6 +273,10 @@ def regen_all(src_top, dest_top, subpath, *, docs=None, db=None): "title": org_rw.org_rw.token_list_to_plaintext(headline.title.contents).strip(), "links": links, "depth": headline.depth, + "shallow_tags": headline.shallow_tags, + "all_tags": headline.tags, + "state": headline.state, + "class": headline.get_property('CLASS'), } if headline.id in main_headline_to_docid: graph[main_headline_to_docid[headline.id]] = graph[headline.id] From 754a389749f38102e0b85214e823f8ec59b61edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Tue, 11 Mar 2025 01:19:05 +0100 Subject: [PATCH 2/9] Add more category types. --- scripts/gen_centered_graph.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/scripts/gen_centered_graph.py b/scripts/gen_centered_graph.py index b1913c1..a9cc502 100644 --- a/scripts/gen_centered_graph.py +++ b/scripts/gen_centered_graph.py @@ -4,6 +4,20 @@ import copy import tempfile import os +def get_emoji_for_node(node): + if node['class'] == 'listing': + return '🪧 ' + + if 'podcast' in node['shallow_tags']: + return '🎙️ ' + + if 'webradio' in node['shallow_tags']: + return '📻 ' + + if 'blog' in node['shallow_tags']: + return '📰 ' + + return '' @ops_cache.cache def gen(headline_id, graph, doc_to_headline_remapping): @@ -102,16 +116,12 @@ def gen(headline_id, graph, doc_to_headline_remapping): f.write('K=0.3\n') f.write('edge[len = 1]\n') def draw_subgraph(node_id, depth): - emoji = '' - if g[node_id]['class'] == 'listing': - emoji = '🪧 ' - f.write("subgraph cluster_{} {{\n".format(node_id.replace("-", "_"))) f.write(' URL="./{}.node.html"\n'.format(node_id)) f.write(' class="{}"\n'.format('cluster-depth-' + str(depth - 1))) f.write(" fontname=\"{}\"\n".format(font_name)) f.write(" label=\"{}\"\n".format( - emoji + g[node_id]['title'].replace("\"", "'") + get_emoji_for_node(g[node_id]) + g[node_id]['title'].replace("\"", "'") )) f.write("\n") @@ -122,12 +132,8 @@ def gen(headline_id, graph, doc_to_headline_remapping): if k in in_emacs_tree: draw_subgraph(k, depth=depth + 1) else: - emoji = '' - if v['class'] == 'listing': - emoji = '🪧 ' - print(" _" + k.replace("-", "_") - + "[label=\"" + emoji + v["title"].replace("\"", "'") + "\", " + + "[label=\"" + get_emoji_for_node(v) + v["title"].replace("\"", "'") + "\", " + "URL=\"" + k + ".node.html\", " + "fontname=\"" + font_name + "\", " + "class=\"cluster-depth-" + str(depth) + "\"" @@ -140,12 +146,8 @@ def gen(headline_id, graph, doc_to_headline_remapping): for k, v in g.items(): if k not in in_emacs: - emoji = '' - if v['class'] == 'listing': - emoji = '🪧 ' - print("_" + k.replace("-", "_") - + "[label=\"" + emoji + v["title"].replace("\"", "'") + "\", " + + "[label=\"" + get_emoji_for_node(v) + v["title"].replace("\"", "'") + "\", " + "fontname=\"" + font_name + "\", " + "URL=\"" + k + ".node.html\"];", file=f) From 5a2442f072a6ccf91ec3042d869aab666ad41268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sun, 23 Mar 2025 16:32:37 +0100 Subject: [PATCH 3/9] Change [projects] section to [now]. --- static/homepage.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/static/homepage.html b/static/homepage.html index aa566eb..a042a2d 100644 --- a/static/homepage.html +++ b/static/homepage.html @@ -108,6 +108,13 @@

+
+

Now

+ Stuff I'm fiddling with right now: + +

Talks / Slides

@@ -126,13 +133,7 @@

- +

Find me

From 0721891864bb75beeca39b82ae5af1707bdbea60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Tue, 25 Mar 2025 00:38:00 +0100 Subject: [PATCH 4/9] [style] Test more card-like style for nodes. --- static/style.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/style.css b/static/style.css index 493a929..f56be44 100644 --- a/static/style.css +++ b/static/style.css @@ -195,8 +195,11 @@ img { } .node .node { - padding: 1ex 0 1ex 1ex; - border-left: 1px dashed #2c3e50; + padding: 1ex 0.25ex 1ex 1ex; + border-left: 3px solid #5e235e; + margin-bottom: 1ex; + border-radius: 3px; + box-shadow: 0 0 3px 0px rgba(0,0,0,0.3); } .node.collapsed > .contents { From 6d3e4449635080836a875712cad50251da06399b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Tue, 25 Mar 2025 00:46:00 +0100 Subject: [PATCH 5/9] [style] Fix listing connection levels. --- static/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/style.css b/static/style.css index f56be44..95c86a6 100644 --- a/static/style.css +++ b/static/style.css @@ -266,6 +266,11 @@ img { border-left: 2px solid var(--tree-color); } +.node .contents ul ul ul li, +.global-table-of-contents ul ul ul li { + margin-left: calc(0px + var(--tree-radius) * 2 + .5ex); +} + .node .contents ul ul li::marker, .global-table-of-contents ul ul li::marker { content: ''; From 4f0d908de1c1d7007dae22fca4e5e737abec0985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 2 Apr 2025 00:20:30 +0200 Subject: [PATCH 6/9] Fix unindentation function. --- scripts/generate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate.py b/scripts/generate.py index b87fa68..66059be 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -497,11 +497,11 @@ def render_block(content, acc, _class, is_code): acc.append('') def unindent(content): - base_indentation = min([0] + [ + base_indentation = min([ len(l) - len(l.lstrip(' ')) for l in content.split('\n') if len(l.strip()) > 0 - ]) + ] or [0]) content_lines = [ l[base_indentation:] for l in content.split('\n') From 115d75378ab594348c14c0488bd16100f27450b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Thu, 3 Apr 2025 13:11:26 +0200 Subject: [PATCH 7/9] Update blog style. --- static/style.css | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/static/style.css b/static/style.css index 95c86a6..18bad8b 100644 --- a/static/style.css +++ b/static/style.css @@ -466,15 +466,27 @@ code, .verbatim { overflow-y: auto; } - .content { margin: 1ex; } -article.post { - max-width: min(650px, 100ex); - margin: 0 auto; +/* Blog */ +.blog { + background-color: #ddd; } + +.post-title { + border-bottom: 2px solid #444; +} + +article.post { + max-width: min(1000px, 120ex); + margin: 0 auto; + padding: 1em; + background-color: #fff; + border-radius: 3px; +} + /* Header */ .site-header { background-color: #002b36; @@ -526,12 +538,8 @@ article.post { /* Post index. */ .post-index .post-container { - /* box-shadow: 0px 2px 4px 2px rgba(0, 0, 0, 0.26); */ - /* border-radius: 2px; */ - /* padding: 1ex; */ margin-bottom: 1em; padding-bottom: 1em; - border-bottom: #000 2px dashed; } .index-pages { @@ -651,7 +659,7 @@ tr.__table-separator { } /* Header */ .site-header { - background-color: #303033; + background-color: #47414e; border-bottom: rgba(0,0,0,0.1) 1px solid; } .site-header h1 { @@ -796,4 +804,14 @@ tr.__table-separator { .connections svg path { stroke: white; } + + /* Blog */ + .blog { + background-color: #000; + } + + article.post { + background-color: #222; + } + } From 29a61e4af97a8e53e90c5c70602287fbd120c9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Fri, 4 Apr 2025 10:10:29 +0200 Subject: [PATCH 8/9] Improve blog styling. --- static/style.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/style.css b/static/style.css index 18bad8b..adc7904 100644 --- a/static/style.css +++ b/static/style.css @@ -409,6 +409,10 @@ a.external::after { } /* Codehilite fix */ +.codehilite { + overflow: auto; +} + .codehilitetable, .codehilitetable tr, .codehilitetable td { border: none; } @@ -807,11 +811,11 @@ tr.__table-separator { /* Blog */ .blog { - background-color: #000; + background-color: #111; } article.post { - background-color: #222; + background-color: #303030; } } From 5f6ffffd2aefec90a730242e626d090eded28007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Tue, 3 Jun 2025 23:48:10 +0200 Subject: [PATCH 9/9] [now] Add music embeddings to now section. --- static/homepage.html | 1 + 1 file changed, 1 insertion(+) diff --git a/static/homepage.html b/static/homepage.html index a042a2d..fdfba4b 100644 --- a/static/homepage.html +++ b/static/homepage.html @@ -112,6 +112,7 @@

Now

Stuff I'm fiddling with right now: