Commit Graph

344 Commits

Author SHA1 Message Date
Cell 5e6e2904ff perf(mermaid): improve error handling and optimize rendering for mobile 2026-04-30 11:58:57 +08:00
Cell e68d10d7d9 refactor(mermaid): performance optimization and support pan and zoom etc. (#737)
* perf(mermaid): optimize rendering by deferring non-critical tasks and enhancing viewport observation

* feat(mermaid): add panzoom and download svg actions for mermaid

* feat(mermaid): enhance diagram controls and add fullscreen action for code tabs

* feat(i18n): update translation keys for diagram and tab actions in multiple languages

* fix(mermaid): move mermaid-neutral inside diagram-container in wrapper mode

Agent-Logs-Url: https://github.com/hugo-fixit/FixIt/sessions/e79e837e-be0b-445c-8bd3-8c03cdce2651

Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>

* fix(mermaid): update download filename for SVG export in diagram controls

* refactor(mermaid): refactor rendering logic and enhance task queue for improved performance

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-29 16:42:15 +08:00
Cell f9c7e1d991 perf(code-tab): enhance code toggle functionality with improved tab switching and state management 2026-04-23 10:22:46 +08:00
Cell 95664509a0 fix(layout): specify selector for comments section in SCSS 2026-04-22 15:02:30 +08:00
Cell 09e08d0772 refactor!: migrate theme assets from css to scss and centralize deprecation detection (#735)
**Breaking changes**:

1. Legacy custom style/script files are no longer loaded automatically.
2. Users must migrate custom files to:
   - `custom.scss`
   - `override.scss`
   - `_variables.scss`
   - `assets/js/custom.js`

**Migration guide**:

1. Move `assets/css/_custom.scss` to `assets/scss/custom.scss`.
2. Move `assets/css/_override.scss` to `assets/scss/override.scss`.
3. Keep variables in `assets/scss/_variables.scss`.
4. Move `assets/js/_custom.js` to `assets/js/custom.js`.
5. Rebuild site and verify no deprecation warnings remain.
2026-04-19 13:34:01 +08:00
0x5c0f 75ee1624bd feat(link): add external link guard feature support (#729)
* feat(external-link-guard): add native redirect mode and improve external-link guard UX

* fix(external-link-guard): remove redirect_url and clarify scope/new_tab_policy docs

* i18n(external-link-guard): localize guard texts across non-English locales

* feat(config)!: migrate `site.Params.externalIcon` to `site.Params.link.external_icon`

* refactor: implement regular and card link rendering

* feat(link-guard): implement link redirection page with copy and confirm functionality

* revert

* feat: implement link guard dialog for external links

---------

Co-authored-by: Cell <1024@lruihao.cn>
2026-04-11 14:37:31 +08:00
Cell e527289140 feat(buttons): replace role="button" with button elements for improved accessibility 2026-04-07 14:06:06 +08:00
Cell 29ece68332 feat(accessibility): enhance accessibility features across components and improve focus management (#725) 2026-04-03 18:00:17 +08:00
Cell 741ef191bf feat(task-list): add task list utility mixins and enhance rendering logic 2026-03-30 16:48:55 +08:00
Cell 164a699701 refactor(UI/UX)!: refactor styles for theme support and enhance visual consistency (#722)
* refactor(styles): unify theme properties and update color variables across stylesheets

* Implement theme mode support with light-dark color adjustments across stylesheets

- Added color-scheme support in _root.scss for light and dark modes.
- Replaced theme property mixins with light-dark function in various widget styles including _cell-tooltip.scss, _cookieconsent.scss, _fixed-button.scss, and others.
- Updated alert styles in _alert.scss to use light-dark for border and text colors.
- Refactored code syntax highlighting in _code.scss and _code-syntax/_index.scss to utilize light-dark for background gradients.
- Enhanced search input styles in _search.scss to adapt to theme mode.
- Modified theme switching logic in color-scheme.js and theme.js to support new theme mode structure.
- Adjusted APlayer and Valine styles to accommodate dark mode using new theme variables.

* feat(shortcode): add auto-dark shortcode for dark mode adaptation

* refactor(styles): update theme colors and improve box-shadow properties for better visual consistency

* feat(header): add scroll-state container queries and enhance header shadow effects

* feat(styles): enhance scroll behavior with overscroll-behavior adjustments for better UX

* feat(styles): update code&table styles and colors for improved visual consistency

* feat(styles): update color variables and improve font styling for better visual hierarchy
2026-03-30 16:48:55 +08:00
Cell e0a0086f03 fix(header): improve header animation on scroll events 2026-03-30 16:48:55 +08:00
Cell 11954d833f feat(header): refactored the blur effect to backdrop-filter and added a configuration switch (#721)
- Removed the old blur mixin based on filter: blur, and replaced it with backdrop-filter for a more modern frosted glass effect

- Added the `params.header.blur` configuration option, allowing users to enable/disable the header blur effect

- Refactored the masking interaction of the mobile menu and search, applying the blur class to the masking element instead of the body

- Updated the header animation class name to distinguish it from custom animations and avoid conflicts with Animate.css

- Adjusted responsive breakpoints, changing `xs` to `sm` to improve mobile display

- Optimized the header background color and the background color of the fixed buttons
2026-03-30 16:48:55 +08:00
Cell cfa9bef6ac refactor(layout): refactor single page layout and partials categorization 2026-03-30 16:48:55 +08:00
Cell 9132b408c6 refactor(utils): migrate utility functions into common module and rewrite method calls 2026-03-24 11:36:28 +08:00
Cell a53ef80035 feat(print): add print configuration options and enhance print functionality (#720) 2026-03-22 20:06:27 +08:00
Cell 0f2712f182 fix(tooltip): update cell-tooltip version to 0.3.0 and enhance code copy btn 2026-03-21 02:38:04 +08:00
Cell d5aa013106 feat(code): remember the selected language of the code toggle 2026-03-21 00:47:12 +08:00
Cell d9e45154ff fix(code): repeated initialization of the code tab in the encryption page 2026-03-21 00:03:07 +08:00
Cell b09555981b feat(code): add toggle code block functionality and enhance code tabs (#719)
* feat(markup): add toggle code block functionality with multiple format support

* fix(assets): improve filename generation for code downloads

* feat(code): add `before_tabs` attribute support for tabbed code blocks

* feat(code): implement visibility control for first tab content in code blocks
2026-03-20 17:26:28 +08:00
Cell 9e384b666f fix(assets): update cell-tooltip v0.2.0 to fix the MIME type error for the .cjs extension (#718) 2026-03-20 11:20:25 +08:00
Cell 9bac69b2ec fix: update print handling and improve file tree interactions 2026-03-19 11:42:15 +08:00
Cell 02ac3f5259 feat(code): add shadow effect for code blocks (#713) 2026-03-12 17:28:15 +08:00
Cell c8d028aa0e feat(tabs): enhance tab styles and improve active code tab handling (#712)
* feat(tabs): enhance tab styles with sliding indicators and hover effects

* feat(tabs): improve active code tab handling and initialization logic
2026-03-12 11:41:52 +08:00
Cell f2c112e402 feat(code): add tabbed codeblocks support (#710) 2026-03-10 17:33:28 +08:00
Cell fe7105a38a fix: optimize TOC initialization with a timeout and clean up button spacing in decryptor 2026-03-08 17:57:41 +08:00
Cell d97e69ad0a feat(tooltip): add cell-tooltip integration for footnote references a… (#709)
* feat(tooltip): add cell-tooltip integration for footnote references and initialize tooltips

* fix(code-header): add data-ct-tooltip attribute to action buttons for better accessibility
2026-03-06 19:25:35 +08:00
Cell 98a82d845a refactor(Util): convert methods to static for better accessibility and usage 2026-03-06 10:46:47 +08:00
Cell 69d8e67c24 feat(code): add fullscreen functionality for code blocks (#707) 2026-03-03 16:15:01 +08:00
Cell 6196cd5edf feat(code): add download button for code blocks and related functionality (#706) 2026-03-02 17:34:57 +08:00
Cell 3926cc0220 refactor: reorganize CSS structure and standardize CSS variable usage for improved maintainability (#690)
* refactor: CSS variables to use fixit-var for consistency across styles

* refactor: reorganize CSS structure and consolidate imports for improved maintainability

* refactor: unify CSS variable usage and improve structure across stylesheets

* refactor: standardize CSS variable usage for layout

* refactor: standardize CSS variable usage for archive and special pages

* refactor: standardize CSS variable usage for single page

* refactor: standardize CSS variable usage for widgets

* refactor(css): refactors the border-radius mixin and adds the .rounded-full utility class

* refactor: standardize z-index usage across components

* refactor(css): removes deprecated compatibility mixins and replaces them with native CSS properties

* feat: unify color variable naming and update theme color values

- Rename `global-font-secondary-color` to `global-placeholder-color` for more accurate description of its purpose
- Update multiple style references to use the new `secondary` theme color variable
- Update theme color mapping to the new color values ​​for improved visual consistency
- Fixed the use of search box placeholder colors and removed hard-coded transparency values
- Added color preview test documentation for easier verification of color rendering
- Cleaned up some duplicate dark mode styles and replaced them with unified CSS variables

* refactor: remove the `hr-background-color` variable and uses `global-border-color` uniformly

* feat(CSE): add dark theme style to Google CSE search box and results container

* fix(task-lists): fixed styling and rendering issues with nested task lists
2026-02-28 17:24:10 +08:00
Cell 8367c13ebd fix(i): make change for FontAwesome v7
https://docs.fontawesome.com/upgrade/whats-changed/
2026-01-17 00:39:12 +08:00
Cell 536e0b171e fix: add HTMLEscape function to fix XSS attack in search feature (#687) 2026-01-16 20:02:22 +08:00
Cell fdfd772100 feat(File Tree): add file-tree shortcode support (#685)
* feat(File Tree): add `file-tree` shortcode support

* feat(file-tree): add ignoreList parameter to file-tree shortcode

* feat(file-tree): enhance file-tree shortcode with ignoreList and folderSlash options

* feat(file-tree): enhance file-tree shortcode to support data mode

* feat(file-tree): enhance file-tree shortcode to support file mode

* feat(file-tree): improve content parsing in file-tree shortcode

* feat(file-tree): improve root path validation and error handling in filesystem mode

* test(file-tree): add unit tests for `file-tree` shortcode

* feat(file-tree): add file-tree code block rendering support

* refactor(file-tree): extract filesystem scanning to get-file-tree partial

Move directory traversal and root path validation to a separate partial function,
consolidating all filesystem-related logic in one place. This simplifies the
shortcode implementation and ensures a unified data format for rendering.

* docs(readme): extend code fence and shortcode support for file tree in documentation

* feat(file-tree): add fullRootName parameter for root path display in file tree

* feat(file-tree): add language parameter to get-file-tree function

* feat(file-tree): add highlightList parameter for file-tree shortcode

* perf(file-tree): add level param for get-file-tree function to descend only level directories deep
2026-01-14 16:01:22 +08:00
Cell e87060f707 perf(search): enable anchorify for headings in search results (#672) 2025-12-31 16:43:04 +08:00
Cell 825d458222 fix(tabs): add support for Mermaid diagrams within tabs (#671) 2025-12-31 15:15:11 +08:00
Cell 10b355bdee refactor: enhance code/diagram copy button functionality and styling 2025-12-20 16:10:50 +08:00
Cell 0a614e1763 fix: improve code block handling and compatibility for non-Chromium browsers
fixes #312
// ignore-for-release
2025-12-19 17:34:53 +08:00
Cell c35dce56d0 refactor: table wrapper via table render hook
resolve #503
2025-12-19 14:10:33 +08:00
Cell e600d047da fix: code block mac mode and gist shortcode styles 2025-12-18 14:30:13 +08:00
Cell 93478b47e1 refactor: code block wrapper (#665)
* feat: optimize code highlighting for diff language

* refactor: update codeblock configuration and enhance code wrapper functionality

* fix: extra blank lines would appear when copying lines containing code highlighting

* refactor: enhance code block wrapper functionality and add new styles (mac style)

* refactor: enhance code block normal mode

* feat: do noting for code block simple mode

* feat: add copy btn for code block modes mac and simple

* refactor: add code-related variables and update styles for code blocks and gist layout

* feat: update code copy button visibility on hover for larger screens

* feat: update code block mode attribute and remove mac wrapper

* feat!: code block parameters accurate to a single

Remove the `data-open` attribute and use `.open` instead.

* refactor: enhance initCopyCode method to accept optional button parameter

* feat: improve code/diagram copy button styles and transitions for better visibility

* fix: disable copy buttons for simple/mac mode code blocks when copyable set to false

* chore: rename normal partial to code-header

* feat: add preview and expand feature for code blocks (close #312)

* fix: adjust transition timing for code header and fade-out animation

* test: update code block test case

* docs: update comments for code highlight and markup configurations

* feat: adjust code header background color darkening for light and dark themes

* fix: hide aside and breadcrumb pseudo-elements on small screens

* perf: change the code copy button and code expand button to server-side rendering

* fix: the code expand button obscured the code content

* fix: update code background and header colors for improved visibility

* fix: ensure code copy button is only added for copyable code blocks

* feat(code block): add lineNosToggler and lineWrapToggler params and feature for code blocks

* refactor: code syntax highlighting styles

* fix: update background color for line numbers and ensure proper sticky effect

* feat(code block): add support for code file names in code blocks

* fix: code review for PR #665

* feat(i18n): add Japanese and Korean translations; update toggle options in multiple languages

* docs: update configurations and comments
2025-12-17 16:56:52 +08:00
Cell 9c98f2142f fix(MathJax): parsing error after decrypting encrypted articles 2025-11-24 15:14:14 +08:00
Cell 0630497968 fix: update back-to-top button styles for better compatibility and performance 2025-11-20 16:21:07 +08:00
Cell afc8c07511 fix: update TOC drawer button visibility logic 2025-11-19 16:56:08 +08:00
Cell 237c2f3d13 feat: update TOC styles and improve active state handling in dialog 2025-11-19 16:29:58 +08:00
Cell b78f22b698 fix: remove redundant ESC key event listener for dialog 2025-11-19 14:43:43 +08:00
Cell aad75044e9 feat: implement TOC drawer feature (#657)
* feat: add toc drawer button

* feat: add TOC dialog functionality and related styles

* feat: change back-to-top button with scroll progress indicator

* feat: update color-scheme handling in theme switcher

* fix: code review for checking mistakes and optimization

* fix: the issue where the TOC was still clickable even when it was hidden.
2025-11-18 12:35:34 +08:00
Cell 113ad247de fix: add missing 'const' keyword for CACHE_VERSION declaration 2025-11-14 10:49:31 +08:00
Cell 1ba0303572 feat: enhance search functionality with additional attributes and improved anchor handling 2025-11-13 16:19:13 +08:00
Copilot 96b2f5f8ae refactor: Refactor duplicated code in theme.js (#655)
* Initial plan

* Refactor duplicated code in theme.js

- Extract highlight text logic into _applyHighlightToText helper method
- Extract search UI reset logic into _resetSearchUI helper method
- Extract content initialization logic into _initContentComponents helper method
- Extract encrypted class toggling into _toggleEncryptedClass helper method
- Reduce code duplication in initSearch, initFixItDecryptor, and init methods

Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>

* Simplify _toggleEncryptedClass with boolean parameter

- Replace fromClass and toClass parameters with a single show boolean
- Hardcode class names 'encrypted-hidden' and 'decrypted-shown' in function body
- More semantic API: true to show decrypted content, false to hide
- Simplifies all 3 call sites with clearer intent

Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>

* refactor: remove redundant DOMContentLoaded checks in aplayer and mermaid initialization

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Lruihao <33419593+Lruihao@users.noreply.github.com>
Co-authored-by: Cell <1024@lruihao.cn>
2025-11-13 14:46:47 +08:00
Cell fe129dd207 feat: add APlayer shortcode and audio support (#650)
* docs: improve error message clarity for shortcode parent block validation

* feat: add APlayer shortcode and audio support

* feat: support both APlayer and MetingJS

* feat: initialize APlayer when content decrypted
2025-10-21 15:47:04 +08:00