Compare commits

...

8 Commits

Author SHA1 Message Date
Sergio Martínez Portela
2f3c52f5f2 Push notes section to the top. 2024-07-21 19:54:23 +02:00
Sergio Martínez Portela
d630fb0f70 Add Malleable Software slides to homepage. 2024-07-21 19:48:23 +02:00
Sergio Martínez Portela
ce35091852 Add configurable subpath. 2024-05-05 12:29:26 +02:00
Sergio Martínez Portela
d9b85c8475 Fix height of arrows on external links. 2024-03-12 01:40:26 +01:00
Sergio Martínez Portela
9a020285ad Add clean styling for SOMETIME state. 2024-03-10 17:51:58 +01:00
Sergio Martínez Portela
e639df35a7 s/Mastodon/ActivityPub/ 2023-11-12 15:34:44 +01:00
Sergio Martínez Portela
89e50a6310 Fix color scheme on dark mode. 2023-11-01 23:37:57 +01:00
Sergio Martínez Portela
28122c3c31 Use dark-syntax.css only when dark mode is selected. 2023-10-05 08:53:50 +02:00
4 changed files with 136 additions and 100 deletions

View File

@ -46,13 +46,14 @@ IMG_EXTENSIONS = set([
"gif", "gif",
]) ])
SKIPPED_TAGS = set(['attach']) SKIPPED_TAGS = set(['attach'])
DEFAULT_SUBPATH = "public"
WATCH = True WATCH = True
if os.getenv('WATCH_AND_REBUILD', '1') == '0': if os.getenv('WATCH_AND_REBUILD', '1') == '0':
WATCH = False WATCH = False
MIN_HIDDEN_HEADLINE_LEVEL = 2 MIN_HIDDEN_HEADLINE_LEVEL = 2
INDEX_ID = "ea48ec1d-f9d4-4fb7-b39a-faa7b6e2ba95" INDEX_ID = os.getenv("INDEX_ID", "ea48ec1d-f9d4-4fb7-b39a-faa7b6e2ba95")
SITE_NAME = "Código para llevar" SITE_NAME = "Código para llevar"
MONITORED_EVENT_TYPES = ( MONITORED_EVENT_TYPES = (
@ -120,7 +121,7 @@ def load_all(top_dir_relative):
logging.info("Collected {} files".format(len(docs))) logging.info("Collected {} files".format(len(docs)))
return docs return docs
def regen_all(src_top, dest_top, *, docs=None, db=None): def regen_all(src_top, dest_top, subpath, *, docs=None, db=None):
files_generated = 0 files_generated = 0
cur = db.cursor() cur = db.cursor()
cleaned_db = False cleaned_db = False
@ -150,7 +151,7 @@ def regen_all(src_top, dest_top, *, docs=None, db=None):
changed = False changed = False
headlines = list(doc.getAllHeadlines()) headlines = list(doc.getAllHeadlines())
related = None related = None
if not relpath.startswith("public/"): if not relpath.startswith(subpath + "/"):
# print("Skip:", relpath) # print("Skip:", relpath)
continue continue
@ -349,7 +350,7 @@ def regen_all(src_top, dest_top, *, docs=None, db=None):
dirs_exist_ok=True) dirs_exist_ok=True)
def main(src_top, dest_top): def main(src_top, dest_top, subpath):
notifier = inotify.adapters.InotifyTrees([src_top, STATIC_PATH]) notifier = inotify.adapters.InotifyTrees([src_top, STATIC_PATH])
## Initial load ## Initial load
@ -357,7 +358,7 @@ def main(src_top, dest_top):
os.makedirs(dest_top, exist_ok=True) os.makedirs(dest_top, exist_ok=True)
db = create_db(os.path.join(dest_top, 'db.sqlite3')) db = create_db(os.path.join(dest_top, 'db.sqlite3'))
docs = regen_all(src_top, dest_top, db=db) docs = regen_all(src_top, dest_top, subpath=subpath, db=db)
if not WATCH: if not WATCH:
logging.info("Build completed in {:.2f}s".format(time.time() - t0)) logging.info("Build completed in {:.2f}s".format(time.time() - t0))
@ -375,7 +376,7 @@ def main(src_top, dest_top):
print("CHANGED: {}".format(filepath)) print("CHANGED: {}".format(filepath))
t0 = time.time() t0 = time.time()
try: try:
docs = regen_all(src_top, dest_top, docs=docs, db=db) docs = regen_all(src_top, dest_top, subpath=subpath, docs=docs, db=db)
except: except:
logging.error(traceback.format_exc()) logging.error(traceback.format_exc())
logging.error("Loading new templates failed 😿") logging.error("Loading new templates failed 😿")
@ -825,9 +826,13 @@ def save_changes(doc):
if __name__ == "__main__": if __name__ == "__main__":
if len(sys.argv) != 3: if len(sys.argv) not in (3, 4):
print("Usage: {} SOURCE_TOP DEST_TOP".format(sys.argv[0])) print("Usage: {} SOURCE_TOP DEST_TOP <SUBPATH>".format(sys.argv[0]))
exit(0) exit(0)
logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s") logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s")
exit(main(sys.argv[1], sys.argv[2])) subpath = DEFAULT_SUBPATH
if len(sys.argv) == 4:
subpath = sys.argv[3]
exit(main(sys.argv[1], sys.argv[2], subpath=subpath))

