Unit 10: 404 page — extract physics JS + CSS, self-host or SRI vendor scripts#12
Open
stradichenko wants to merge 1 commit intomainfrom
Open
Unit 10: 404 page — extract physics JS + CSS, self-host or SRI vendor scripts#12stradichenko wants to merge 1 commit intomainfrom
stradichenko wants to merge 1 commit intomainfrom
Conversation
- Extract inline <style> from 404.html into assets/css/404.css and replace hardcoded hex colors with theme tokens from core.css. - Extract the ~213-LOC inline physics simulation <script> into assets/js/404-cube.js, bundled with js.Build | minify | fingerprint. - For three.js + cannon.js, prefer self-hosted vendor copies (added a partials/404/vendor-script.html helper that uses resources.GetRemote when network is available, otherwise emits the CDN <script> with SRI and crossorigin=anonymous). - defer all 404-page scripts. - i18n the page strings (404 / page not found / error copy).
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
<style>from404.htmlintoassets/css/404.cssand replace hardcoded hex colors with theme tokens fromcore.css.<script>intoassets/js/404-cube.js, bundled withjs.Build | minify | fingerprint.three.js+cannon.js, prefer self-hosted vendor copies. Added apartials/404/vendor-script.htmlhelper that usesresources.GetRemotewhen network is available, otherwise emits the CDN<script>with SRI andcrossorigin="anonymous".deferall 404-page scripts. i18n the page strings.Test plan
curl /404.html→ contains404-cube.jsfingerprinted reference.core.css.Part of the PKB-theme modernization batch (15 units).