Commit graph

129 commits

Author SHA1 Message Date
Valentin Gagarin 252818fadd list events on the dedicated page more like articles 2024-11-13 15:24:41 +01:00
Valentin Gagarin 52e0db710a add a desktop stylesheet
it also features a dark mode
2024-11-13 15:24:41 +01:00
Valentin Gagarin 716495e472 style 2024-11-13 15:24:41 +01:00
Valentin Gagarin 0470af8e94 more structured front page
this allows for more customised styling
2024-11-13 15:24:41 +01:00
Valentin Gagarin ee6e661eaf remove legacy stylesheet 2024-11-13 15:24:41 +01:00
Valentin Gagarin 1e23995faa fix <hgroup> rendering 2024-11-13 15:24:41 +01:00
Valentin Gagarin b5841bd227 add stylesheet with fonts 2024-11-13 15:24:41 +01:00
Valentin Gagarin 4fdb56e436 implement raw assets
this allows adding files to the output as they are
2024-11-13 15:24:41 +01:00
Valentin Gagarin 4ec1cee08f move inline recursiveAttrs to lib.types 2024-11-13 15:24:41 +01:00
Valentin Gagarin 955409b71d implement stylesheet links 2024-11-13 15:24:41 +01:00
Valentin Gagarin 1934b90686 build with full trace 2024-11-13 15:24:41 +01:00
Valentin Gagarin 45bf5d23f5 add .direnv to gitingore 2024-11-13 15:24:41 +01:00
Valentin Gagarin c260df7994 add todo concerning palpable content 2024-11-13 15:24:41 +01:00
Valentin Gagarin 3d9d98f539 list all news articles on a separate page 2024-11-13 15:24:41 +01:00
Valentin Gagarin 05f7aa7ae7 add past events and list them on a page 2024-11-13 15:24:41 +01:00
Valentin Gagarin 754e56db82 add event content type 2024-11-13 15:24:41 +01:00
Valentin Gagarin edb2f06127 implement definition lists with dl, dt, dd 2024-11-13 15:24:41 +01:00
Valentin Gagarin 15a759eeab make template overrides take final and prev 2024-11-13 15:24:41 +01:00
Valentin Gagarin 39443ead2a add note on using direnv 2024-11-13 15:24:41 +01:00
Valentin Gagarin dcb6afa492 add devmode for live preview 2024-11-13 15:24:41 +01:00
Valentin Gagarin 3edcca2815 fix semantics: wrap content body into section 2024-11-13 15:24:41 +01:00
Valentin Gagarin 9c2b543e47 make template overrides chainable 2024-11-13 15:24:41 +01:00
Valentin Gagarin c11da792d7 remove old template garbage 2024-11-13 15:24:41 +01:00
Valentin Gagarin 99d4b7c2e8 override page template for articles 2024-11-13 15:24:41 +01:00
Valentin Gagarin 4762618956 make page templates granularly overridable 2024-11-13 15:24:41 +01:00
Valentin Gagarin 648227d1b6 add resulting Nix value to default.nix outputs
this is practical for debugging and demonstration purposes
2024-11-13 15:24:41 +01:00
Valentin Gagarin 7b2ded053b move things to more appropriate places 2024-11-13 15:24:41 +01:00
Valentin Gagarin 166a48f8cd unify template parameters 2024-11-13 15:24:41 +01:00
Valentin Gagarin e6459f26e2 further prettify output 2024-11-13 15:24:41 +01:00
Valentin Gagarin 8704b45b23 fix indentation in output 2024-11-13 15:24:41 +01:00
Valentin Gagarin 1e81d83ffb reiterate on mandatory headings in sections 2024-11-13 15:24:41 +01:00
Valentin Gagarin 179482d043 ensure the section hierarchy is spec-compliant
- automatically assign heading levels
- check that the maximum nesting depth is not exceeded
2024-11-13 15:24:41 +01:00
Valentin Gagarin 4160b6e976 separate DOM mapping and generic templating
the templates collection will soon only be there for reusable snippets,
while the HTML representation of document types will be attached to
those types directly.
2024-11-13 15:24:41 +01:00
Valentin Gagarin 2eeb7e5bcc implement sectioning semantics
this was quite a beast to tame, but it now allows putting sections anywhere
in the tree without having to redundantly specify heading levels, which
will be computed automatically from the nesting depth.

the whole thing will also blow up if the maximum section nesting depth
is exceeded, just as the spec requires - albeit with an absolutely
impenetrable error message. this could in principle be improved with
lots of additional machinery, but this is by far not low-hanging fruit.

just don't nest your sections too much.
2024-11-13 15:24:41 +01:00
Valentin Gagarin 260ce84c55 fix module for <link> and <base> 2024-11-13 15:24:41 +01:00
Valentin Gagarin 069c758dd5 fix attrs printing 2024-11-13 15:24:41 +01:00
Valentin Gagarin c9bdbfcb15 add README 2024-11-13 15:24:41 +01:00
Valentin Gagarin 73c3262d74 render content via structured DOM representation 2024-11-13 15:24:41 +01:00
Valentin Gagarin 01be60f9c6 formatting 2024-11-13 15:24:41 +01:00
Valentin Gagarin 62f5e16f38 implement a slice of the DOM spec as modules
this is roughly sufficient to recreate the website as it currently is

- elements:
  - document
  - html
  - head
  - title
  - base
  - link (variants that must be unique nested under `head` directly)
    - canonical
  - meta (same as for link):
    - charset
    - viewport
    - author (can be multiple, but still unique in aggregate for a document)
    - description

- global attributes:
  - class
  - hidden
  - id
  - lang
  - style
  - title

- element-specific attributes:
  - href
  - target

there's still a lot to do for a reasonably complete implementation, most
importantly everything concerning
- navigation
- top-level flow content (`div`, `article`, headings, `p`, ...)
- stylesheets

there's also some infrastructure to be arranged for easy but somewhat
safe switching between literal HTML and structured representations.
2024-11-13 15:24:41 +01:00
Valentin Gagarin 5b99ef52f5 add more string processing helpers 2024-11-13 15:24:41 +01:00
Valentin Gagarin 07ba9d70c4 add type for list of unique elements 2024-11-13 15:24:41 +01:00
Valentin Gagarin 92b2f0ba58 don't use outPath any more
- links are constructed explicitly, relative to the current page's
location
- templates are called explicitly by output type
2024-11-13 15:24:41 +01:00
Valentin Gagarin c5966cd4cb let navigation have its own template 2024-11-13 15:24:41 +01:00
Valentin Gagarin e3578b0440 make a proper link 2024-11-13 15:24:41 +01:00
Valentin Gagarin a340863781 move more content 2024-11-13 15:24:41 +01:00
Valentin Gagarin ad1e193067 set a default location for documents
it turns out that setting a value appends to that.
the default only needs to be overridden when the symbolic name of the
document changes. while there's a chance people will inadvertently break
links that way, it's requires less up-front knowledge to work with.
2024-11-13 15:24:41 +01:00
Valentin Gagarin c2fe5da469 allow prefixing output paths of collection items 2024-11-13 15:24:41 +01:00
Valentin Gagarin c3774eb1f6 delete obsolete page 2024-11-13 15:24:41 +01:00
Valentin Gagarin d2265cb2b7 allow menu entries to be subtypes of page
with an example
2024-11-13 15:24:41 +01:00