Commit graph

294 commits

Author SHA1 Message Date
ba7885afe6 fix: convert relative CSS URLs to absolute in translated pages
- Convert relative CSS URLs to absolute URLs using current origin
- Ensure translated pages can load original blog CSS in new window
- Maintain modal functionality with external CSS files
- Skip URLs that are already absolute (http/https or protocol-relative)
2025-07-09 16:23:38 -04:00
761c4ec259 debug: add console logging to CSS inlining for translated pages
- Add logging to see how many CSS links are found
- Log each CSS file being inlined and success/failure
- Help diagnose why translated pages may not have modal styling
2025-07-09 16:21:40 -04:00
c65bde327c fix: inline external CSS in translated pages for new window compatibility
- Fetch external uncloseai CSS files and inline them as <style> tags
- Replace body content with translated version while preserving page structure
- Ensure new window is self-contained and doesn't need external CSS requests
- Maintain new window approach to avoid breaking current page
2025-07-09 16:18:36 -04:00
1b7597501a revert: restore original translateCurrentPage function
The CSS refactoring broke translated page rendering. The original function
was working correctly by translating the complete HTML document structure.
Translated pages don't need modal CSS, just the original page styling.
2025-07-09 16:14:44 -04:00
fbe81a8298 fix: preserve HTML structure and styling in translated pages
- Update translateCurrentPage() to preserve original page HTML structure
- Extract only text content for translation while keeping head/styles
- Create properly formatted translated page with clean typography
- Fix issue where translated pages opened in new windows lacked CSS styling
2025-07-09 16:13:25 -04:00
f3bd60e578 fix: correct CSS file domain from ai.unturf.com to uncloseai.com 2025-07-09 16:07:47 -04:00
20a95224fd fix: use actual PicoCSS presence detection instead of USE_CUSTOM_STYLING flag
- Change CSS loading logic to detect actual PicoCSS link tags on page
- Blog sites without PicoCSS now correctly load uncloseai-modal-builtin.css
- PicoCSS sites load uncloseai-modal-pico.css with proper overrides
- Fix modal appearing full-screen on blog sites that don't use PicoCSS
2025-07-09 16:04:49 -04:00
121d79d838 fix: add !important to PicoCSS overrides to force proper modal sizing 2025-07-09 16:00:25 -04:00
b46aedcdf3 fix: restore isMobile variable definition for responsive text sizing 2025-07-09 15:23:06 -04:00
e3e6e08449 feat: complete CSS refactoring - remove all inline styles
- Remove all inline CSS from translate-modal.js, tts-modal.js, and widget-library.js
- Replace inline styles with CSS classes in both builtin and pico CSS files
- Eliminate USE_CUSTOM_STYLING conditionals from styling code
- Add proper CSS classes: translate-modal-*, tts-modal-*, widget-*
- Maintain all functionality while achieving clean separation of concerns
- Fix modal sizing issues on large displays through proper PicoCSS overrides
- Support responsive design with mobile-first approach (≤480px full screen)
- Pass all tests: formatting, exports, translations, and integration
2025-07-09 15:20:06 -04:00
adfbdc395b feat: refactor all modal styles to dedicated CSS files
- Create uncloseai-modal-builtin.css for blog versions
- Create uncloseai-modal-pico.css for PicoCSS override
- Add conditional CSS loading to all modal JavaScript files
- Remove inline styles from main modal, translate modal, TTS modal, and widget library
- Fix modal full-screen issue on large displays with proper PicoCSS overrides
- Maintain mobile-first responsive design (≤480px full screen)
- Support both USE_CUSTOM_STYLING modes for maximum compatibility
2025-07-09 14:57:30 -04:00
f0d27bbbef fix: reduce modal width and enforce max-width constraint
Changed desktop modal width from 90vw to 70vw and added \!important
to max-width to ensure modal doesn't fill entire screen on large displays.
2025-07-09 14:26:03 -04:00
de9eeffe70 fix: prevent modal from filling full screen on laptops
Changed mobile detection threshold from 768px to 480px to ensure
centered modal behavior on desktop/laptop screens while preserving
full-screen experience on actual mobile devices.
2025-07-09 10:00:45 -04:00
72c73b9a99 fix: reorganize Python and Node.js examples under Hermes AI Model section
- Changed Node.js Examples from h2 to h3 to be subsection under Using the Hermes AI Model
- Updated table of contents to group all Python and Node.js examples under main Hermes section
- Improved logical document structure with consistent hierarchy
- All AI model examples now properly organized under single main section

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 15:59:20 -04:00
98996476a8 fix: enhance table of contents visual hierarchy with custom CSS
- Added distinct bullet styles (disc for main, circle for sub-items)
- Implemented proper indentation with padding and margins
- Added subtle left border for nested sections using theme color
- Differentiated font sizes between main sections and subsections
- Improved line height and spacing for better readability
- Maintains PicoCSS compatibility while clearly showing hierarchy

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 15:56:28 -04:00
d9569c77fe feat: complete table of contents and header structure overhaul
- Added comprehensive hierarchical table of contents with proper h2/h3 nesting
- Added missing section IDs to all headers for proper anchor navigation
- Restructured headers to use only h2 (main sections) and h3 (subsections)
- Organized content with logical grouping: Web Client, OpenAI Client, Hermes Model, Node.js, TTS
- Enhanced navigation with complete coverage of all sections and subsections
- Improved document structure and accessibility with semantic HTML

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 15:53:57 -04:00
38054643d4 fix: use semantic HTML and PicoCSS styling for table of contents
- Changed from <section> to <aside> for proper semantic navigation
- Removed custom CSS overrides that conflicted with PicoCSS
- Simplified structure from nested ordered/unordered lists to flat unordered list
- Removed inline styling to let PicoCSS handle navigation appearance
- Improved accessibility and framework compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 15:41:25 -04:00
d9b9b8a5c1 feat: add comprehensive table of contents to index page
- Added navigational table of contents with hierarchical structure
- Added missing section IDs for proper anchor linking
- Organized content into logical sections with subsections
- Included prominent link to demo page for interactive examples
- Improved page navigation and user experience

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 15:25:02 -04:00
b9be6e512a fix: streamline quick start section and ensure consistent code-first demo structure
- Streamlined index.html quick start section to focus on one-line installation
- Fixed demo.html section ordering to consistently show code examples before live demos
- Corrected section 12 numbering (was duplicate section 11)
- Enhanced demo page user experience with proper code-then-demo flow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 15:11:17 -04:00
f79a66ddf0 feat: add comprehensive code documentation to Custom API Examples section 2025-07-04 14:43:51 -04:00
af7019f91b fix: make all code examples visible by default
- Add 'open' attribute to all <details> sections
- Ensure code examples are immediately visible to users
- No need to click to expand - documentation should be accessible
2025-07-04 14:36:30 -04:00
1bf4d26a8a feat: comprehensive demo page documentation improvement
- Add TTS modal button example with openTTSModal() function
- Add translation modal button example with openTranslateModal() function
- Add standalone read page button example with readPageWithHermes() function
- Reorganize all sections to show live examples first, then code examples
- Improve documentation flow: demo first, then implementation details
- Add detailed feature lists and best-use-case descriptions
- Provide multiple implementation options for each feature (widget vs modal vs API)
- Update table of contents to reflect new organization
- Make it easy for people to add widgets to any webpage with clear examples
2025-07-04 14:32:13 -04:00
c57d86c27f fix: properly load all widget functions for demo page
- Restore translate modal demo - it works fine on main app
- Add manual imports for openTranslateModal, openTTSModal, readPageWithHermes
- Ensure all widget functions are available globally for demo widgets
- Fix module loading issues that were causing "is not a function" errors
- Make translation modal work as isolated tool in demo
2025-07-04 14:24:52 -04:00
9148d26496 fix: completely remove smart translate dropdown from demo
- Comment out entire smart dropdown section - no point advertising broken features
- Simplify translation section to only show working translation modal
- Update section title from "Translation Options" to "Translation Modal"
- Change "Live Examples" to "Live Example" (singular)
- Clean up code examples to only show working translate feature
- Remove confusing "two ways to translate" messaging
2025-07-04 14:17:52 -04:00
61b4cb0d5c fix: disable non-working features in demo.html
- Remove file upload references from system message
- Comment out smart-translate feature examples (not working yet)
- Disable smart translate demo with "Under Development" styling
- Keep traditional translate modal working
- Style disabled features with greyed-out appearance
- Fix demo page to only show working functionality
2025-07-04 12:49:53 -04:00
ce7014e83a fix: resolve handleFileUpload ReferenceError while preserving upload code for future
- Restore handleFileUpload import in widget-library.js to fix ReferenceError
- Keep all upload functionality code intact for future development
- Disable upload features in demo.html with "Under Development" messaging
- Remove upload from feature button examples but preserve the code
- Style disabled upload demo with greyed-out appearance
- Fix demo page functionality while maintaining upload code for future fixes
2025-07-04 12:43:04 -04:00
38fdedb6a6 docs: enhance language support documentation and remove auto-detection claims
- Expand README language section with complete list of 19 supported languages
- Add native language names and language codes for each supported language
- Detail language features: manual selection, complete coverage, AI responses
- List comprehensive translation coverage areas (modals, buttons, messages, etc.)
- Update project structure to show language files with descriptions
- Remove auto-detection claims since feature is not working properly
- Change to accurate "manual selection" and "AI-powered translation"
- Fix demo.html to remove false auto-detection advertising

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 12:31:53 -04:00
8c99a0316e fix: correct demo.html issues and update language count to 19
- Fix demo.html language count from 18 to 19 (verified by counting files)
- Remove "omni-directional" translation claims and use standard "Translation"
- Fix custom TTS example to use speakTextDirect instead of speakText (no Hermes preprocessing)
- Fix all demo functions to properly import modules dynamically
- Add missing imports for sendMessage, uploadFile, speakTextDirect, translateText
- Fix broken custom chat, TTS, file upload, page analysis, and translation examples
- Update README.rst and index.html language counts to accurate 19 languages
- Fix typo "transation" to "translation" in index.html

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 12:28:15 -04:00
d7cc5531b8 feat: improve streaming completion detection and add syntax highlighting with copy buttons
- Detect when model streaming is complete in all streaming locations
- Add syntax highlighting (hljs) to code blocks after streaming finishes
- Add copy buttons to code blocks after highlighting is applied
- Prevent duplicate copy buttons with CSS class detection
- Optimize performance by doing syntax highlighting and copy buttons only once per message
- Apply improvements to both modal streaming and standalone chat
- Add copy buttons to intro message generation as well

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 12:22:18 -04:00
41818a202b docs: add comprehensive README.rst and documentation sections to index.html and demo.html
- Created extensive README.rst with full project documentation
- Added brief documentation sections to index.html and demo.html
- Emphasized public domain licensing and open web philosophy
- Fixed branding to use lowercase uncloseai. and unturf.
- Points users to git repository for complete technical details

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-04 12:13:15 -04:00
91f446f5ed Revert "fix: explicitly set white color for uncloseai logo text in PicoCSS light mode"
This reverts commit f50ccabcd1.
2025-07-04 12:03:57 -04:00
f50ccabcd1 fix: explicitly set white color for uncloseai logo text in PicoCSS light mode 2025-07-04 11:59:32 -04:00
b49e52678b Revert "fix: use original page content for title generation instead of processed TTS content"
This reverts commit b178e039b2.
2025-07-03 22:40:55 -04:00
b178e039b2 fix: use original page content for title generation instead of processed TTS content 2025-07-03 22:39:55 -04:00
7bb43c7613 fix: make dropdown text color conditional for PicoCSS and fix download button positioning to be next to play buttons 2025-07-03 22:32:44 -04:00
2e655a206b fix: make tab styling conditional - only apply custom CSS for blog version, let PicoCSS handle native styling 2025-07-03 22:20:55 -04:00
f4c39823b1 fix: add proper tab styling to replace bullet points with visual tab design 2025-07-03 22:17:40 -04:00
d8642675df update translate modal title from 'Translate Page' to 'Translate' across all 19 languages 2025-07-03 22:17:01 -04:00
375471e81a feat: replace button-based tabs with PicoCSS tab navigation in translate modal 2025-07-03 22:11:20 -04:00
d24b6fa1bb fix: use correct variable name targetLanguage instead of targetLanguageCode 2025-07-03 22:04:43 -04:00
28d0b516f1 fix: use exact tokenization in translate modal UI instead of rough estimate 2025-07-03 22:01:01 -04:00
e300a93545 fix: replace tokenInfo reference with roughTokenEstimate in translate modal 2025-07-03 21:49:44 -04:00
f53742a9d5 fix: tokenize actual prompt sent to AI instead of raw HTML and remove duplicate tokenization from modal 2025-07-03 21:46:22 -04:00
cda3455a22 fix: remove enforceModalTextColors function and set black text directly on textarea and dropdowns 2025-07-03 21:36:13 -04:00
a8de98a56a fix: improve tokenizer response parsing and force black text on all modal elements 2025-07-03 21:30:41 -04:00
04b062f3f8 fix: strip v1 from tokenize endpoint since it uses base URL not v1 API 2025-07-03 21:24:37 -04:00
5364b6c446 fix: revert v1 prefix from API endpoints to restore Read Page functionality 2025-07-03 21:20:14 -04:00
c2aa8f1fbd fix: ensure form elements have black text on white backgrounds 2025-07-03 21:18:58 -04:00
969dcbc31e fix: simplify modal text colors and add v1 prefix to API endpoints 2025-07-03 21:16:05 -04:00
29a6a82fa1 fix: enforce modal text colors to prevent white-on-white text issues
- Add enforceModalTextColors() function with high CSS specificity
- Use !important declarations to override blog CSS
- Force dark text (#212529) on inputs, buttons, and general content
- Keep white text on user messages for proper contrast
- Add user-message class to user messages for targeted styling
- Prevents unreadable white text on white backgrounds on blog
2025-07-03 21:11:05 -04:00