Unit 8: header refactor — extract modal JS + replace api.qrserver.com with images.QR#10
Open
stradichenko wants to merge 1 commit intomainfrom
Open
Unit 8: header refactor — extract modal JS + replace api.qrserver.com with images.QR#10stradichenko wants to merge 1 commit intomainfrom
stradichenko wants to merge 1 commit intomainfrom
Conversation
- Extract the inline <script> block (~90 LOC: share modal + mobile search) from header.html into assets/js/header-modal.js, bundled with js.Build | minify | fingerprint and SRI. - Replace the external <img src="https://api.qrserver.com/..."> with Hugo's images.QR (available since 0.122; theme floor is 0.136). - Add defer to all header <script> tags. - Wrap stable subtrees in partialCached (menu doesn't depend on per-page state, key on .Site). - i18n Search / Share / ToggleTheme strings with English fallback. - Replace inline social SVGs with calls to the shared partials/icons.html (Unit 7).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<script>block (~90 LOC: share modal + mobile search) fromheader.htmlintoassets/js/header-modal.js, bundled withjs.Build | minify | fingerprintand SRI.<img src="https://api.qrserver.com/...">with Hugo'simages.QR(available since 0.122; theme floor is 0.136).deferto all header<script>tags.partialCached(menu doesn't depend on per-page state, key on.Site).Search/Share/ToggleThemestrings with English fallback. Replace inline social SVGs with calls to the sharedpartials/icons.html(Unit 7).Notes for reviewer
header.html: Unit 14 movesstatic/img/logo.svg→assets/img/logo.svgand updates the logo block.Test plan
api.qrserver.comreference in built HTML.header-modal.jswith fingerprint + SRI.Part of the PKB-theme modernization batch (15 units).