Commit Graph
5 Commits
Author SHA1 Message Date
Dennis Eisold 7168d9b1e9 Merge branch 'main' into feature/quiz-mode-button 2026-05-03 22:14:02 +02:00
Dennis EisoldandTim Grelka 7bec281cd4 Apply suggestion from @tgrelka
Co-authored-by: Tim Grelka <tim@grelka.net>
2026-05-03 21:17:52 +02:00
Dennis EisoldandTim Grelka 37ad5fea2b Apply suggestion from @tgrelka
Co-authored-by: Tim Grelka <tim@grelka.net>
2026-05-03 21:17:43 +02:00
Dennis Eisold a1698c9d3d Use data-quiz-shown attributes for quiz mode visibility
Mark elements that should remain visible in quiz mode at build time
via data-quiz-shown attributes (toolbar, breadcrumb, h1, questions,
solution links, next-section/-chapter links). The runtime tail
detection becomes obsolete and the CSS collapses to a single show/hide
rule.

Switch the body markers to data-quiz-mode / data-quiz-has-questions
attributes, swap the toggle between btn-secondary and btn-primary
instead of hardcoded colors, and use Bootstrap's alert alert-info for
the no-questions notice.
2026-05-03 20:09:46 +02:00
Dennis Eisold 4d08c3db55 Add quiz mode toggle to chapter/section toolbar
Adds a button to the existing top-right button group on chapter and
section pages that hides everything outside of the breadcrumb, the
heading, the rendered questions and the link to the next section or
chapter at the end of the page. The state is persisted via
localStorage so it survives navigation. On pages without questions a
small notice is shown instead.

Replaces the previously published userscript by integrating the same
behaviour directly into the site.
2026-04-30 22:11:55 +02:00