mirror of
https://github.com/deunix-educ/PyQuest.git
synced 2026-11-25 08:19:44 +01:00
Redesign navigation: slide-in drawers for levels and settings, level header and deep links
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,8 +41,11 @@ export class ProgressMap extends EventTarget {
|
||||
);
|
||||
return el('li', {}, button);
|
||||
});
|
||||
const doneCount = levels.filter(({ id }) => id in progress.completedLevels).length;
|
||||
const summary = this.#i18n.t('progress.levels_done', { done: doneCount, total: levels.length });
|
||||
this.#root.replaceChildren(
|
||||
el('h2', { text: this.#i18n.t('progress.title') }),
|
||||
el('p', { class: 'progress-count', id: 'progress-count', text: summary }),
|
||||
el('progress', { class: 'progress-bar', max: levels.length, value: doneCount, 'aria-labelledby': 'progress-count' }),
|
||||
el('p', { class: 'progress-summary', text: `${this.#i18n.t('progress.xp', { xp: progress.xp })} · ${this.#i18n.t('progress.streak', { days: progress.streak.current })}` }),
|
||||
el('ol', { class: 'level-list' }, ...items),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user