Commit Graph

146 Commits

Author SHA1 Message Date
Xin
8f6aa1db5b refactor(layout): keep content width fixed and document CSS var override (#934)
* fix(layout): split page and content width configuration

* refactor(layout): consolidate page width settings and update documentation

- Removed separate content width configuration from `hugo.yaml` and set a default value of `72rem` in CSS.
- Updated documentation in multiple languages to reflect the changes in page and content width settings, emphasizing the new fixed content width and customization options.
2026-02-19 23:54:43 +00:00
Antonin P
55659bb9c1 fix(navbar): align mobile sidebar ordering and labels with menu.main (#883)
* fix(navbar): navbar on small screen now follow menu.main from hugo.yaml

* fix(navbar): align mobile sidebar with menu.main order and labels

* refactor(sidebar): simplify mobile menu item selection logic

* fix(sidebar): avoid empty nested containers in mobile nav tree

* fix(sidebar): align nested chevrons with top-level items

* chore(css): update compiled CSS

---------

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
Co-authored-by: Xin <xin@imfing.com>
2026-02-19 23:34:06 +00:00
Xin
62196dd666 feat(tabs): add icon support for tabs (#926)
* feat(tabs): add icon support for tabs

- Introduced an `icon` property for tabs to display icons alongside tab labels.
- Updated the tabs shortcode and HTML partials to accommodate the new icon feature.
- Enhanced documentation for tabs to include examples of using icons in tab definitions.

* chore: rebuild css

* doc(tabs): add icon support in tab documentation for multiple languages

- Enhanced documentation for tabs to include examples of using the `icon` parameter in Persian, Japanese, and Simplified Chinese.
- Updated the tab shortcode examples to demonstrate how to display icons alongside tab labels.

* chore: regenerate compiled css

* fix(a11y): add aria-hidden to decorative tab icons

Add aria-hidden="true" to tab icon SVGs so screen readers skip
decorative icons and only announce the tab name. Update @example
docblock in tab.html to demonstrate the icon parameter.

* doc(tabs): improve icon section with better examples and icon page link

Rename "Tabs With Icons" heading to "Add Icons" for consistency with
other action-oriented section titles. Replace JSON/YAML/TOML icon
example with Photos/Music/Videos using photograph, music-note, and
film icons that naturally match their labels. Add link to the Icon
shortcode page so users can discover available icon names.
2026-02-14 21:23:25 +00:00
Xin
88aa6098f0 refactor(a11y): comprehensive WCAG 2.2 AA accessibility improvements (#924)
* refactor(a11y): comprehensive WCAG 2.2 AA accessibility improvements

Add skip-to-content link, landmark regions, ARIA attributes, keyboard
navigation, focus styles, reduced-motion support, and i18n keys across
all layouts, partials, shortcodes, and JS components.

- Add skip nav link in baseof.html and id="content" on all <main> tags
- Fix 404 page lang/dir attributes and add <main> landmark
- Add aria-label to banner close, PDF iframe, search input/results
- Remove aria-hidden from back-to-top button
- Add aria-hidden to decorative external link icon
- Add role="tablist" to tabs, aria-expanded to filetree/dropdowns
- Wrap mermaid diagrams in role="img", asciinema in role="region"
- Change theme toggle <p> items to <button role="menuitem"> with
  full keyboard navigation (Arrow/Home/End/Escape)
- Add arrow-key keyboard navigation to tabs component
- Separate sidebar collapsible button from link for independent
  keyboard access with aria-expanded sync
- Sync aria-expanded on all dropdown toggles (theme, lang, navbar,
  hamburger, page context menu)
- Add aria-live search status announcements
- Add 13 new i18n keys, replace hardcoded aria-label strings
- Add prefers-reduced-motion CSS override and focus-visible base styles
- Add aria-label swap on code copy ("Copied!" feedback for AT)
- Add aria-current to active TOC links
- Wrap filetree in <ul> container for proper list semantics
- Add unique aria-label to blog "Read more" links
- Document accessibility guidelines in AGENTS.md

* feat(a11y): enhance focus styles and accessibility for various components

- Add focus-visible styles to badges, buttons, and links for improved keyboard navigation.
- Update breadcrumb, sidebar, and TOC components to include focus-visible outlines.
- Introduce new classes for focus states in the badge and tabs shortcodes.
- Ensure consistent focus styles across all interactive elements to meet WCAG 2.2 AA standards.

* feat(a11y): implement new focus-visible utilities and enhance accessibility styles

- Introduce new utility classes for focus-visible states to improve keyboard navigation.
- Update various components including badges, buttons, and search inputs to utilize new focus-visible styles.
- Refactor existing focus styles to ensure consistency and compliance with accessibility standards.
- Enhance breadcrumb, sidebar, and TOC components with updated focus-visible classes for better user experience.

* chore: add .gitattributes to collapse generated files in PR diffs

* fix: enhance accessibility and improve documentation

- Added alt attributes to images in multiple language documentation files for better accessibility.
- Updated the navbar title partial to remove unnecessary title attribute.
- Improved search input accessibility by adding autocomplete="off".
- Enhanced search partials in both navbar and sidebar with location context.
- Updated SVG icons in various components to include aria-hidden and focusable attributes for improved accessibility compliance.

* fix: improve giscus theme toggle functionality

- Updated the theme toggle options selector to use a data attribute for better specificity.
- Modified the event listener to use a setTimeout for the theme update, ensuring smoother transitions when the theme switcher is clicked.

* fix: resolve axe-core WCAG AA violations across docs pages

Add aria-labels to Hugo task list checkboxes, fix asciinema player
timer accessible names, make Jupyter output cells keyboard-focusable,
and add missing heading hierarchy in shortcodes docs for fa/ja/zh-cn.

* feat: integrate accessibility testing with Playwright and enhance CI workflow

- Added Playwright configuration for accessibility testing.
- Implemented accessibility tests using axe-core for all English pages.
- Created a GitHub Actions workflow to automate accessibility tests on pull requests.
- Updated package dependencies to include @axe-core/playwright and @playwright/test.
- Enhanced sidebar component with data attributes for improved accessibility styling.

* fix: update base URL and improve accessibility labels across multiple languages

- Changed the base URL in Playwright configuration and CI workflow from localhost:3000 to localhost:1313.
- Added accessibility labels for screen readers in various language files, enhancing user experience for visually impaired users.
- Updated the Asciinema script to dynamically set the playback time label for better accessibility compliance.

* refactor: reorganize accessibility tests and update test directory structure

- Moved accessibility tests from the e2e directory to a new tests directory for better organization.
- Updated the test directory path in Playwright configuration.
- Refactored the accessibility test implementation to improve code clarity and maintainability.

* chore: update .gitignore to include Playwright test output directories

- Added entries for 'playwright-report/' and 'test-results/' to the .gitignore file to prevent cluttering the repository with test artifacts.

* refactor: enhance accessibility and improve focus styles across components

- Removed unused utility for focus visibility in CSS and consolidated focus-visible styles for better maintainability.
- Updated various components to use `role` attributes for improved accessibility, including menu items and buttons.
- Enhanced theme toggle and language switch components with appropriate ARIA roles and attributes for better screen reader support.
- Improved the handling of focus states in the navigation and context menus to ensure a consistent user experience.

* chore: update dependencies and enhance accessibility features

- Updated the 'serve' package version in package.json and package-lock.json for improved performance.
- Removed unused 'xml2js' dependency to streamline the project.
- Enhanced the Playwright configuration to better manage the web server setup for testing.
- Improved accessibility in the language switcher and navigation menu by refining focus management and keyboard interactions.
- Updated the back-to-top button to manage tabindex for better accessibility compliance.

* feat: enhance mobile menu accessibility and keyboard interactions

- Added ARIA attributes to manage visibility of the sidebar on mobile devices.
- Implemented focus management for the sidebar when the menu is toggled.
- Introduced keyboard support to close the menu with the Escape key.
- Improved overall accessibility for the hamburger menu and sidebar interactions.

* fix: refine mobile menu keyboard interaction and enhance navbar accessibility

- Updated the Escape key functionality to close the menu only on mobile devices.
- Added a new ARIA attribute to the hamburger menu button for improved accessibility.
2026-02-14 20:06:35 +00:00
Tyler
04803c4071 feat: archives page (#922)
* feat: archives page

* fix: empty archive show 'no posts found' message
* Add ToC partials for structural consistency
* Fix empty archive showing blank page

* fix: rename archive to archives

* chore: enhance archives and additional pages support

- Updated the menu structure in hugo.yaml to include new sections for 'About', 'Archives', and 'Glossary' under 'More'.
- Added new archive index files for multiple languages (Farsi, Japanese, Simplified Chinese) to support multilingual content.
- Created additional pages documentation for glossary and archives in multiple languages.
- Updated references in existing documentation to point to the new additional pages structure.
- Improved the archives layout to display a user-friendly message when no posts are found.

* fix: update date format in archives layout

- Changed the date format in the archives layout from a partial to a direct format for improved readability, displaying dates as "Jan 02".

* feat: add archive date format customization

- Introduced a new parameter in hugo.yaml for customizing the date format of archive items, defaulting to "Jan 02".
- Updated documentation in multiple languages to reflect the new optional date format feature for archives.

---------

Co-authored-by: Xin <xin@imfing.com>
2026-02-08 11:45:29 +00:00
Xin
02cca4cd0b fix(layout): make content width respect page.width config (#911)
Fixes #886 - The content area in `<main>` was hardcoded to `hx:max-w-6xl`
(72rem), ignoring the `params.page.width` setting. Added a new CSS
variable `--hextra-max-content-width` that responds to the page width
config, so users can now get full-width or wide content as expected.
2026-01-24 00:02:50 +00:00
Xin
fa8f8554ea feat(context-menu): add page context menu for copy/view Markdown (#908)
* feat(context-menu): implement page context menu for copy Markdown

- Added a context menu to Markdown pages allowing users to copy content as Markdown or view it in a new tab.
- Introduced new layout files for Markdown rendering and updated existing layouts to include the context menu.
- Enhanced configuration options to enable or disable the context menu globally or per page.
- Updated internationalization files to support new context menu actions.
- Improved documentation to guide users on the new features and their usage.

* feat(context-menu): enhance dropdown positioning and responsiveness

- Updated the context menu dropdown to use responsive positioning classes for better alignment on different screen sizes.
- Added new CSS classes to ensure the dropdown appears correctly on smaller devices, improving user experience.

* refactor(context-menu): adjust button styles for improved layout and usability

- Modified button classes in the page context menu to enhance spacing and alignment.
- Reduced padding and gap sizes for a more compact design, improving overall user experience.

* refactor(styles): update CSS classes for improved layout and consistency

- Removed outdated ring classes and adjusted padding and border styles in various components for a cleaner design.
- Enhanced hover effects and gap sizes for better user experience across language switcher, navbar, and theme toggle elements.
- Standardized rounded styles to maintain visual consistency throughout the interface.

* feat(context-menu): add custom links to page context menu

- Introduced new configuration options for custom links in the page context menu, allowing users to open documentation in ChatGPT and Claude.
- Updated the context menu layout to include a separator and display the new links with appropriate styling.
- Enhanced the CSS classes for better visual integration with existing context menu elements.

* feat(icons): add new AI icons and update context menu links

- Introduced new icons for AI tools including ChatGPT, Claude, Gemini, and others in the icons.yaml file.
- Enhanced the page context menu in multiple languages to include links for opening documentation in ChatGPT and Claude, improving user accessibility to AI resources.
- Updated internationalization files to reflect new context menu options and additional copy functionalities.

* refactor(layouts): simplify page structure in glossary and section layouts

- Removed the conditional rendering of page links in the glossary and section layouts to streamline the markup.
- Adjusted the blog and docs list layouts to ensure consistent closing of HTML tags and improved formatting.

* feat(context-menu): add outbound icons to external links

Add arrow-up-right icons to "View as Markdown" and custom links
in the page context menu to indicate they open in new tabs.

* Revert "feat(context-menu): add outbound icons to external links"

This reverts commit 670175e200f091ed89b15bd16f44a585355db57d.

* chore: rebuild css

* chore: update stats json

* chore: rename project and update context menu structure

- Changed project name from "wizardly-wing" to "hextra" in package-lock.json.
- Refactored context menu structure in hugo.yaml to improve organization and consistency across multiple languages.
- Updated context menu links to ensure proper functionality and accessibility.

* feat(context-menu): enhance clipboard functionality and pre-fetching

- Implemented pre-fetching of markdown content for copy buttons to improve performance and avoid clipboard access issues in Safari.
- Updated click event handlers to utilize cached content for clipboard operations, with a fallback to fetch content if not pre-fetched.
- Added checks to ensure elements exist before performing actions, enhancing robustness of the context menu interactions.

* fix(context-menu): improve hover effects and border styles

- Enhanced the context menu's border styles with transition effects for better visual feedback on hover.
- Updated CSS classes to ensure consistent styling across different themes, improving user experience.

* feat(context-menu): add page context menu functionality across multiple languages

- Introduced a page context menu that allows users to copy content as Markdown or view the raw Markdown source, enhancing usability for documentation sites.
- Added configuration options to enable the context menu globally and control it on a per-page basis.
- Implemented support for custom links in the context menu, allowing integration with external services.
- Updated documentation in Persian, Japanese, Chinese, and English to reflect these new features.

* fix(icons): update SVG definitions for Gemini and add fill attribute

- Updated the SVG definition for the Gemini icon to include the 'fill' attribute for better rendering.
- Ensured consistency in the SVG structure for the Gemini icon while maintaining the existing definitions for ChatGPT and Claude.

* chore: rebuild css

* chore: remove Claude links from context menu in multiple languages

- Removed the "Open in Claude" option from the context menu for Persian, Japanese, and Simplified Chinese languages to streamline the user experience.

* fix(context-menu): update cursor styles for buttons in context menu

- Changed cursor style from default to pointer for buttons in the page context menu to enhance user interaction feedback.
2026-01-23 23:40:29 +00:00
Xin
6a13f17326 fix(sidebar): update transform syntax for improved compatibility 2026-01-19 23:03:28 +00:00
Xin
8e1e446cb8 fix: migrate tabs shortcode to new standard syntax (#906)
* doc(tabs): update shortcode syntax to use new syntax

- Changed tab shortcode syntax from `items` to `name` for better clarity and consistency in multiple language documentation.
- Updated related examples in Persian, Japanese, and Simplified Chinese to reflect the new syntax.
- Adjusted the sidebar CSS to correct a z-index value for improved layout behavior on mobile devices.

* fix(sidebar, toc): update CSS classes for improved layout and text wrapping

- Adjusted the sidebar CSS class to use a new transform syntax for better compatibility.
- Updated the table of contents link class to ensure proper text wrapping behavior.

* chore: recompile css

* fix(css): update CSS classes for improved text wrapping

- Changed `break-words` to `wrap-break-word` in multiple CSS files to enhance text wrapping behavior.
- Adjusted the `.hextra-code-filename` and typography styles for better compatibility and consistency.
2026-01-19 22:50:49 +00:00
yuri
5028140432 feat(glossary): provide basic term glossary (#869)
* feat(glossary): provide basic term glossary

Enabled a site-wide terminology glossary.

* Added the `term` shortcode displaying term definition.
* Added the /glossary page showing all term definitions.
* Enabled a simplistic search of term definitions.

* refactor(glossary): update glossary page links and add callout for Hugo support

- Removed the glossary entry from the menu and adjusted weights for subsequent items.
- Added informational callouts in the glossary documentation for multiple languages, directing users to the Hugo Glossary Quick Reference.
- Updated links in the glossary documentation to point to the correct pages.

* fix(glossary): update links to glossary page format across multiple languages

- Changed links in the glossary documentation to use Hugo's relref format for consistency.
- Updated links in Persian, Japanese, English, and Simplified Chinese glossary pages.

---------

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
Co-authored-by: Xin <xin@imfing.com>
2026-01-19 22:33:09 +00:00
Xin
a9ef7ad57d fix(flexsearch): enhance match highlighting and safe DOM manipulation (#903)
- Replaced the highlightMatches function with appendHighlightedText to improve match highlighting using safe text nodes.
- Updated DOM manipulation for search results to create elements directly instead of using innerHTML, enhancing security and performance.
- Ensured consistent handling of empty text and query cases in the new highlighting function.
2026-01-18 19:59:09 +00:00
Mark Alexander
c4a39472eb fix: work around flexsearch returning fewer than expected result pages (#847)
Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
2026-01-06 16:28:18 +00:00
Kowyo
708358de80 fix: enhance table readability (#826)
* feat: enhance table readability

* use v0.9.0 table style

* Update table styles

---------

Co-authored-by: Xin <xin@imfing.com>
2025-09-15 21:59:05 +01:00
Ludovic Fernandez
1c06ae5580 chore(scripts): generic way to build scripts (#829)
* chore: move core scripts

* chore: extract head scripts
2025-09-11 20:29:18 +01:00
Ludovic Fernandez
3abcde4f8e fix: move dir attribute to :root (#805) 2025-08-30 09:07:09 +01:00
Ludovic Fernandez
82e25c0b0d fix(navbar): menu positions (#804)
* fix: menu positions

* refactor: factorize menu management and handle window resize

* chore: the placement is better with +4 then +10

* chore: the placement is better with -10 than -15
2025-08-29 23:09:23 +01:00
Xin
f9a94f02a6 fix(typography): add styles for task lists with checkboxes and update documentation (#796)
* fix(typography): add styles for task lists with checkboxes and update documentation

* chore: run task css

* feat(docs): add task lists to markdown guides in Persian, Japanese, and Simplified Chinese
2025-08-26 20:28:29 +01:00
Ludovic Fernandez
22f81e2470 feat(card): add tagIcon and tagBorder options (#791) 2025-08-25 16:49:06 +01:00
Ludovic Fernandez
fee0481a6c feat(navbar): navbar link icon item (#781)
* chore: extract link code to a partial

* feat(navbar): item icon

* chore: generate

* docs: add configuration

* review

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>

* chore: generate

* chore: add examples

* chore: showcase

---------

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
2025-08-24 22:45:10 +01:00
Ludovic Fernandez
a19de798b6 feat(links): add an option for external link decoration (#780)
* chore: add icons

* feat: add option to flag outbound links

* chore: generate

* docs: add configuration

* chore: use with the example site

* chore: use one icon with rotation
2025-08-24 12:57:07 +01:00
Ludovic Fernandez
f297d24189 feat(banner): add top banner (#777)
* feat: add top banner

* chore: use inside the example site

* chore: generate

* fix: banner with the burger navbar

* fix: compute the banner height to allow mutliple lines

* chore: better p style
2025-08-23 23:46:29 +01:00
Ludovic Fernandez
990d24906b fix(cards): card badge with RTL (#775)
* fix: card badge with rtl

* chore: generate
2025-08-23 14:46:35 +01:00
Ludovic Fernandez
22c1a4f9df feat(badges): colors and border (#774)
* feat(badges): add more colors and allow to disable the border

* feat(badges): more colors

* chore: generate

* docs: add Others inside the sidebar

* chore: i18n

---------

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
2025-08-23 14:42:23 +01:00
Ludovic Fernandez
f4d75a4e5b feat(callout): revamp of the callouts (#767)
* feat(callout): revamp of the callouts

* fix: doc

* chore: refactor gh alert

* feat: same colors on callouts and gh alerts

* docs: more relevant examples

* docs: i18n

* docs: update existing callouts
2025-08-21 23:31:16 +01:00
Ludovic Fernandez
201ce3f763 fix(theme-toggle): quick flash (light/dark) (#768)
* fix(theme-toggle): quick flash (light/dark)

* chore: simplify

* chore: simplify

* chore: simplify
2025-08-21 00:33:24 +01:00
Ludovic Fernandez
18a9335d4b feat: add 'system' inside the theme toggle (#766)
* feat: add 'system' inside the theme toggle

* chore: generate hugo_stats.json

* fix: missing css

* chore: reorganize code

* feat: menu

* chore: simplify

* chore: some i18n

* review

* fix: remove replace
2025-08-19 23:26:32 +01:00
Ludovic Fernandez
363b1e50ff feat(navbar): language switcher (#760)
* feat(navbar): language switcher

* docs: add language-switch

* chore: just for the demo

* fix: drop conflicting CSS

* fix: use constant

* fix: pre-existing bug with rtl on mobile

* docs: add comment to explain the algo

* chore: more readable algo

* review

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>

* feat: different icons

* feat: icon as param

* fix: inconsitency with rtl

* fix: render inside the sidebar

* chore: remove the demo

---------

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
2025-08-17 23:26:43 +01:00
Ludovic Fernandez
48bae073cb fix(search): search input and results outline (#761) 2025-08-17 14:24:15 +01:00
Xin
f79bd1a8cf fix(toc): improve handling of heading IDs by decoding and normalizing for hash navigation (#757) 2025-08-16 00:37:45 +08:00
Xin
d0cdd29ee5 fix(navbar): search wrapper class not prefixed (#756)
* fix(navbar): search wrapper class not prefixed

* fix(css): update Tailwind CSS properties layer for improved compatibility
2025-08-15 14:33:09 +08:00
Xin
91cc6b53d8 fix(toc): enhance hash navigation handling and adjust observer sensitivity (#754) 2025-08-15 10:33:49 +08:00
Ludovic Fernandez
80ada64da0 fix: search colors (#752) 2025-08-15 08:57:18 +08:00
Xin
eca7665571 fix(page-width): add back page width override via css variable (#748)
* fix(page-width): add back page width override via css variable

* refactor(css): update CSS variable references for site parameters
2025-08-14 23:12:23 +08:00
Xin
6823cc1fe8 refactor(css): add prefix to component classes for consistency (#744)
* refactor(navbar): add hextra prefix to navbar and hamburger menu classes

- Updated CSS class names from `nav-container` to `hextra-nav-container` and `hamburger-menu` to `hextra-hamburger-menu` for improved clarity and consistency across the project.
- Adjusted related JavaScript and documentation to reflect the new class names.

* refactor(search): update class names for search components

- Renamed CSS classes from `search-wrapper`, `search-input`, `active`, `no-result`, `prefix`, `excerpt`, and `match` to `hextra-search-wrapper`, `hextra-search-input`, `hextra-search-active`, `hextra-search-no-result`, `hextra-search-prefix`, `hextra-search-excerpt`, and `hextra-search-match` for improved clarity and consistency.
- Updated JavaScript selectors to match the new class names, ensuring functionality remains intact.
- Adjusted HTML structure to reflect the new class naming convention.

* refactor(search): update search component class names for consistency

- Renamed existing search-related CSS classes to include the `hextra` prefix for improved clarity and consistency.
- Added optional nested classes for enhanced customization of the search UI, including titles, active states, and result snippets.
- Removed outdated breadcrumb section as no specific class is available.

* refactor(sidebar): rename sidebar classes for consistency

- Updated CSS and JavaScript to replace `sidebar-container` with `hextra-sidebar-container` and `sidebar-active-item` with `hextra-sidebar-active-item` for improved clarity and consistency across the project.
- Adjusted related documentation to reflect the new class names.

* refactor(language & theme): update class names for consistency

- Renamed language switcher and theme toggle classes to include the `hextra` prefix for improved clarity and consistency across the project.
- Updated related JavaScript selectors and documentation to reflect the new class names.

* refactor(css & html): rename classes for consistency and clarity

- Updated various CSS class names to include the `hextra` prefix, enhancing consistency across the project. This includes renaming classes such as `content` to `hextra-content`, `filename` to `hextra-code-filename`, and `steps` to `hextra-steps`.
- Adjusted related HTML and JavaScript to reflect the new class names, ensuring functionality and styling remain intact.
- Updated documentation to include the new class names for better clarity.

* refactor(language): update class names for language options

- Renamed the `language-options` class to `hextra-language-options` for consistency with the existing `hextra` prefix convention.
- Updated the corresponding HTML to reflect the new class name, ensuring clarity and uniformity across the project.

* refactor(css & html): rename classes for consistency and clarity

- Renamed CSS classes to include the `hextra` prefix, such as changing `subheading-anchor` to `hextra-subheading-anchor` and `footnotes` to `hextra-footnotes`, enhancing consistency across the project.
- Updated related HTML and documentation to reflect the new class names, ensuring clarity and uniformity.

* feat(typography): add styling for horizontal lines

- Introduced new styles for horizontal lines to enhance visual separation in content. The styles apply margin and border color adjustments, ensuring consistency with the overall design.

* feat(blog): add draft release announcement for Hextra v0.10.0

- Created a new markdown file for the draft release announcement of Hextra v0.10.0, including upgrade instructions and author details.
- The announcement is currently marked as a draft and may be updated before the official release.

* refactor(css & html): rename `hextra-content` class to `content` for consistency

- Updated the `hextra-content` class to simply `content` across various HTML files and CSS, enhancing clarity and consistency in the codebase.
- Adjusted the `package.json` script for the development server to include the `-F` flag for better functionality.

* refactor(typography & markdown): enhance table styling and markdown syntax

- Updated CSS for tables to improve styling, including adjustments to margins, borders, and text properties for better readability.
- Revised markdown documentation to standardize table formatting and improve clarity, including consistent syntax for headers and lists.
- Enhanced examples in the documentation to reflect the updated styling and ensure accurate representation of output.

* fix(blog): update text color for improved accessibility

- Modified the text color in the blog single layout to enhance readability in dark mode by adding a dark text color class.
- Ensured consistency in styling for better user experience across different themes.

* docs(blog): update draft release announcement for Hextra v0.10.0

- Revised the "What's New" section to include a TODO placeholder for future updates.
- Added a comprehensive migration guide detailing the CSS class prefix changes to enhance consistency and avoid conflicts.
- Updated the announcement to reflect the new class naming conventions for various components.

* chore: rebuild css
2025-08-13 22:55:38 +08:00
Xin
30866e328c chore: enhance tags appearance in toc and minor updates (#739)
* chore: remove standard development mode command from CLAUDE.md

* docs(toc): add TOC scroll functionality documentation

- Added detailed comments to toc-scroll.js explaining the purpose and functionality of the TOC scroll spy feature.
- Clarified the requirements for proper operation, including the need for a .hextra-toc element and matching heading IDs.

* refactor(fragments): enhance fragment processing and documentation

- Improved the fragments.html partial to better handle page content splitting into searchable fragments based on headings.
- Added comprehensive documentation within the file, detailing parameters, return values, and examples for clarity.
- Updated content handling to ensure whitespace is trimmed

* refactor(tags): enhance tag rendering and styling in toc

- Updated the tags.html partial to utilize a context variable for improved accessibility.
- Enhanced the styling of tag links for better visual consistency across different themes.
- Modified toc.html and list.html to pass the context to the tags partial, ensuring consistent rendering.

* chore: run `task css`
2025-08-11 17:36:37 +08:00
Xin
0bb59d6f49 feat(toc): add Table of Contents scroll highlighting (#738)
* feat(toc): add Table of Contents scroll highlighting

- Introduced a new toc.css file for styling the Table of Contents with active link highlighting.
- Implemented toc-scroll.js to manage scroll behavior and link activation based on viewport visibility.
- Updated core.html to include the new JavaScript file and ensure proper loading of the Table of Contents functionality.

* chore: lower root heading font weight for TOC

* chore: run `task css`

* chore: update dependencies in package.json and package-lock.json to version 4.1.11 for @tailwindcss/postcss and tailwindcss, and update @jridgewell packages to latest versions
2025-08-11 16:04:53 +08:00
Xin
096f0d9c22 fix(favicon): dynamic favicon switching based on color scheme in js (#735)
* fix(favicon): dynamic favicon switching based on color scheme in js

* refactor(favicon): simplify favicon logic and ensure dynamic switching based on color scheme

* docs(favicon): enhance favicon setup instructions with dark mode support and adaptive SVG guidance
2025-08-10 23:04:19 +08:00
Xin
1081ab8d7f fix: tab not switching on non-synced mode (#732)
* fix: tab not switching on non-synced mode

* fix(tabs): improve tab synchronization logic and clean up data attributes

* refactor(tabs): streamline tab synchronization logic
2025-08-05 21:37:42 +09:00
Xin
7b27743159 feat(tabs): implement synchronized tabs switching (#700)
* Sync tabs across groups

* feat(tabs): add optional synchronization

* Move tabs sync setting under page params

* fix: spacing between title and site title (#704)

* docs: document configure opengraph image (#706)

* [Docs] document using og:image

* Make example title page match others

* clarify wording

* chore: update tailwind css to latest version 4.1.8 (#703)

* fix: wrong SRI hash for katex.css (#702)

* Correct URL given in 'dev.toml'

* stylesheet 'katex.css': fix SRI hash

* fix(build): run npm update to fix postcss complaint

* feat(tags): improve usability of tags (#698)

* feat(tags): improve usability of tags

* Tags can be shown also at docs
* Documented tag-related config flags
* Added example tags to the site
* Made rendered tags active

* Move tags listing to ToC

* Hide tags section on no tags

* feat(math): add optional MathJax support (#707)

* feat: add MathJax option

* docs: move math engine note

* refactor: update LaTeX documentation and improve MathJax integration

- Adjusted LaTeX documentation for clarity and formatting.
- Enhanced MathJax configuration in the templates to support both KaTeX and MathJax rendering.
- Removed deprecated comments and streamlined the script loading process for MathJax.
- Updated the passthrough extension settings in the Hugo configuration for better compatibility with LaTeX math expressions.

* docs: simplify LaTeX documentation and clarify configuration steps

- Updated LaTeX documentation to reflect that KaTeX is enabled by default, removing the need for manual activation.
- Added examples for using LaTeX math expressions and clarified the configuration for the passthrough extension in Hugo.
- Enhanced MathJax section to emphasize its use as an alternative rendering engine.

* fix(tabs): add null check for panels container and update example items

* fix(tabs): improve tab group key handling and add validation for items parameter

* refactor(tabs): comment out sync option in configuration and adjust tab formatting in documentation

---------

Co-authored-by: hobobandy <30026704+hobobandy@users.noreply.github.com>
Co-authored-by: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com>
Co-authored-by: Andreas Deininger <adeininger@urbanonline.de>
Co-authored-by: yuri <1969yuri1969@gmail.com>
2025-07-21 21:16:44 +01:00
Andreas Deininger
9c2a9f600b chore: update tailwind css to latest version 4.1.8 (#703) 2025-06-10 23:46:53 +01:00
Xin
3a13d44d3c chore: update Hugo version to 0.147.7 and improve nav-menu script 2025-06-01 17:37:37 +01:00
Xin
c24d55ee40 feat: child menu support in navbar (#695)
* feat: implement child menu support in main navbar

- Added a new JavaScript file for handling dropdown functionality in the navbar.
- Implemented event listeners for toggling dropdowns, closing them on outside clicks, and dismissing with the Escape key.
- Updated navbar HTML to support dropdown items with children, enhancing the navigation experience.
- Adjusted core script imports to include the new dropdown functionality.

* chore: update menu identifiers and add missing translations for development versions

* chore: update hugo stats

* chore: update script name

* chore: update menu item names to include arrows for external links
2025-06-01 17:33:45 +01:00
Xin
befce4cd9a refactor: improve width handling and introduce CSS variables (#678)
* refactor: update page width handling and CSS structure

- Changed the default page width from 1280px to 80rem in hugo.yaml.
- Replaced dynamic page width partials with a new CSS class 'hextra-max-page-width' across multiple layout files for consistency.
- Introduced a new head-config-css.html partial for managing CSS styles related to page width.
- Removed the outdated page-width utility partial to streamline the codebase.

* feat: introduce CSS variables for layout widths and update footer/navbar styles

- Added a new configs.css file to define CSS variables for page, navbar, and footer widths.
- Updated footer and navbar partials to utilize the new CSS classes for consistent width management.
- Refactored head-config-css.html to include the new navbar width variable.
- Enhanced the overall styling structure for better maintainability and responsiveness.

* Refactor: Rename configs.css to variables.css and update references

Remove head-config-css.html and update references to use variables.css instead of configs.css

* Update assets/css/variables.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update layouts/partials/head.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-23 00:57:12 +01:00
Zabriskije
1cc02a6931 fix: phantom scroll when params.footer.enable is set to false (#658)
* Phantom scroll fix

* fix: adjust menu height in CSS and update sidebar max height reference

* chore: regenerate css

---------

Co-authored-by: Xin <xin@imfing.com>
2025-04-09 23:11:19 +01:00
Xin
83fda0109f fix: enhanced encoder for CJK mixed content (#653) 2025-03-31 08:43:41 +01:00
Xin
7fdb6a3a07 chore: upgrade flexsearch to 0.8 (#652)
* chore: upgrade flexsearch to 0.8.x

- use cdn to download flexsearch js bundle

* chore: remove flexsearch.bundle.min.js
2025-03-30 21:52:41 +01:00
Xin
8021437f77 chore: use CDN to download mermaid js (#651)
* chore: download js assets during build time

* chore: remove CDN asset download task and update Mermaid script fingerprinting
2025-03-30 21:20:50 +01:00
Andreas Deininger
b700825943 chore: server side rendering of math equations (#589) 2025-03-30 18:05:35 +01:00
Xin
c74d44492e chore: migrate to Tailwind CSS v4.0 (#632)
* chore: migrate PostCSS configuration to v4

* chore: update dependencies in package.json and package-lock.json

- Bump versions for autoprefixer, postcss, postcss-cli, prettier, and tailwindcss.
- Remove unused dependencies to streamline the project.

* chore: add @tailwindcss/postcss and update package-lock.json

* fix: update import paths in CSS files for consistency

* fix: change prefix from `hx-` to `hx:`

* chore: migrate primary color theme variables to CSS

* fix: remove unnecessary text decoration property from anchor styles in typography CSS

* fix: update CSS styles for improved consistency and clarity across components

* chore: clean up package.json and package-lock.json, remove unused dependencies, and update CSS imports for better organization

* fix: bulk replace prefix `hx-` with `hx:`

* fix: update tailwind css prefix

* fix: styling consistent issues

- steps counter fix in v4
- removed tailwind.css
- update hr border colors
- fix button cursor in v4
- fix border colors in various places

* fix: update class prefixes for consistency in menu and sidebar components

* fix: refine CSS classes and transitions for navbar and sidebar components

- Updated hamburger menu styles for improved animation and structure.
- Adjusted sidebar transition duration for smoother effects.
- Standardized class prefixes for consistency across components.

* fix: update border color in hero badge component for improved styling consistency

* fix: update tab button cursor style for improved user interaction

* chore: recompile css

* fix: dark mode color not applied for before / after elements

* fix: docs navigation

* chore: recompile CSS

* chore: update Tailwind CSS and PostCSS dependencies to version 4.0.17, recompile CSS, and add safelist

* fix: typo in class name and add back decoration-from-font for typography a tags

* fix: update class syntax for Tailwind CSS compatibility in mermaid code block
2025-03-29 12:51:42 +00:00
Xin
49b1cd11ee feat: hide navbar on mobile when heading links clicked (#584) 2025-02-25 18:48:25 +00:00