34 Commits

Author SHA1 Message Date
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
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
Xin
14036ffea6
feat: enhance FlexSearch encoding for CJK support (#553)
- Added support for CJK (Chinese, Japanese, Korean) languages in FlexSearch encoding.
- Introduced `isCJK` function to detect language and select appropriate encoding method.
- Implemented `encodeCJK` and `encodeDefault` functions for different tokenization strategies.
2025-01-18 18:54:54 +00:00
Attila Greguss
a97a1791cc
feat: show breadcrumbs in search results (#473)
* Show crumbs in search results

* remove unnecessary console.log

* amend comment

* amend comment again

* Implement requested changes
2024-10-14 22:42:55 +01:00
yuri
97ea67198b
feat: scroll selected sidebar entry into view (#471)
Long sidebars did not scroll to show the selected entry. This made
working with such long sidebars quite confusing.
2024-10-12 19:55:39 +01:00
Xin
e3b582676e
fix: properly handle tabs overflow (#422)
* fix: properly handle tabs overflow

* chore: rebuild css
2024-07-10 01:11:51 +01:00
Xin
5103da4cd5
chore: improve search bar shortcut display (#346)
* chore: improve search bar shortcut display

* chore: remove focusout handler
2024-04-01 19:34:57 +01:00
Xin
d8351aa432
feat: allow enable/disable code block copy button (#331)
* refactor: move codeblock to a partial component

* feat: add flags for code block copy button

* allow disable code copy button completely
* allow make the copy button always visible

* chore: run build:css
2024-03-28 07:32:51 +00:00
loenvom
c634cb83eb
feat: support customize flexsearch tokenize option (#319)
Co-authored-by: loenvom <loenvom@qq.com>
2024-03-17 18:50:22 +00:00
Xin
5c7303bee7
feat: add hx- prefix to Hextra Tailwind CSS classes (#300)
* feat: add prefix to tailwind css classes

* fix: remove unnecessary prefixes

* fix: add missing prefix in other places

* chore: regenerate hugo_stats.json

* chore: run `npm run build:css`

* chore: add `hx-` prefix to _index.fa.md

* fix: lang switcher display issue

* fix: add `hx-` prefix to showcase/index.fa.md

* fix: lang switch param mistake
2024-02-20 22:59:31 +00:00
c2tz
35c733b7ee
chore: increase time for "copied" animation duration (#214)
* align-logo-footer

add vertical align 2px for logo footer

* modify logo align in footer

* noobie things

* modify logo & vertical align

* build css

* revert change in icons.yaml

* increase duration for copied button effect

* Update hugo_stats.json

* Update main.css

* Update footer.html

* modify timeout to 1000 (1sec)
2023-11-21 00:07:14 +00:00
Xin
c2d7ba8ce5
fix: code copy issue for code blocks in shortcode (#201)
* chore: add translation key for copy code button title

* chore: remove id from code block elements

* fix: copy the correct code target in code-copy.js

* chore: update details.md

* chore: remove console.log :)

* chore: remove `$` in shell commands

* chore: update docs
2023-11-12 01:14:39 +00:00
Xin
363c8c91ee
fix: scroll bug due to incorrect toggle state (#186)
* fix: add mobile menu overlay to toggle body scroll

* chore: update styles
2023-11-03 20:39:36 +00:00
Xin
97e6945c04
feat: add option to set default theme and hide toggle button (#146)
resolves #135 

Light / dark theme can be configured via:

```yaml
  theme:
    # light | dark | system
    default: system
    displayToggle: true
```
2023-10-21 22:18:04 +01:00
Xin
cb09b7ce1e
fix: skip scroll event if no backToTop element (#138) 2023-10-12 23:25:34 +01:00
Xin
28a20e1e7e
chore: add code copy button icons in js (#133) 2023-10-07 20:01:19 +01:00
Remy Sheppard
d1bed05843
feat: Back To Top (#105)
* Scroll to top

* Update scripts.html

---------

Co-authored-by: Xin <xin@imfing.com>
2023-10-01 10:06:28 +01:00
Xin
ec02eb34fe
fix: search shortcut based on user platform (#101)
* fix: search shortcut based on user platform

* chore: make it work with iPad and iPhone as well
2023-09-27 19:47:20 +01:00
Xin
e9ea9786e9
feat: enhance scrollbar style (#56)
* feat: enhance scrollbar style

* chore: set `color-scheme` for document element
2023-09-14 00:01:38 +01:00
Xin
c8b1d764e0 chore: add more i18n options and update templates 2023-08-27 17:32:44 +01:00
Xin
15d3a4da5e feat: implement collapsible sidebar
chore: basic sidebar toggle button
chore: update compiled css
2023-08-20 12:29:55 +01:00
Xin
db8374a724 feat: add filetree component for shortcode
chore: update tailwind config and move hugo_stats
2023-08-16 20:44:21 +01:00
Xin
7a2cca9181 feat: add multi-language select and fix minor issues
fix: navbar icon should use home relative link

fix: copy code for raw <code> element

fix: missing breadcrumb hover style

fix: tabs typo preventing loading the script
2023-08-16 20:43:28 +01:00
Xin
3d7a4b7c99 refactor: concat built-in js scripts
chore: vendorize katex 0.16.8

chore: vendorize flexsearch 0.7.31

chore: add katex fonts

chore: vendorize mermaid

* add option to disable math globally

chore: fix edit url nil variable

chore: add comments
2023-08-16 20:43:28 +01:00
Xin
d66ae7146f fix: remove extra space for rendered link
chore: update theme info

chore: use dataset

chore: support editURL config option

* add toc and search config option

chore: update head template
2023-08-16 20:43:28 +01:00
Xin
a7aa9fa1cb feat: add blog list layout
chore: add toc to mobile dropdown menu single items

chore: refactor sidebar

chore: add single layout for blog

chore: add vscode settings

chore: add blog section

chore: add devcontainer.json

chore: exclude icon from mobile nav

chore: support multiple theme switches

- simplify theme switch implementation using data attributes
- hide theme switch when sidebar is disabled

chore: add theme switch to footer

- enable when sidebar is disabled

chore: add format-date partial
2023-08-16 20:40:00 +01:00
Xin
2f34627da3 feat: multi-level sidebar
chore: support multiple search elements

chore: sidebar display toc on mobile view

chore: add hamburger menu to navbar on mobile

chore: add markdown link hook

for opening external link in new window

chore: add sidebar footer

- put search under params.type
- make navbar link aware of external link
2023-08-16 20:39:58 +01:00
Xin
7e37b73779 feat: revamp search experience
chore: hide toc on small screen

chore: make sidebar responsive
2023-08-16 20:39:54 +01:00
Xin
16a656947b feat: basic flexsearch implementation 2023-08-16 20:39:54 +01:00
Xin
b6e0ab0872 feat: add tabs implementation
chore: use filename by default in sidebar
2023-08-16 20:39:42 +01:00
Xin
e71887d00e feat: support mermaid
feat: codeblock highlight

feat: dark mode for highlight

feat: copy button for code block

feat: support katex math rendering
2023-08-16 20:39:41 +01:00
Xin
e99f44319a feat: add theme switcher to support dark mode 2023-08-16 20:39:41 +01:00