legal.js now:
- Dynamically injects a common topbar (logo + language switcher) on all 6 pages
- Dynamically injects a language-aware footer (EN vs RO copyright text)
- Detects page language and builds appropriate language links
- Uses event delegation for language links (works on injected elements)
- Persists language preference to localStorage
All 6 legal HTML pages now:
- Removed the hardcoded topbar div (12 lines of identical HTML per file)
- Removed the hardcoded footer div (7 lines of HTML with language-specific content)
- Total savings: 114 lines of duplicated HTML across 6 pages
- Pages are 38% smaller (60 lines → 37 lines core content)
Closes#31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract CV matcher form logic from main.js into dedicated cv-matcher.js:
- CV file upload with validation
- Job URL/description input
- reCaptcha token retrieval for upload and match actions
- Match result rendering with score badge, strengths, gaps, evidence
- Helper functions: extractApiError, escapeHtml, showFieldError, etc.
Depends on jQuery, i18n.js, and shared utilities from main.js.
Closes#31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract i18n dictionary from main.js into dedicated i18n.js module.
Sets window.MyAi.i18n with 228 keys across English and Romanian.
Main.js will consume this via t(key) helper function.
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>
- 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>
Bootstrap CSS (232 KB) and Bootstrap JS (39 KB) were loaded for only
4 utility classes (.btn-sm, .btn-dark, .btn-warning, .shadow).
Replace with 4 targeted rules in myai.css and delete both files.
style.css (784 lines) was unreferenced by any HTML page — delete it.
Closes#31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>