diff options
Diffstat (limited to 'site')
| -rw-r--r-- | site/common.typ | 55 | ||||
| -rw-r--r-- | site/content/blog/typst_migration.typ (renamed from site/content/typst_migration.typ) | 0 | ||||
| -rw-r--r-- | site/index.html | 12 | ||||
| -rw-r--r-- | site/index.typ | 30 |
4 files changed, 58 insertions, 39 deletions
diff --git a/site/common.typ b/site/common.typ index 5f41596..a1c2097 100644 --- a/site/common.typ +++ b/site/common.typ @@ -52,12 +52,29 @@ } } +#let template(title, header, main) = { + html.html({ + html.head({ + html.meta(charset: "utf-8") + html.meta(name: "viewport", content: "width=device-width, initial-scale=1") + html.title(title) + html.link(rel: "stylesheet", href: static("style.css")) + }) + html.header(header) + html.main(main) + html.footer[ + © 2019--2026 Paweł Redman \ + Text and images are licensed under #link("https://creativecommons.org/licenses/by-sa/4.0/")[CC-BY-SA 4.0] unless noted otherwise. + ] + }) +} + #let post(body, title: none, author: "Paweł Redman", date: none) = { assert(date != none, message: "missing date") set document( title: title, - author: "Paweł Redman", + author: author, ) set text(lang: "en") @@ -85,31 +102,15 @@ )) <post-meta> ] - html.html({ - html.head({ - html.meta(charset: "utf-8") - html.meta(name: "viewport", content: "width=device-width, initial-scale=1") - html.title(title) - html.link(rel: "stylesheet", href: static("style.css")) - }) - - html.header({ - html.nav(breadcrumbs()) - }) - - html.main({ - html.article({ - html.header({ - html.h1(title) - html.p(id: "author")[by #author, published on #html.time(datetime: date)[#format-date-en(date)]] - }) - - body + template( + title, + html.nav(breadcrumbs()), + html.article({ + html.header({ + html.h1(title) + html.p(id: "author")[by #author, published on #html.time(datetime: date)[#format-date-en(date)]] }) - }) - - html.footer[ - footer goes here - ] - }) + body + }), + ) }
\ No newline at end of file diff --git a/site/content/typst_migration.typ b/site/content/blog/typst_migration.typ index 50d28cd..50d28cd 100644 --- a/site/content/typst_migration.typ +++ b/site/content/blog/typst_migration.typ diff --git a/site/index.html b/site/index.html deleted file mode 100644 index 7cd6639..0000000 --- a/site/index.html +++ /dev/null @@ -1,12 +0,0 @@ -<html> - <body> - <h1>Blog</h1> - <ul> - {% for page in pages %} - <li> - <a href="{{ page.url }}">{{ page.title }}</a> - </li> - {% endfor %} - </ul> - </body> -</html> diff --git a/site/index.typ b/site/index.typ new file mode 100644 index 0000000..4b615a4 --- /dev/null +++ b/site/index.typ @@ -0,0 +1,30 @@ +#import "/common.typ": template, link-self, webroot, format-date-en +#let payload = json(sys.inputs.payload) + +#show: template.with( + "redman.xyz", + html.h1("redman.xyz"), +) + +I'm Paweł Redman, known online as enneract, a software engineer working on LTE/NR Layer 1 with a B.Sc. in Optics and Photonics Engineering. + += Latest posts + +#for page in payload.pages { + let date = datetime( + year: page.year, + month: page.month, + day: page.day, + ) + + if (datetime.today() - date).days() > 365 { + break + } + + format-date-en(date) + " " + link(webroot + page.url, page.title) +} + += Selected projects + |
