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
2023-03-09 08:50:16 +08:00
2023-12-14 13:48:45 +08:00
2023-11-06 17:30:44 +08:00
2023-12-14 13:48:45 +08:00
2023-11-06 17:30:44 +08:00
2023-11-06 17:53:05 +08:00

Bridget

GitHub Workflow Status (with event) GitHub deployments

Bridget is a minimal Hugo theme designed for photographers / visual artists.

Its based on the https://github.com/tylermcrobert/bridget-pictures-www.

thumbnail

Demo Site

To see this theme in action, here is a live demo site which is rendered with Bridget theme.

Getting Started

Head to this documentation for a complete guidance to get started with the Bridget theme.

Features

  • Blazingly fast: 99/100 on mobile and 100/100 on desktop in Google PageSpeed Insights

  • JS dynamic loading (powered by ES6 syntax)

  • JS code splitting by rollup.js

  • Image Preloading/Lazy loading

  • Dynamic resolution based on view mode

  • Multiple analytics services supported

  • Search engine verification supported (Google, Bind, Yandex and Baidu)

Multilingual and i18n

Bridget supports the following languages:

Credits

Description
Bridget is a minimal Hugo theme for photographers/visual artists, powered by SolidJS.
Readme MIT 53 MiB
Languages
TypeScript 63.5%
HTML 18.5%
SCSS 12.5%
JavaScript 3%
Shell 1.5%
Other 1%