diff options
Diffstat (limited to 'mod/web/blog')
| -rw-r--r-- | mod/web/blog/content/log/_index.md | 7 | ||||
| -rw-r--r-- | mod/web/blog/content/posts/_index.md | 4 | ||||
| -rw-r--r-- | mod/web/blog/content/posts/deterministic-hostnames.md (renamed from mod/web/blog/content/log/deterministic-hostnames.md) | 0 | ||||
| -rw-r--r-- | mod/web/blog/content/posts/nohup.md (renamed from mod/web/blog/content/log/nohup.md) | 0 | ||||
| -rw-r--r-- | mod/web/blog/static/avatar.png | bin | 1800 -> 0 bytes | |||
| -rw-r--r-- | mod/web/blog/static/style.css | 85 | ||||
| -rw-r--r-- | mod/web/blog/templates/base.html | 92 | ||||
| -rw-r--r-- | mod/web/blog/templates/blog.html | 22 | ||||
| -rw-r--r-- | mod/web/blog/templates/index.html | 50 | ||||
| -rw-r--r-- | mod/web/blog/templates/post.html | 4 |
10 files changed, 92 insertions, 172 deletions
diff --git a/mod/web/blog/content/log/_index.md b/mod/web/blog/content/log/_index.md deleted file mode 100644 index 10f2311..0000000 --- a/mod/web/blog/content/log/_index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "Log" -sort_by = "date" -template = "blog.html" -page_template = "post.html" -description = "notes too short to post" -+++ diff --git a/mod/web/blog/content/posts/_index.md b/mod/web/blog/content/posts/_index.md index 1f4024a..9efc62e 100644 --- a/mod/web/blog/content/posts/_index.md +++ b/mod/web/blog/content/posts/_index.md @@ -1,8 +1,6 @@ +++ title = "Posts" sort_by = "date" -template = "blog.html" page_template = "post.html" +redirect_to="/" +++ - -Longer form writing. diff --git a/mod/web/blog/content/log/deterministic-hostnames.md b/mod/web/blog/content/posts/deterministic-hostnames.md index 43dc7d8..43dc7d8 100644 --- a/mod/web/blog/content/log/deterministic-hostnames.md +++ b/mod/web/blog/content/posts/deterministic-hostnames.md diff --git a/mod/web/blog/content/log/nohup.md b/mod/web/blog/content/posts/nohup.md index 64f7983..64f7983 100644 --- a/mod/web/blog/content/log/nohup.md +++ b/mod/web/blog/content/posts/nohup.md diff --git a/mod/web/blog/static/avatar.png b/mod/web/blog/static/avatar.png Binary files differdeleted file mode 100644 index 91357dc..0000000 --- a/mod/web/blog/static/avatar.png +++ /dev/null diff --git a/mod/web/blog/static/style.css b/mod/web/blog/static/style.css deleted file mode 100644 index fdfd692..0000000 --- a/mod/web/blog/static/style.css +++ /dev/null @@ -1,85 +0,0 @@ -:root { - --bg: #181616; - --fg: #c5c9c5; - --link: #76946a; - --linkhover: #98bb6c; -} - -html { - scroll-behavior: smooth; - color-scheme: dark; -} - -body { - font-family: serif; - padding: 0 0.75em; - max-width: 42em; - margin: auto; - background: var(--bg); - color: var(--fg); -} - -p { - line-height: 1.3em; -} - -th, -td { - padding: 0.2em 0.4em; - border: thin solid; -} - -table { - border: thin solid; - border-collapse: collapse; -} - -article { - padding-top: 1em; -} - -footer { - margin: 3em auto; - text-align: center; -} - -a, -a:link { - color: var(--link); -} - -a:hover { - color: var(--linkhover); -} - -a[href^="http"]:where(:not([href*="4kb.net/"]))::after { - content: " \21e2"; -} - -article img { - display: block; - margin: 0 auto; - max-width: 80%; - height: auto; - object-fit: contain; -} - -nav { - margin-top: 1em; - display: flex; - justify-content: space-between; - align-items: center; - font-family: monospace; - font-weight: bold; - gap: 8px; -} - -nav div { - display: flex; - gap: 10px; -} - -pre { - padding: 1em; - overflow-x: scroll; -} diff --git a/mod/web/blog/templates/base.html b/mod/web/blog/templates/base.html index 6757d02..5a91df5 100644 --- a/mod/web/blog/templates/base.html +++ b/mod/web/blog/templates/base.html @@ -3,24 +3,86 @@ <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <link href="/style.css" rel="stylesheet" /> - <link rel="preload" href="style.css" as="style" /> <title>{% block title %}4kb.net{% endblock title %}</title> </head> + <style> + :root { + --bg: #181616; + --fg: #c5c9c5; + --link: #76946a; + --linkhover: #98bb6c; + } + + html { + scroll-behavior: smooth; + color-scheme: dark; + } + + body { + font-family: serif; + padding: 0 0.75em; + max-width: 42em; + margin: auto; + background: var(--bg); + color: var(--fg); + } + + p { + line-height: 1.3em; + } + + th, + td { + padding: 0.2em 0.4em; + border: thin solid; + } + + table { + border: thin solid; + border-collapse: collapse; + } + + a, + a:link { + color: var(--link); + } + + a:hover { + color: var(--linkhover); + } + + article img { + display: block; + margin: 0 auto; + max-width: 80%; + height: auto; + object-fit: contain; + } + + pre { + padding: 1em; + overflow-x: scroll; + } + </style> <body> - <nav> - <span>4kb.net</span> - <div> - <a href="/">Home</a> - <a href="/posts">Posts</a> - <a href="/log">Log</a> - </div> - </nav> - <hr /> + <header + style=" + margin: 3em 0 3em 0; + display: flex; + gap: 8px; + flex-direction: column; + font-family: monospace; + " + > + <span + >Kleidi Bujari <<a href="mailto:mail@4kb.net">mail@4kb.net</a>></span + > + <nav style="display: flex; gap: 8px"> + <span><a href="/">4kb.net</a> |</span> + <a target="_blank" href="https://github.com/kbujari">git</a> + <a href="/atom.xml">rss</a> + </nav> + </header> <main>{% block content %} {% endblock %}</main> - <footer> - <hr /> - <span>© 2024 Kleidi Bujari</span> - </footer> </body> </html> diff --git a/mod/web/blog/templates/blog.html b/mod/web/blog/templates/blog.html deleted file mode 100644 index 6c92a07..0000000 --- a/mod/web/blog/templates/blog.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} - -{% block content %} - -<head> - <title>4kb.net</title> -</head> - -<h2>{{ section.title }}</h2> - -{{ section.content | safe }} - -<ul> - {% for page in section.pages %} - <li> - <span>[{{ page.date }}]</span> - <a href="{{ page.permalink | safe }}">{{ page.title }}</a> - </li> - {% endfor %} -</ul> - -{% endblock content %} diff --git a/mod/web/blog/templates/index.html b/mod/web/blog/templates/index.html index 74e9a0f..6e8a2af 100644 --- a/mod/web/blog/templates/index.html +++ b/mod/web/blog/templates/index.html @@ -1,44 +1,16 @@ {% extends "base.html" %} {% block content %} -<h2>welcome!</h2> +<div> + {% set section = get_section(path="posts/_index.md") %} -<p> - I'm a computer engineering undergrad studying in Toronto. This is my personal - site where I sometimes publish long form posts on topics I'm interested in, or - short "logs" for information I want to remember. -</p> - -<span>Find me on:</span> -<ul> - <li>email: <a href="mailto:mail@4kb.net">mail@4kb.net</a></li> - <li>github: <a href="https://github.com/kbujari">kbujari</a></li> -</ul> - -<!--<h3>Recent Posts</h3>--> -<!----> -<!--{% set section = get_section(path="posts/_index.md") %}--> -<!----> -<!--<ul>--> -<!-- {% for page in section.pages | slice(end=4) %}--> -<!-- <li>--> -<!-- <span>[{{ page.date }}]</span>--> -<!-- <a href="{{ page.permalink | safe }}">{{ page.title }}</a>--> -<!-- </li>--> -<!-- {% endfor %}--> -<!--</ul>--> - -<h3>Recent Logs</h3> - -{% set section = get_section(path="log/_index.md") %} - -<ul> - {% for page in section.pages | slice(end=4) %} - <li> - <span>[{{ page.date }}]</span> - <a href="{{ page.permalink | safe }}">{{ page.title }}</a> + <ul style="list-style: none; padding-left: 0"> + {% for page in section.pages %} + <li style="display: flex; gap: 1em; margin-bottom: 0.3em"> + <span sty>{{ page.date }}</span> + <a href="{{ page.permalink | safe }}">{{ page.title }}</a> </li> - {% endfor %} -</ul> - + {% endfor %} + </ul> -{% endblock content %} + {% endblock content %} +</div> diff --git a/mod/web/blog/templates/post.html b/mod/web/blog/templates/post.html index b1981e4..b819520 100644 --- a/mod/web/blog/templates/post.html +++ b/mod/web/blog/templates/post.html @@ -1,12 +1,14 @@ {% extends "base.html" %} + {% block title%} {{ page.title }} - {{ super() }} {% endblock title %} {% block content %} -<h1 style="text-align: center; margin-top: 1em;">{{ page.title }}</h1> +<h1 style="text-align: center">{{ page.title }}</h1> <article> {{ page.content | safe }} </article> + {% endblock content %} |
