Commit graph

11 commits

Author SHA1 Message Date
Valentin Gagarin 43e64b315b implement stylesheet links 2024-11-10 01:32:46 +01:00
Valentin Gagarin 0cadcb69bb add todo concerning palpable content 2024-11-09 18:33:29 +01:00
Valentin Gagarin 8fc85c9c85 implement definition lists with dl, dt, dd 2024-11-09 03:45:02 +01:00
Valentin Gagarin 166dc5058a override page template for articles 2024-11-07 05:11:58 +01:00
Valentin Gagarin bcd432d0c2 further prettify output 2024-11-07 01:11:45 +01:00
Valentin Gagarin 42dfa74e16 reiterate on mandatory headings in sections 2024-11-07 01:11:45 +01:00
Valentin Gagarin 0dfd649736 ensure the section hierarchy is spec-compliant
- automatically assign heading levels
- check that the maximum nesting depth is not exceeded
2024-11-07 01:11:34 +01:00
Valentin Gagarin 3c94809129 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-06 04:04:46 +01:00
Valentin Gagarin dba0ad4550 fix module for <link> and <base> 2024-11-06 03:54:11 +01:00
Valentin Gagarin 08fb421413 fix attrs printing 2024-11-06 03:16:58 +01:00
Valentin Gagarin f4d40fdadf 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-05 12:45:56 +01:00