Web layer cleanup: Bootstrap removal, JS splitting, CSS consolidation, legal page injection #32
Reference in New Issue
Block a user
Delete Branch "refactor/web-cleanup-31"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Full front-end layer cleanup without functionality changes. Removes technical debt, reduces file sizes, improves code structure.
Why
Changes
Commit 1: Remove Bootstrap CSS/JS, add 4 replacement utility rules, delete dead style.css
Commit 2: myai.css restructure—section comments, merge duplicate @media blocks, CSS-based initial hiding
Commit 3: HTML cleanup—remove inline style="", remove orphan ooter-legal class, add script tags
Commit 4: Create i18n.js with EN/RO translation dictionaries (228 keys)
Commit 5: Create cv-matcher.js with CV form logic and result rendering
Commit 6: Rewrite main.js—slim (543 lines with docs), JSDoc on all functions, expose utilities on window.MyAi
Commit 7: Enhance legal.js to inject topbar + language-aware footer; strip duplication from 6 legal pages (114 lines saved)
Includes jQuery 4.0.0 upgrade from previous PR.
Testing
Risk Assessment
Checklist
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
- Add section block comments throughout for navigability - Merge two duplicate @media (max-width:900px) blocks into one - Remove dead .ai-mark rule (replaced by <img> logo, never rendered) - Move .cookie-overlay, .cookie-manage to display:none by default (removes need for inline style="display:none;" on those elements) - Add .loader-overlay.loader-visible{display:flex} so JS can use class toggling instead of .css('display','flex') — works correctly with jQuery 4.0's getComputedStyle-based visibility detection - Consolidate brand-mark, console-line, nav-actions rules next to their related blocks (were scattered at end of file) Closes #31 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>- Remove all 7 inline style="display:none;" attributes from loaders/cookie elements (now handled by CSS with .loader-overlay { display: none } and .loader-overlay.loader-visible { display: flex }) - Remove orphan footer-legal class (unused in CSS) from footer-links divs - Add <script src="/js/i18n.js"></script> before main.js on both pages - Add <script src="/js/cv-matcher.js"></script> after main.js on cv-matcher page jQuery 4.0 now detects CSS display:none correctly via getComputedStyle, so class-based visibility (.loader-visible) works seamlessly. Closes #31 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>