]> piware.de Git - chordpro-web.git/log
chordpro-web.git
6 weeks agoSupport dark mode
Martin Pitt [Wed, 23 Sep 2026 20:54:19 +0000 (22:54 +0200)]
Support dark mode

color-scheme lets the browser pick background and text colours from the
user's preference. The light grey text shadow behind chords looks
wrong on a dark background, and the bold red is legible without it.

6 weeks agoAdd viewport meta tag
Martin Pitt [Wed, 23 Sep 2026 20:54:19 +0000 (22:54 +0200)]
Add viewport meta tag

Without it, phones lay the page out at desktop width and scale it down.

6 weeks agoShow load errors on the page
Martin Pitt [Wed, 23 Sep 2026 20:54:19 +0000 (22:54 +0200)]
Show load errors on the page

A failed fetch of the URL from the l parameter only warned on the console,
leaving the user with "No file loaded" and no hint why.

6 weeks agoUse top-level await for startup
Martin Pitt [Wed, 23 Sep 2026 20:52:17 +0000 (22:52 +0200)]
Use top-level await for startup

Module scripts can await directly, so the main() wrapper only added
indentation and an unobserved promise.

6 weeks agoKeep the song content local to the renderer
Martin Pitt [Wed, 23 Sep 2026 20:51:09 +0000 (22:51 +0200)]
Keep the song content local to the renderer

The comment handler appended to a module level array, which the renderer had
to reset on every call. Directive handlers now return the content to render
instead; lit ignores the undefined results of handlers that only set headings.

6 weeks agoMerge identical italic rules
Martin Pitt [Wed, 23 Sep 2026 20:48:46 +0000 (22:48 +0200)]
Merge identical italic rules

6 weeks agoDrop ineffective verse bottom margin
Martin Pitt [Wed, 23 Sep 2026 20:48:20 +0000 (22:48 +0200)]
Drop ineffective verse bottom margin

It collapses with the default 1em top margin of the following paragraph, so
the gap between verses was 1em all along.

6 weeks agoScope chord styling to verses with chords
Martin Pitt [Wed, 23 Sep 2026 20:47:42 +0000 (22:47 +0200)]
Scope chord styling to verses with chords

The empty chord span of a line without chords still got the chord padding,
which indented every chordless verse by 0.3ex. Chords only exist in .chords
verses, so all their styling moves into that block, written with CSS nesting.

6 weeks agoDrop the lyrics span
Martin Pitt [Wed, 23 Sep 2026 20:46:44 +0000 (22:46 +0200)]
Drop the lyrics span

The lyrics text node after the block level chord row forms its own row by
itself, so the wrapper span was only extra markup and an extra CSS rule.

6 weeks agoRecognize directives without argument
Martin Pitt [Wed, 23 Sep 2026 20:45:53 +0000 (22:45 +0200)]
Recognize directives without argument

Directives like `{start_of_chorus}` or `{eoc}` did not match the
directive pattern, so they were rendered literally as lyrics. They now
get the same "unknown directive" warning as other unsupported ones.

6 weeks agoFlush open verse on directives and at end of file
Martin Pitt [Wed, 23 Sep 2026 20:44:59 +0000 (22:44 +0200)]
Flush open verse on directives and at end of file

Verses were only emitted on a blank line. A directive directly after a
lyrics line, such as {comment: Chorus}, thus appeared before that verse,
and a file without a trailing newline lost its last verse.

6 weeks agoLay out chords and lyrics as segments
Martin Pitt [Wed, 23 Sep 2026 20:30:13 +0000 (22:30 +0200)]
Lay out chords and lyrics as segments

Zero-width chords overlapped whenever the text under them, or even
empty: adjacent chords (intros/bridges without text), chords separated by
a single space, or a long chord name over a short syllable. The rule from
dc37808 only widened the second chord of a run, so the first pair still
collided.

Group each chord with the lyrics up to the next chord into a segment with
two rows. Its width is the wider of the two, which fixes the overlap.

6 weeks agoupdate lit import to current CDN
Martin Pitt [Wed, 23 Sep 2026 20:17:59 +0000 (22:17 +0200)]
update lit import to current CDN

3 years agoAdd loading via URL
Martin Pitt [Sun, 2 Jul 2023 06:37:16 +0000 (08:37 +0200)]
Add loading via URL

3 years agoPartial fix for chord-only paragraphs
Martin Pitt [Sat, 1 Jul 2023 12:27:55 +0000 (14:27 +0200)]
Partial fix for chord-only paragraphs

3 years agoInitial implementation
Martin Pitt [Sat, 1 Jul 2023 11:46:21 +0000 (13:46 +0200)]
Initial implementation

3 years agoInitial PoC
Martin Pitt [Sat, 1 Jul 2023 09:57:47 +0000 (11:57 +0200)]
Initial PoC