Commit Graph

178 Commits

Author SHA1 Message Date
Sped0n
56b87d6393 fix(gallery): adjust image sizing to fit window height
Update gallery image styles to use max-height based on window minus nav,
max-width 100%, and auto width for proper scaling with contain fit.

Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-25 19:59:06 +08:00
Sped0n
268159e7d2 refactor: unify bundled assets with subdirs and Hugo mounts
Move bundled outputs to dedicated css/js subdirs. Update Vite
config to output directly to bundled/ with simplified naming.
Add Hugo module mounts to expose as assets/bundled and
static/bundled. Adjust gitignore and partial accordingly.

Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-14 18:15:24 +08:00
Sped0n
2e7131a5a5 ci: update bundled artifacts [skip ci] 2025-11-12 09:15:02 +00:00
Sped0n
4b1f529589 refactor: migrate to vite for critical scss bundling, remove dart sass dependency
Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-12 17:14:20 +08:00
Sped0n
8b3b5cd77a fix: use absolute URL for fw font in scss
Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-12 17:14:20 +08:00
Sped0n
1d1f893c92 ci: format code 2025-11-12 00:10:06 +08:00
Sped0n
7d4bed3ba6 feat: use absolute URLs for assets
closes #473, closes #476

Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-12 00:10:06 +08:00
Sped0n
72b830def9 refactor: remove multilingual support and language-specific fonts
Simplify to Geist font family for all languages. Update README, SCSS,
partials, and config. Fix style template execution order.

Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-12 00:10:06 +08:00
Ryan
36721f8bf6 Bump deps (#515)
* chore: add nix flake for reproducible dev environment

Signed-off-by: Sped0n <hi@sped0n.com>

* refactor: migrate SCSS to modern Sass (@use/@forward)

Update mixins to use Sass module functions (map.has-key/get).
Configure Vite for modern Sass API.
Introduce _foundation.scss for forwarding core modules.

Signed-off-by: Sped0n <hi@sped0n.com>

* fix: replace deprecated _build with build in frontmatter

Signed-off-by: Sped0n <hi@sped0n.com>

* chore: add vcache.sh script for vercel build cache management

Signed-off-by: Sped0n <hi@sped0n.com>

* refactor: migrate to ESLint v9 flat config

Remove legacy .eslintrc.json, .eslintignore, and .prettierrc.json.

Add eslint.config.mjs with love, prettier, solid, and import rules.

Update devDependencies (eslint@9, @typescript-eslint@8, etc.) and scripts.

Minor TS fixes: remove eslint-disable, add error logging, simplify conditional.

Signed-off-by: Sped0n <hi@sped0n.com>

* chore: replace vcache.sh with vercel.sh for Vercel build process

Delete vcache.sh script.

Add vercel.sh: install Dart Sass v1.93.3, copy generated assets between
node_modules and project dirs, run vite:build + hugo build, then copy back.

Signed-off-by: Sped0n <hi@sped0n.com>

* chore: setup dart-sass and split build steps in GitHub workflow

Signed-off-by: Sped0n <hi@sped0n.com>

---------

Signed-off-by: Sped0n <hi@sped0n.com>
2025-11-11 20:20:29 +08:00
Ananth
9016cfb035 Add tamil translation (#430) 2025-01-03 16:19:41 +08:00
Spedon
c111de15b1 feat: enhance mobile detection logic (#358) 2024-07-11 13:36:15 +08:00
Spedon
8d48e6347e fix keyboard input (#356)
* fix: enhance accessibility with `tabIndex`

- Add `tabIndex="-1"` to the navigation item for accessibility

* refactor: refactor event handling with SolidJS effects

- Import `createEffect` from 'solid-js'
- Add an `AbortController` for managing event listeners
- Use `createEffect` to conditionally add and remove keydown event listener based on component state
- Remove `onKeyDown` and `tabIndex` attributes from the overlay div
2024-07-06 14:36:50 +00:00
Spedon
7536288baa fix: enhance accessibility with tabIndex (#355)
- Add `tabIndex="-1"` to the navigation item for accessibility
2024-07-04 23:52:54 +08:00
Spedon
d7e7fc68ba refactor: improve top position calculation in stylesheets (#302)
* refactor: improve top position calculation in stylesheets

- Update the top position calculation in the `_collection.scss` file

* refactor: tweak it harder

* Revert "refactor: tweak it harder"

This reverts commit b7bf7e50f8.
2024-03-17 16:15:13 +08:00
Spedon
e081e139fc refactor: reduce amount of createEffect and improve imports (#284)
* refactor: update import syntax

* feat: add GalleryImage component for simplicity

* refactor: replace createEffect in GalleryNav with createMemo

* refactor: refactor Gallery component logic and improve imports
2024-02-23 15:59:32 +08:00
Spedon
875113448b refactor: migrate part of the sass compilation to vite (#283)
* refactor: migrate part of the sass compilation to vite

now `bundled` option is deprecated

* fix: update build script

* chore: add a “type” field to the package.json file to resolve Vite’s complaints about CommonJS modules.
2024-02-22 23:44:16 +08:00
Sped0n
ecdaebb6cd refactor: don't render unneeded elements on raw info page 2024-02-22 01:48:48 +08:00
Spedon
febbd7d45d feat: migrate to Solid.js (#282)
* refactor: change hires loader function name

* feat: add loading transition animation and improve performance

* refactor: refactor gallery creation and update functions

* feat: update dependencies, configuration, and input file for solidjs

- Update dependencies in package.json
- Modify the input file in rollup.config.mjs
- Update tsconfig.json with new configuration options

* feat: update ESLint config for TypeScript and Solid integration

- Add `plugin:solid/typescript` to the ESLint config
- Add `prettier`, `@typescript-eslint`, and `solid` plugins to the ESLint config
- Remove the `overrides` and `plugins` properties from the ESLint config
- Modify the `memberSyntaxSortOrder` property in the ESLint config

* feat: update build scripts and configuration for Vite

* GitButler Integration Commit

This is an integration commit for the virtual branches that GitButler is tracking.

Due to GitButler managing multiple virtual branches, you cannot switch back and
forth between git branches and virtual branches easily. 

If you switch to another branch, GitButler will need to be reinitialized.
If you commit on this branch, GitButler will throw it away.

Here are the branches that are currently applied:
 - solid (refs/gitbutler/solid)
   branch head: dc6860991c
   - .eslintrc.json
   - assets/ts/main.tsx
   - assets/ts/desktop/stage.tsx
   - static/bundled/js/main.js
   - rollup.config.mjs
   - pnpm-lock.yaml
   - vite.config.ts
   - package.json
   - tsconfig.json
   - assets/ts/globalState.ts
   - assets/ts/mobile/collection.ts
   - assets/ts/container.ts
   - assets/ts/mobile/init.ts
   - assets/ts/mobile/gallery.ts
   - assets/ts/desktop/customCursor.ts
   - assets/ts/mobile/state.ts
   - assets/ts/globalUtils.ts
   - static/bundled/js/zXhbFx.js
   - static/bundled/js/EY5BO_.js
   - static/bundled/js/bBHMTk.js
   - assets/ts/nav.tsx
   - assets/ts/utils.ts
   - assets/ts/desktop/stageNav.ts
   - assets/ts/mobile/utils.ts
   - assets/ts/main.ts
   - assets/ts/desktop/state.ts
   - assets/ts/desktop/init.ts
   - assets/ts/state.tsx
   - assets/ts/desktop/utils.ts
   - assets/ts/nav.ts
   - assets/ts/resources.ts
   - assets/ts/desktop/stage.ts
   - static/bundled/js/GAHquF.js

Your previous branch was: refs/heads/solid

The sha for that commit was: dc6860991c

For more information about what we're doing here, check out our docs:
https://docs.gitbutler.com/features/virtual-branches/integration-branch

* refactor: remove .hide class from _base.scss file

* feat: migrate to Solid.js

* refactor: change i18n loading text with trailing dots

* fix: fix broken pnpm lock file

* chore: update eslint configuration for better code organization

- Update the eslint plugins array by removing newlines and maintaining plugins order
- Disable the rule "@typescript-eslint/non-nullable-type-assertion-style"
- Change the configuration of "sort-imports" rule

* feat: add tiny-invariant and eslint-plugin-solid to deps

* refactor: fix multiple eslint warnings

---------

Co-authored-by: GitButler <gitbutler@gitbutler.com>
2024-02-22 01:18:29 +08:00
Spedon
c84b4cf234 refactor: better event listener cleanup (#279)
* refactor: change hires loader function name

* feat: add loading transition animation and improve performance

* refactor: refactor gallery creation and update functions

* feat: create createDivWithClass utility function

* feat: refactor abort signal handling in event listener and promise chain

- Add functionality to set up an abort controller for cleanup
- Add an event listener to abort the controller when necessary
- Modify event listener to include the abort signal
- Modify promise chain to include the abort signal
2024-02-11 14:22:48 +08:00
Spedon
0812a5a6b8 feat: loading transition (#277)
* refactor: change hires loader function name

* feat: add loading transition animation and improve performance

* refactor: refactor mutation handling in desktop codebase

- Modify the `initStage` function in `assets/ts/desktop/stage.ts`:
  - Change the `onMutation` callback to accept a single mutation instead of an array of mutations.
  - Update the conditions inside the callback to use `hold` instead of `skip`.
- Modify the `onMutation` function in `assets/ts/desktop/utils.ts`:
  - Change the `callback` parameter to `trigger`.
  - Update the implementation of the function to iterate over each mutation and check if it triggers the `trigger` function. If it does, disconnect the observer and break the loop.

* style: refactor state section and remove unnecessary code

- Remove the declaration of `lastIndex` on line 21
- Add a comment block for the state section
- Add a declaration of `lastIndex` for the state section

* refactor: refactor mobile collection and intersection functions

- Modify the `initCollection` function in `assets/ts/mobile/collection.ts`
- Remove the nested loop in the `initCollection` function
- Modify the `onIntersection` function in `assets/ts/mobile/utils.ts`
- Replace the callback parameter with a trigger parameter in the `onIntersection` function
- Remove the nested loop in the `onIntersection` function

* refactor: refactor Watchable class constructor to include lazy parameter

- Add a second parameter `lazy` in the constructor of the `Watchable` class in `globalUtils.ts`
- Set the default value of `lazy` to `true` in the constructor
- Add a condition to check if `e` is equal to `this.obj` and `this.lazy` is `true` to return in `watch`
- Delete the previous constructor definition in the `Watchable` class in `globalUtils.ts`

* fix: set state's lazy param to false

* refactor: refactor third party lib import
2024-02-06 23:12:44 +08:00
Spedon
ba07636f8f refactor: prefine for version v1.0.2 (#269)
* refactor: refactor navigateVector logic and remove unused functions

* refactor: refactor HTML structure and styling in single.html

- Modify the `.info` class to `article` in `_article.scss`
- Remove the `nav.html` partial in `single.html`
- Change the class name from `info` to `article` in `single.html`
- Add the `nav.html` partial in `single.html`

* refactor: update handling of 404 page
- Now hugo will set unknown page title as "404"
- Add condition to return an empty image array if the document title starts with "404"

* docs: update documentation
2024-02-05 16:02:10 +08:00
Spedon
c1414bbfc5 fix: fix mobile loading issue (#267)
* fix: update navigateVector reset behavior

* fix: remove unnecessary function call

* fix: update loading text to include ellipsis
2024-02-04 00:45:09 +08:00
Spedon
8432540bde fix: fix text content setting in close element to use dataset (#264) 2024-02-03 23:47:27 +08:00
Spedon
5132e36e87 fix: fix navItems sequence (#262) 2024-02-03 23:30:42 +08:00
Spedon
1f65b08b56 refactor: refactor the pile of crap I wrote before 🤡 (#259)
* feat: refactor file structure and imports in mobile and desktop components

- Removed the import of `scrollable` from `assets/ts/mobile/scroll.ts`
- Renamed `assets/ts/mobile/mounted.ts` to `assets/ts/mobile/state.ts`
- Changed the import of `active` from `./stage` to `./state` in `assets/ts/desktop/customCursor.ts`
- Changed the import of `active` from `../state` to `../globalState` in `assets/ts/desktop/stage.ts`
- Changed the import of `active` from `./stage` to `./state` in `assets/ts/desktop/stageNav.ts`
- Renamed `assets/ts/state.ts` to `assets/ts/globalState.ts`
- Created a new file `assets/ts/desktop/state.ts`
- Added the interface `HistoryItem` to `assets/ts/desktop/state.ts`
- Added the variables `cordHist`, `isOpen`, `active`, and `isLoading` to `assets/ts/desktop/state.ts`
- Deleted the function `loader` from `assets/ts/desktop/stage.ts` and replaced it with `setLoaderForImage`
- Deleted the import of `./stage` from `assets/ts/desktop/stageNav.ts`
- Added the import of `minimizeImage` from `./stage` in `assets/ts/desktop/stageNav.ts`
- Deleted the import of `./mounted` from `assets/ts/mobile/collection.ts`
- Changed the import of `mounted` from `./mounted` to `./state` in `

* refactor: refactor the `onVisible` function to improve performance

- Modify the type of the `onVisible` function parameter `T` to extend `HTMLElement`
- Change the `entries.forEach` loop in the `onVisible` function to `entries.every`

* feat: add new function for detecting opacity changes in element

- Add a new function `onOpacityOne` in `assets/ts/utils.ts`
- The function uses a `MutationObserver` to check for opacity changes on an element
- When the element's opacity reaches `1`, the provided callback function is called
- The `MutationObserver` is disconnected after the callback is executed

* refactor: refactor function names and parameters in intersection and mutation observers

- Change the function name `onVisible` to `onIntersection`
- Modify the `callback` parameter in the `onIntersection` function to accept `IntersectionObserverEntry[]` and `IntersectionObserver` parameters
- Remove the code block that checks for intersection ratio and immediately calls the `callback` function in the `onIntersection` function
- Modify the function name `onOpacityOne` to `onMutation`
- Modify the `callback` parameter in the `onMutation` function to accept `MutationRecord[]` and `MutationObserver` parameters
- Add a default value for the `observeOptions` parameter in the `onMutation` function

* refactor: refine preload logic on both mobile and desktop

* refactor: refactor import statements and add new files

- The import statement for `Watchable` in `assets/ts/globalState.ts` has been changed from `../utils` to `../globalUtils`
- The import statement for `Watchable` in `assets/ts/desktop/state.ts` has been changed from `../utils` to `../globalUtils`
- The import statement for `decrement` and `increment` in `assets/ts/desktop/stageNav.ts` has been changed from `../utils` to `../globalUtils`
- A new file `utils.ts` has been added in the `assets/ts/desktop` directory
- The import statements for `getRandom`, `onIntersection`, and `type MobileImage` in `assets/ts/mobile/collection.ts` have been changed from `../utils` to `./utils`
- The `imgs` array in `assets/ts/mobile/collection.ts` has been changed from an array of `HTMLImageElement` to an array of `MobileImage`
- The import statements for `expand`, `loadGsap`, `loadSwiper`, and `removeDuplicates` in `assets/ts/mobile/gallery.ts` have been changed from `../utils` to `../globalUtils`
- The import statement for `type MobileImage` in `assets/ts/mobile/gallery.ts` has been changed from `./utils` to `../mobile/utils`
- The `galleryLoadImages` function in `assets/ts/mobile/gallery.ts` has been removed
- A new file `utils.ts`

* refactor: refactor swiper import and functions in mobile and global utils

* refactor: refactor navigation and image loading logic in desktop and mobile

* refactor: remove print function and optimize removeDuplicates return

* refactor: update text variable assignments and attributes

* refactor: update variable types in galleryImages and collectionImages in mobile/gallery.ts

* refactor: refactor variable types for consistency with naming conventions

* refactor: update animation durations and types in gallery functions

* refactor: refactor image loading logic and add console logs

* refactor: refactor sass hierarchy

* refactor: remove console logs in multiple files
2024-02-03 23:17:16 +08:00
Sped0n
794b5c0ea6 fix: fix indexing issue in loadImages function 2024-01-23 00:28:05 +08:00
Spedon
2fd34c2f7f refactor: replace svh with a more compatible approach (#252)
* first attempt

* second attempt

* blind commit
2024-01-23 00:06:42 +08:00
Spedon
49e9f904e2 fix: fix article regresssion (#250)
* refactor: output article element when needed

* refactor: refactor container styles and media queries

- Add the `$tablet` variable to `_container.scss`
- Add a media query to `_container.scss`
- Import `_container.scss` in `critical.scss`
- Remove the import of `_container.scss` in `style.scss`
2024-01-22 20:35:15 +08:00
Spedon
9fa1b718b8 feat: add loading indicator for desktop and mobile (#244)
* feat: add new CSS rule for hiding elements

- Add a new CSS rule for the class "hide" with a display property set to "none".

* feat: refactor image loading and navigation logic on desktop

- Add a line of code in `assets/ts/desktop/stage.ts` to reset the `src` of `elc` and add a class `hide` to it
- Add a line of code in `assets/ts/desktop/stage.ts` to call the `loader` function with `elc` as an argument
- Add a function `loader` in `assets/ts/desktop/stage.ts` to handle image loading and error events
- Modify the `initStageNav` function in `assets/ts/desktop/stageNav.ts` to watch the `isLoading` state and set custom cursor accordingly
- Modify the `initStageNav` function in `assets/ts/desktop/stageNav.ts` to handle close click events by calling the `handleClick` function and setting `isLoading` state to false
- Modify the `initStageNav` function in `assets/ts/desktop/stageNav.ts` to handle previous/next click events by calling the `handleClick` function only if `isLoading` is false
- Modify the `initStageNav` function in `assets/ts/desktop/stageNav.ts` to handle previous/next hover events by setting `loadedText` and updating custom cursor depending on `isLoading` state

* feat: refactor createGallery function and enhance loading functionality on mobile

- Add a loading text element to the gallery.scss file
- Add a loading indicator to the createGallery function in gallery.ts
- Modify the createGallery function in gallery.ts to hide the loading text element on image load
- Move the image element append logic to the parent container in the createGallery function in gallery.ts

* feat: update translations and add new loading translation in i18n files

* chore: remove css source map

* chore: modify build command to ignore css source map

* refactor: remove unnecessary style

* fix: fix desktop cursor text transition bug
2024-01-20 23:34:13 +08:00
Spedon
ae1a08eb82 feat: embed threshold and index val of navbar into html/inline js (#241)
* feat: refactor image retrieval logic and improve variable initialization

- Add a new file `layouts/partials/function/getImageSlice.html`
- Initialize variables `$context`, `$Path`, and `$params`
- Set `$Path` based on the result of the `partial/function/currentMenuItem.html` partial
- Retrieve the page `$gallery` based on `$Path`
- Return all resources of type `image` from `$gallery`

* refactor: adapt getImageSlice function to `single.json`

* feat: refactor navigation UI components to use static go template

* feat: update navigation functionality and threshold rendering
2024-01-20 18:03:26 +08:00
Spedon
d9452ca8d2 fix: prevent page scrolling when in mobile modal (#238)
* fix: import `_partial/container.scss` in `style.scss`

- Add import for `_partial/container.scss` in `style.scss`

* chore: ignore CSS map files in .gitignore

- Added a new entry for `*.css.map` to the .gitignore file

* chore: update dependabot interval to weekly

- Update the interval of the dependabot from daily to weekly.

* fix: try to fix safari floating address bar issue

* fix: try again with svh
2024-01-20 16:46:10 +08:00
Spedon
8ba41fc32c v0.0.5 (#219)
* feat: refactor condition for checking `site.Params.bundled`

- Add default condition for checking if `site.Params.bundled` is true or false

* refactor: update info page content

* chore: update site description

* refactor: refactor variable assignments and return statement in menu template

- Change the variable assignment from `.DirName` to `.Identifier` in the file `layouts/_default/single.json`
- Change the variable assignments in the file `layouts/partials/function/currentMenuItem.html`:
  - From `$dirName := ""` to `$identifier := ""`
  - From `$id := -1` to `$title := ""` and `$weight := -1`
  - From `$dirName = .Identifier` to `$identifier = .Identifier`, `$title = .Title`, and `$weight = .Weight`
- Change the return statement in the file `layouts/partials/function/currentMenuItem.html` from `(dict "DirName" $dirName "ID" $id)` to `(dict "Identifier" $identifier "Title" $title "Weight" $weight)`

* feat: update nav links structure for current link styling

- Remove javascript code related to setting current link style and title
- Update nav links to use updated HTML structure for current link styling

* feat: update page titles and meta tags in layout files

- Update the `baseof.html` layout to include the current page title in the `<title>` tag
- Add OpenGraph meta tags for the page title and description in `meta.html` layout
2024-01-07 23:16:55 +08:00
Spedon
30a01cfd63 minor update (#195)
* refactor: update package.json dependencies and build tools

* feat: bump up geist font version

* refactor: non-nullable-type-assertion-style bypass

* chore: bump up version in package.json

* docs: update get started doc

* styles: prettier format
2023-12-14 13:48:45 +08:00
Spedon
ebdf2405f0 refactor: remove debug log in stage.ts (#154) 2023-11-13 22:42:34 +08:00
Spedon
c2956b7d4b fix: fix preloading in desktop (#152)
* chore(Geist): bump geist font to v1.0.1

* refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers

* refactor(stage.ts): bump up preload count on desktop

* feat(params.toml): add support for user defined resize option

* feat(_fonts.scss): add a new font file to better support fullwidth plus and minus

* refactor(info): update info

* chore(build.yml): update branch name for updating bundled artifacts to include the current date

* chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase

* feat: refactor initialization process for retrieving and sorting image data

- Modify `main.ts` to use async initialization of resources
- Change the return type of `initResources` function to `Promise<ImageJSON[]>`
- Add try-catch block to handle errors in `initResources` function
- Use fetch API to retrieve image data from `index.json`
- Sort the image data based on the index field

* refactor: update file naming and variable assignments in layouts

- Add new file `exampleSite/config/_default/outputs.toml` with the contents `page = ["HTML", "JSON"]`
- Rename file `layouts/partials/resources/imageJSON.html` to `layouts/_default/single.json`
- Modify variable assignments and references in the `single.json` layou

* chore: remove code that includes imageJSON.html partials in layouts

- Remove the code that includes the "resources/imageJSON.html" partial in the 404.html layout
- Remove the code that includes the "resources/imageJSON.html" partial in the single.html layout

* refactor: add `getElPrev()` and `getElNext()` functions to `hires`

- Add `getElPrev()` and `getElNext()` to the `hires` function call

* refactor: refactor image retrieval for improved accuracy

- Add logging of `c0` variable for debugging
- Change `els.push(imgs[increment(s.index + i, s.length)])` to `els.push(imgs[increment(c0 + i, s.length)])` to retrieve images correctly
- Change `return imgs[increment(s.index, s.length)]` to `return imgs[decrement(c[c.length - 1].i, s.length)]` to retrieve previous element correctly
- Change `return imgs[decrement(s.index, s.length)]` to `return imgs[increment(c[c.length - 1].i, s.length)]` to retrieve next element correctly
2023-11-13 22:19:17 +08:00
Spedon
5394ea20eb fix: now preloading will also work in stageNav (#150)
* chore(Geist): bump geist font to v1.0.1

* refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers

* refactor(stage.ts): bump up preload count on desktop

* feat(params.toml): add support for user defined resize option

* feat(_fonts.scss): add a new font file to better support fullwidth plus and minus

* refactor(info): update info

* chore(build.yml): update branch name for updating bundled artifacts to include the current date

* chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase

* feat: refactor initialization process for retrieving and sorting image data

- Modify `main.ts` to use async initialization of resources
- Change the return type of `initResources` function to `Promise<ImageJSON[]>`
- Add try-catch block to handle errors in `initResources` function
- Use fetch API to retrieve image data from `index.json`
- Sort the image data based on the index field

* refactor: update file naming and variable assignments in layouts

- Add new file `exampleSite/config/_default/outputs.toml` with the contents `page = ["HTML", "JSON"]`
- Rename file `layouts/partials/resources/imageJSON.html` to `layouts/_default/single.json`
- Modify variable assignments and references in the `single.json` layou

* chore: remove code that includes imageJSON.html partials in layouts

- Remove the code that includes the "resources/imageJSON.html" partial in the 404.html layout
- Remove the code that includes the "resources/imageJSON.html" partial in the single.html layout

* refactor: add `getElPrev()` and `getElNext()` functions to `hires`

- Add `getElPrev()` and `getElNext()` to the `hires` function call
2023-11-13 21:14:36 +08:00
Spedon
9b08d255f1 Use JSON file to replace raw string in DOM (#147)
* chore(Geist): bump geist font to v1.0.1

* refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers

* refactor(stage.ts): bump up preload count on desktop

* feat(params.toml): add support for user defined resize option

* feat(_fonts.scss): add a new font file to better support fullwidth plus and minus

* refactor(info): update info

* chore(build.yml): update branch name for updating bundled artifacts to include the current date

* chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase

* feat: refactor initialization process for retrieving and sorting image data

- Modify `main.ts` to use async initialization of resources
- Change the return type of `initResources` function to `Promise<ImageJSON[]>`
- Add try-catch block to handle errors in `initResources` function
- Use fetch API to retrieve image data from `index.json`
- Sort the image data based on the index field

* refactor: update file naming and variable assignments in layouts

- Add new file `exampleSite/config/_default/outputs.toml` with the contents `page = ["HTML", "JSON"]`
- Rename file `layouts/partials/resources/imageJSON.html` to `layouts/_default/single.json`
- Modify variable assignments and references in the `single.json` layou

* chore: remove code that includes imageJSON.html partials in layouts

- Remove the code that includes the "resources/imageJSON.html" partial in the 404.html layout
- Remove the code that includes the "resources/imageJSON.html" partial in the single.html layout
2023-11-13 20:51:08 +08:00
Spedon
9c073e98e1 v0.0.2 (#144)
* chore(Geist): bump geist font to v1.0.1

* refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers

* refactor(stage.ts): bump up preload count on desktop

* feat(params.toml): add support for user defined resize option

* feat(_fonts.scss): add a new font file to better support fullwidth plus and minus

* refactor(info): update info

* chore(build.yml): update branch name for updating bundled artifacts to include the current date

* chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase
2023-11-10 21:00:09 +08:00
Sped0n
b9dc117fd8 refactor(state.ts): extract logic to get threshold session index into a separate function for reusability and clarity 2023-11-04 19:36:19 +08:00
Sped0n
bf3ddfc3f8 feat(state.ts): add sessionStorage support to store and restore thresholdsIndex value when navigating between pages 2023-11-04 15:35:49 +08:00
Sped0n
de523d08f4 fix(main.ts): change import statements to use import then syntax instead of top layer await to improve compatibility with Firefox and Chromium browsers 2023-11-04 14:25:33 +08:00
Sped0n
1dc5d62ccf fix(gallery.ts): fix swiper init bug 2023-11-03 16:04:41 +08:00
Sped0n
a629ec08c3 feat(utils.ts): add capitalizeFirstLetter function to capitalize the first letter of a string for better readability and consistency 2023-11-03 14:19:55 +08:00
Sped0n
f4eda42785 feat(i18n): add translations for the new languages (de, es, fr, it, CJK) 2023-11-03 14:19:06 +08:00
Sped0n
8caf13e5d5 fix(stage.ts, collection.ts, gallery.ts, resources.ts): set the alt attribute of the image element to the value of the alt property in the ImageJSON object to improve accessibility and provide alternative text for images. 2023-11-03 09:55:32 +08:00
Sped0n
cd84d21a99 feat(gallery.ts): add dynamic import for gsap and swiper libraries to improve performance by loading them only when needed 2023-11-03 09:02:06 +08:00
Sped0n
137b099ace feat(stage.ts): add support for dynamic import of gsap library and initialize gsap and Power3 variables when mousemove event is triggered to improve performance and reduce initial load time 2023-11-03 09:01:20 +08:00
Sped0n
7df382ee1f feat(utils.ts): add loadGsap and loadSwiper function to asynchronously load library 2023-11-03 08:59:22 +08:00
Sped0n
98f2012e9d fix(main.ts): fix imported module and function for correct init 2023-11-03 08:48:31 +08:00
Sped0n
2229c56b1e chore(fonts): update font files and font-family declarations
- Update font files for different languages: NotoSansCJKsc-Regular.woff2, NotoSansCJKtc-Regular.woff2, NotoSansCJKjp-Regular.woff2, NotoSansCJKkr-Regular.woff2, NotoSans-Regular.woff2
- Update font-family declarations in _typography.scss to use the new font files:
  - Change font-family for body to 'sans-serif'
  - Change font-family for button to 'Noto Sans', sans-serif
- Add font-family declarations for different languages in _typography.scss:
  - For English language (en), use 'Geist', sans-serif
  - For Simplified Chinese language (zh-cn, zh-sg), use 'Noto Sans', 'Noto Sans CJK SC', sans-serif
  - For Traditional Chinese language (zh-hk, zh-mo, zh-tw), use 'Noto Sans', 'Noto Sans CJK TC', sans-serif
  - For Japanese language (ja), use 'Noto Sans', 'Noto Sans CJK JP', sans-serif
  - For Korean language (ko), use 'Noto Sans', 'Noto Sans CJK KR', sans-serif
2023-11-03 08:47:11 +08:00