diff options
author | Jean-Nicolas Veigel <art.jnveigel@gmail.com> | 2024-03-15 11:02:54 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-03-26 10:31:25 +0000 |
commit | 33eb4bc911f117a873b84ccef42993aa006ed050 (patch) | |
tree | a7593b960569873c14316cba5f832c52d1accd28 /src/tour.gleam | |
parent | 1189a4538d497f2054f7bdbcf5a4beee9bda99b3 (diff) | |
download | tour-33eb4bc911f117a873b84ccef42993aa006ed050.tar.gz tour-33eb4bc911f117a873b84ccef42993aa006ed050.zip |
style: tweak colors, hovers & snipets
Diffstat (limited to 'src/tour.gleam')
-rw-r--r-- | src/tour.gleam | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/tour.gleam b/src/tour.gleam index 9dabc58..0b09e1c 100644 --- a/src/tour.gleam +++ b/src/tour.gleam @@ -529,7 +529,9 @@ fn everything_chapter_lesson_html(lesson: Lesson, index: Int, end_index: Int) { let lesson_content = h("article", [#("class", "lesson"), #("id", slugify_path(lesson.path))], [ - h("h2", [#("class", "lesson-title")], [text(lesson.name)]), + h("a", [#("href", "#" <> slugify_path(lesson.path)), #("class", "link")], [ + h("h2", [#("class", "lesson-title")], [text(lesson.name)]), + ]), htmb.dangerous_unescaped_fragment(string_builder.from_string(lesson.text)), h("pre", [#("class", "lesson-snippet")], [ h("code", [], [text(lesson.code)]), @@ -596,9 +598,14 @@ fn everything_html(chapters: List(Chapter)) -> String { [], list.map(chapter.lessons, fn(lesson) { h("li", [], [ - h("a", [#("href", "#" <> slugify_path(lesson.path))], [ - text(lesson.name), - ]), + h( + "a", + [ + #("href", "#" <> slugify_path(lesson.path)), + #("class", "link"), + ], + [text(lesson.name)], + ), ]) }), ), |