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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<br/>
|
||||
<div>
|
||||
<div data-quiz-shown>
|
||||
Weiter zum nächsten Abschnitt: <a href="{{ url }}">{{ title }}</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user