Replace text-align: right with display: flex, justify-content: flex-end for
consistent right alignment. Add height, z-index for layering, and adjust
margin/padding for better mobile gallery nav positioning.
Signed-off-by: Sped0n <hi@sped0n.com>
Add .navClose styles for 30% min-width, right alignment, and pointer cursor.
Apply class to close div in mobile gallery nav for consistent keyboard support.
Signed-off-by: Sped0n <hi@sped0n.com>
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>
* 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.
* 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
* 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
* 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`
* 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
The media query was added to ensure that the .info element is positioned correctly on tablets and devices with no hover support. The top property was set to the height of the navigation bar and the position was set to fixed to keep the element in place. This change improves the layout and user experience on different devices.
The changes in this commit reorganize the code in the _customCursor.scss file to improve readability and maintainability. The changes include:
- Moving the .cursorInner selector inside the .customCursor selector for better organization.
- Adding a new line before the .cursorInner selector for better separation.
- Adding a new line after the mix-blend-mode property for better separation.
- Adding a new line after the .active selector for better separation.
These changes aim to make the code easier to understand and modify in the future.
feat(container.ts): create container module to handle scrollable behavior and add/remove disableScroll class
fix(customCursor.ts): update append target for cursor element to use container instead of main
fix(stage.ts): update append target for stage element to use container instead of main
fix(stageNav.ts): update append target for navOverlay element to use container instead of main
feat(main.ts): initialize container module and conditionally initialize stage and stageNav modules based on device type
fix(nav.ts): update references to state module functions to use state.get() instead of getState()
- Added styles for the navigation bar to improve the appearance and functionality of the navigation component.
- The navigation bar now has a fixed position at the bottom of the screen and is displayed as a flex container with space between and aligned center.
- The width of the navigation bar is set to 100% and the height is set using a CSS variable (--nav-height).
- Added padding to the navigation bar for spacing.
- The navigation bar has a white background and a z-index value of (--z-nav) to ensure it appears above other elements.
- The pointer-events property is set to "all" to maintain functionality while the container is locked.
- Added styles for the ".num" and ".current" classes.
- Added media queries to adjust the position and visibility of the navigation bar on smaller screens or devices without hover capability.
- Added a new SCSS partial `_collection.scss` to define styles for the collection component.
- Added a new SCSS partial `_gallery.scss` to define styles for the gallery component.
The new partials contain styles for the collection and gallery components, including layout, positioning, and animations.
---
feat: add support for gallery functionality in mobile
- Created a new file `gallery.ts` to handle the gallery functionality in the mobile view.
- Added functions `slideUp()` and `slideDown()` to handle the sliding animation of the gallery.
- Initialized the gallery with the provided image data in the `initGallery()` function.
- Added event listeners to update the active slide and index text when the slide is changed.
- Created a helper function `changeSlide()` to change the active slide in the gallery.
- Created a helper function `scrollToActive()` to scroll to the active image in the collection.
- Created a helper function `updateIndexText()` to update the index text in the navigation.
- Created a helper function `createGallery()` to dynamically create the gallery HTML structure.
---
feat: add scrollable flag for mobile view
- Created a new file `scroll.ts` to handle the scrollable flag for the mobile view.
- Added a `scrollable` variable as a Watchable object to control the scrollability of the view.
---
fix: change port variable case from lowercase `port` to uppercase `PORT` to improve semantics
- Changed the variable name `port` to `PORT` in the `server.ts` file to improve code readability and semantics.
- The variable `PORT` is now used to define the port number for the server to listen on.
Add a new file `_base.scss` to the `_core` directory. This file contains base styles for the entire application. The styles include setting font smoothing properties, setting the background color of the body, and disabling overscroll behavior on the html and body elements. Additionally, the styles set the cursor property to pointer for anchor tags and buttons.
feat(scss): add core font styles
Add a new file `_font.scss` to the `_core` directory. This file defines the `HelveticaNow` font face and specifies the font weight and style.
feat(scss): add core mixins
Add a new file `_mixins.scss` to the `_core` directory. This file defines mixins for working with breakpoints. The mixins allow for specifying styles based on minimum and maximum widths of breakpoints defined in the `$breakpoints` map.
feat(scss): add core typography styles
Add a new file `_typography.scss` to the `_core` directory. This file defines typography styles for the body element. The styles set the line height, font size, and font family. Additionally, the styles use the `min-width` mixin to increase the font size at tablet and laptop breakpoints.
feat(scss): add partial customCursor styles
Add a new file `_customCursor.scss` to the `_partial` directory. This file defines styles for a custom cursor. The styles position the cursor element, set its color and blend mode, and define an inner element for the cursor.
feat(scss): add partial stage styles
Add a new file `_stage.scss` to the `_partial` directory. This file defines styles for a stage element. The styles position the stage element, set its width and height, and define styles for an image element within the stage.
feat(scss): add partial stageNav styles
Add a new file `_stageNav.scss` to the `_partial` directory. This file defines styles for a stage navigation overlay. The styles position the overlay element and set its width and height. The styles also define an inactive state for the overlay.
feat(scss): add variables
Add a new file `_variables.scss` to the root directory. This file defines CSS variables for various aspects of the application, such as window height, navigation height, spacing, and z-index values.
feat(scss): import styles in main style.scss
Add import statements for the newly created files in the `style.scss` file. This ensures that the