View File

@ -1,82 +1,85 @@
pre { line-height: 125%; } /* Dark mode. */
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } @media (prefers-color-scheme: dark) {
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } pre { line-height: 125%; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
.hll { background-color: #49483e } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.c { color: #75715e } /* Comment */ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.err { color: #960050; background-color: #1e0010 } /* Error */ .hll { background-color: #49483e }
.esc { color: #f8f8f2 } /* Escape */ .c { color: #75715e } /* Comment */
.g { color: #f8f8f2 } /* Generic */ .err { color: #960050; background-color: #1e0010 } /* Error */
.k { color: #66d9ef } /* Keyword */ .esc { color: #f8f8f2 } /* Escape */
.l { color: #ae81ff } /* Literal */ .g { color: #f8f8f2 } /* Generic */
.n { color: #f8f8f2 } /* Name */ .k { color: #66d9ef } /* Keyword */
.o { color: #f92672 } /* Operator */ .l { color: #ae81ff } /* Literal */
.x { color: #f8f8f2 } /* Other */ .n { color: #f8f8f2 } /* Name */
.p { color: #f8f8f2 } /* Punctuation */ .o { color: #f92672 } /* Operator */
.ch { color: #75715e } /* Comment.Hashbang */ .x { color: #f8f8f2 } /* Other */
.cm { color: #75715e } /* Comment.Multiline */ .p { color: #f8f8f2 } /* Punctuation */
.cp { color: #75715e } /* Comment.Preproc */ .ch { color: #75715e } /* Comment.Hashbang */
.cpf { color: #75715e } /* Comment.PreprocFile */ .cm { color: #75715e } /* Comment.Multiline */
.c1 { color: #75715e } /* Comment.Single */ .cp { color: #75715e } /* Comment.Preproc */
.cs { color: #75715e } /* Comment.Special */ .cpf { color: #75715e } /* Comment.PreprocFile */
.gd { color: #f92672 } /* Generic.Deleted */ .c1 { color: #75715e } /* Comment.Single */
.ge { color: #f8f8f2; font-style: italic } /* Generic.Emph */ .cs { color: #75715e } /* Comment.Special */
.gr { color: #f8f8f2 } /* Generic.Error */ .gd { color: #f92672 } /* Generic.Deleted */
.gh { color: #f8f8f2 } /* Generic.Heading */ .ge { color: #f8f8f2; font-style: italic } /* Generic.Emph */
.gi { color: #a6e22e } /* Generic.Inserted */ .gr { color: #f8f8f2 } /* Generic.Error */
.go { color: #66d9ef } /* Generic.Output */ .gh { color: #f8f8f2 } /* Generic.Heading */
.gp { color: #f92672; font-weight: bold } /* Generic.Prompt */ .gi { color: #a6e22e } /* Generic.Inserted */
.gs { color: #f8f8f2; font-weight: bold } /* Generic.Strong */ .go { color: #66d9ef } /* Generic.Output */
.gu { color: #75715e } /* Generic.Subheading */ .gp { color: #f92672; font-weight: bold } /* Generic.Prompt */
.gt { color: #f8f8f2 } /* Generic.Traceback */ .gs { color: #f8f8f2; font-weight: bold } /* Generic.Strong */
.kc { color: #66d9ef } /* Keyword.Constant */ .gu { color: #75715e } /* Generic.Subheading */
.kd { color: #66d9ef } /* Keyword.Declaration */ .gt { color: #f8f8f2 } /* Generic.Traceback */
.kn { color: #f92672 } /* Keyword.Namespace */ .kc { color: #66d9ef } /* Keyword.Constant */
.kp { color: #66d9ef } /* Keyword.Pseudo */ .kd { color: #66d9ef } /* Keyword.Declaration */
.kr { color: #66d9ef } /* Keyword.Reserved */ .kn { color: #f92672 } /* Keyword.Namespace */
.kt { color: #66d9ef } /* Keyword.Type */ .kp { color: #66d9ef } /* Keyword.Pseudo */
.ld { color: #e6db74 } /* Literal.Date */ .kr { color: #66d9ef } /* Keyword.Reserved */
.m { color: #ae81ff } /* Literal.Number */ .kt { color: #66d9ef } /* Keyword.Type */
.s { color: #e6db74 } /* Literal.String */ .ld { color: #e6db74 } /* Literal.Date */
.na { color: #a6e22e } /* Name.Attribute */ .m { color: #ae81ff } /* Literal.Number */
.nb { color: #f8f8f2 } /* Name.Builtin */ .s { color: #e6db74 } /* Literal.String */
.nc { color: #a6e22e } /* Name.Class */ .na { color: #a6e22e } /* Name.Attribute */
.no { color: #66d9ef } /* Name.Constant */ .nb { color: #f8f8f2 } /* Name.Builtin */
.nd { color: #a6e22e } /* Name.Decorator */ .nc { color: #a6e22e } /* Name.Class */
.ni { color: #f8f8f2 } /* Name.Entity */ .no { color: #66d9ef } /* Name.Constant */
.ne { color: #a6e22e } /* Name.Exception */ .nd { color: #a6e22e } /* Name.Decorator */
.nf { color: #a6e22e } /* Name.Function */ .ni { color: #f8f8f2 } /* Name.Entity */
.nl { color: #f8f8f2 } /* Name.Label */ .ne { color: #a6e22e } /* Name.Exception */
.nn { color: #f8f8f2 } /* Name.Namespace */ .nf { color: #a6e22e } /* Name.Function */
.nx { color: #a6e22e } /* Name.Other */ .nl { color: #f8f8f2 } /* Name.Label */
.py { color: #f8f8f2 } /* Name.Property */ .nn { color: #f8f8f2 } /* Name.Namespace */
.nt { color: #f92672 } /* Name.Tag */ .nx { color: #a6e22e } /* Name.Other */
.nv { color: #f8f8f2 } /* Name.Variable */ .py { color: #f8f8f2 } /* Name.Property */
.ow { color: #f92672 } /* Operator.Word */ .nt { color: #f92672 } /* Name.Tag */
.w { color: #f8f8f2 } /* Text.Whitespace */ .nv { color: #f8f8f2 } /* Name.Variable */
.mb { color: #ae81ff } /* Literal.Number.Bin */ .ow { color: #f92672 } /* Operator.Word */
.mf { color: #ae81ff } /* Literal.Number.Float */ .w { color: #f8f8f2 } /* Text.Whitespace */
.mh { color: #ae81ff } /* Literal.Number.Hex */ .mb { color: #ae81ff } /* Literal.Number.Bin */
.mi { color: #ae81ff } /* Literal.Number.Integer */ .mf { color: #ae81ff } /* Literal.Number.Float */
.mo { color: #ae81ff } /* Literal.Number.Oct */ .mh { color: #ae81ff } /* Literal.Number.Hex */
.sa { color: #e6db74 } /* Literal.String.Affix */ .mi { color: #ae81ff } /* Literal.Number.Integer */
.sb { color: #e6db74 } /* Literal.String.Backtick */ .mo { color: #ae81ff } /* Literal.Number.Oct */
.sc { color: #e6db74 } /* Literal.String.Char */ .sa { color: #e6db74 } /* Literal.String.Affix */
.dl { color: #e6db74 } /* Literal.String.Delimiter */ .sb { color: #e6db74 } /* Literal.String.Backtick */
.sd { color: #e6db74 } /* Literal.String.Doc */ .sc { color: #e6db74 } /* Literal.String.Char */
.s2 { color: #e6db74 } /* Literal.String.Double */ .dl { color: #e6db74 } /* Literal.String.Delimiter */
.se { color: #ae81ff } /* Literal.String.Escape */ .sd { color: #e6db74 } /* Literal.String.Doc */
.sh { color: #e6db74 } /* Literal.String.Heredoc */ .s2 { color: #e6db74 } /* Literal.String.Double */
.si { color: #e6db74 } /* Literal.String.Interpol */ .se { color: #ae81ff } /* Literal.String.Escape */
.sx { color: #e6db74 } /* Literal.String.Other */ .sh { color: #e6db74 } /* Literal.String.Heredoc */
.sr { color: #e6db74 } /* Literal.String.Regex */ .si { color: #e6db74 } /* Literal.String.Interpol */
.s1 { color: #e6db74 } /* Literal.String.Single */ .sx { color: #e6db74 } /* Literal.String.Other */
.ss { color: #e6db74 } /* Literal.String.Symbol */ .sr { color: #e6db74 } /* Literal.String.Regex */
.bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .s1 { color: #e6db74 } /* Literal.String.Single */
.fm { color: #a6e22e } /* Name.Function.Magic */ .ss { color: #e6db74 } /* Literal.String.Symbol */
.vc { color: #f8f8f2 } /* Name.Variable.Class */ .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.vg { color: #f8f8f2 } /* Name.Variable.Global */ .fm { color: #a6e22e } /* Name.Function.Magic */
.vi { color: #f8f8f2 } /* Name.Variable.Instance */ .vc { color: #f8f8f2 } /* Name.Variable.Class */
.vm { color: #f8f8f2 } /* Name.Variable.Magic */ .vg { color: #f8f8f2 } /* Name.Variable.Global */
.il { color: #ae81ff } /* Literal.Number.Integer.Long */ .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.vm { color: #f8f8f2 } /* Name.Variable.Magic */
.il { color: #ae81ff } /* Literal.Number.Integer.Long */
}

View File

@ -6,11 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<style> <style>
body { body {
background-color: white;
font-family: sans-serif; font-family: sans-serif;
margin: 0 auto; margin: 0 auto;
width: fit-content; width: fit-content;
max-width: 100ex; max-width: 100ex;
padding: 0 1ex; padding: 0 1ex;
color: black;
} }
.header h1 { .header h1 {
text-align: center; text-align: center;
@ -45,7 +47,7 @@
border-right: 1px solid #000; border-right: 1px solid #000;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html { body {
background-color: #1d1f21; background-color: #1d1f21;
color: #fafafe; color: #fafafe;
} }
@ -72,6 +74,12 @@
</div> </div>
<div class="links"> <div class="links">
<a href="/notes">
<section>
<h2>Notes</h2>
<p>Some publicly-visible notes from a sort of knowledge graph that I use as information dump.</p>
</section>
</a>
<section> <section>
<h2><a href="/blog">Blog</a></h2> <h2><a href="/blog">Blog</a></h2>
<p> <p>
@ -100,12 +108,24 @@
</ul> </ul>
</p> </p>
</section> </section>
<a href="/notes">
<section> <section>
<h2>Notes</h2> <h2>Talks / Slides</h2>
<p>Some publicly-visible notes from a sort of knowledge graph that I use as information dump.</p> <p>
<ul>
<li>
Malleable Software
(<a href="/slides/hackliza2024/software-maleable/software-maleable.odp">galician, </a>
for <a href="https://hackliza.gal">Hackliza</a>
<a href="/slides/hackliza2024/software-maleable/software-maleable.pdf">[PDF]</a>
<a href="/slides/hackliza2024/software-maleable/software-maleable.odp">[ODP]</a>)
(<a href="/slides/eslibre2024/software-maleable.odp">spanish,</a>
for <a href="https://eslib.re/2024/">esLibre 2024</a>
<a href="/slides/eslibre2024/software-maleable.pdf">[PDF]</a>
<a href="/slides/eslibre2024/software-maleable.odp">[ODP]</a>).
</li>
</ul>
</p>
</section> </section>
</a>
<!-- section> <!-- section>
<h2>Projects</h2> <h2>Projects</h2>
<p> <p>
@ -116,7 +136,7 @@
<section id="social"> <section id="social">
<h2>Find me</h2> <h2>Find me</h2>
<p> <p>
<a href="https://social.codigoparallevar.com/@kenkeiras">Mastodon</a> <a href="https://social.codigoparallevar.com/@kenkeiras">ActivityPub</a>
<a href="https://github.com/kenkeiras">GitHub</a> <a href="https://github.com/kenkeiras">GitHub</a>
<a href="https://gitlab.com/kenkeiras">GitLab</a> <a href="https://gitlab.com/kenkeiras">GitLab</a>
<a href="https://programaker.com/users/kenkeiras">PrograMaker</a> <a href="https://programaker.com/users/kenkeiras">PrograMaker</a>

View File

@ -10,6 +10,8 @@ body {
max-width: 80ex; max-width: 80ex;
margin: 0 auto; margin: 0 auto;
padding: 0.5ex 1ex; padding: 0.5ex 1ex;
background-color: white;
color: black;
} }
body.blog { body.blog {
@ -332,6 +334,11 @@ h1.title .state.todo-True {
h1.title .state.todo-False { h1.title .state.todo-False {
background-color: rgba(0,255,0,0.25); background-color: rgba(0,255,0,0.25);
} }
h1.title .state.todo-True.state-SOMETIME {
background-color: #ddd;
color: black;
}
h1.title .tags { h1.title .tags {
float: right; float: right;
@ -368,6 +375,7 @@ a.internal::after {
} }
a.external::after { a.external::after {
content: ' ↗'; content: ' ↗';
vertical-align: top;
} }
/* Markup */ /* Markup */
@ -580,7 +588,7 @@ tr.__table-separator {
/* Dark mode. */ /* Dark mode. */
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
html { html, body {
background-color: #1d1f21; background-color: #1d1f21;
color: #fafafe; color: #fafafe;
} }