Skip to content

Fix back-to-top button: add missing element and correct script path in all 14 proposition articles#797

Merged
pethers merged 2 commits intomain-ac1fc5b69b425a9bfrom
copilot/sub-pr-780-again
Mar 4, 2026
Merged

Fix back-to-top button: add missing element and correct script path in all 14 proposition articles#797
pethers merged 2 commits intomain-ac1fc5b69b425a9bfrom
copilot/sub-pr-780-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

All 14 language versions of the 2026-03-04 government propositions articles referenced ../scripts/back-to-top.js (non-existent) instead of ../js/back-to-top.js, and were missing the id="back-to-top" button element the script binds to — causing a 404 and silent no-op on every page.

Changes

  • Script path: ../scripts/back-to-top.js../js/back-to-top.js across all 14 files (scripts/ holds the TS source; compiled output is in js/)
  • Button element: Added localized <button id="back-to-top"> to each page — required by js/back-to-top.js which uses getElementById('back-to-top') to bind scroll behavior
<!-- Before (broken) -->
<script type="module" src="../scripts/back-to-top.js"></script>

<!-- After (fixed) -->
<button id="back-to-top" class="back-to-top" type="button" aria-label="Back to top"></button>
<script type="module" src="../js/back-to-top.js"></script>

aria-label is localized per language (e.g. "返回顶部" for ZH, "Zurück zum Seitenanfang" for DE, "العودة إلى الأعلى" for AR).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… in all 14 articles

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add government propositions articles for 2026-03-04 Fix back-to-top button: add missing element and correct script path in all 14 proposition articles Mar 4, 2026
@pethers pethers marked this pull request as ready for review March 4, 2026 08:36
@pethers pethers merged commit c0ab2b6 into main-ac1fc5b69b425a9b Mar 4, 2026
@pethers pethers deleted the copilot/sub-pr-780-again branch March 4, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants