mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-18 12:09:29 -07:00
5569a41d7abe9edd156b9feb401de1069bdbf83e
9 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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 |
||
|
|
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 |
||
|
|
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 |
||
|
|
f5ebeead9e | fix(nav.ts): fix circular dependency in desktop view | ||
|
|
a395513bd6 |
fix(customCursor.ts): move import statement for active to the top for better organization
fix(customCursor.ts): add return type void to onMouse function for clarity fix(customCursor.ts): add passive option to window event listener for mousemove to improve performance fix(stageNav.ts): move import statement for setCustomCursor to the top for better organization fix(stageNav.ts): add return type void to handleClick function for clarity fix(stageNav.ts): add return type void to handleKey function for clarity fix(stageNav.ts): add passive option to overlay event listeners for click, keydown, mouseover, and focus to improve performance fix(stageNav.ts): add passive option to window event listener for keydown to improve performance fix(stageNav.ts): add return type void to nextImage function for clarity fix(stageNav.ts): add return type void to prevImage function for clarity fix(gallery.ts): move import statement for Swiper to the top for better organization fix(gallery.ts): add return type void to slideUp function for clarity fix(gallery.ts): add return type void to initGallery function for clarity fix(gallery.ts): add passive option to window event listener for touchstart to improve performance fix(gallery.ts): add return type void to changeSlide function for clarity fix(gallery.ts): add return type void to scrollToActive function for clarity fix(gallery.ts): add return type void to createGallery function for clarity fix(gallery.ts): add passive option to close event listeners for click and keydown to improve performance fix(gallery.ts): add passive option to overlay event listeners for click, keydown, mouseover, and focus to improve performance fix(gallery.ts): add passive option to window event listener for touchstart to improve performance fix(nav.ts): add return type void to initNav function for clarity fix(utils.ts): add return type number to getRandom function for clarity fix(utils.ts): add return type void to onVisible function for clarity fix(utils.ts): add return type void to addWatcher function in Watchable class for clarity |
||
|
|
40f278ce1c | feat(nav.ts): add functionality to set the current link based on the currentMenuItemIndex attribute | ||
|
|
047ec5c630 |
feat(container.scss): add container styles for fixed position and scrolling behavior
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() |
||
|
|
2025a57ae4 |
fix(customCursor.ts): fix variable declaration and initialization for cursor and cursorInner to improve code readability and maintainability
feat(customCursor.ts): add support for setting custom text for cursorInner to display different cursor text fix(stage.ts): fix variable declaration and initialization for imgs, last, cordHist, isOpen, isAnimating, and active to improve code readability and maintainability feat(stage.ts): add support for minimizing image and initialize stage with image JSON data fix(stageNav.ts): fix variable declaration and initialization for navItems to improve code readability and maintainability feat(stageNav.ts): add support for handling click and key events for stage navigation fix(nav.ts): fix variable declaration and initialization for thresholdDiv and indexDispNums to improve code readability and maintainability feat(nav.ts): initialize nav and update threshold text |
||
|
|
4387abe52f |
Gsap (#120)
* feat: add gsap to deps * chore: migrate to pnpm * refractor: change var name * chore(.idea): remove unnecessary files and configurations Remove the following files and configurations from the .idea directory: - .gitignore: Remove default ignored files. - bridget.iml: Remove module file. - codeStyles/Project.xml: Remove project code style configuration. - codeStyles/codeStyleConfig.xml: Remove project code style configuration. - inspectionProfiles/Project_Default.xml: Remove project inspection profile. - jsLibraryMappings.xml: Remove JavaScript library mappings. - jsLinters/eslint.xml: Remove ESLint configuration. - modules.xml: Remove project module configuration. - vcs.xml: Remove VCS directory mapping. - watcherTasks.xml: Remove project tasks options. * chore(.prettierrc.json): update Prettier configuration to include support for go-template files and improve code formatting settings The Prettier configuration file (.prettierrc.json) has been updated with the following changes: - `useTabs` is set to `false` to use spaces for indentation - `tabWidth` is set to `2` to specify the number of spaces for each indentation level - `printWidth` is set to `88` to limit the line length to 88 characters - `singleQuote` is set to `true` to use single quotes for strings - `trailingComma` is set to `none` to remove trailing commas in arrays and objects - `bracketSpacing` is set to `true` to add spaces inside brackets - `semi` is set to `false` to remove semicolons at the end of statements - `plugins` is added to include the "prettier-plugin-go-template" plugin for go-template files - `overrides` is added to specify the parser as "go-template" for files with the ".html" extension * chore(base.scss): improve font rendering by adding font smoothing properties to all elements feat(base.scss): add user-select: none to body to disable text selection feat(base.scss): add overscroll-behavior-y: none to html and body to disable vertical scrolling on overscroll feat(base.scss): add cursor: pointer to anchor tags and buttons for better user experience feat(font.scss): add font-face declaration for HelveticaNow font refactor(media.scss): remove unused file feat(mixins.scss): add min-width and max-width mixins for responsive design feat(reset.scss): add the new CSS reset version 1.8.4 feat(reset.scss): remove all styles from User-Agent-Stylesheet except for the display property feat(reset.scss): set box-sizing: border-box for all elements feat(reset.scss): revert cursor style for anchor tags and buttons feat(reset.scss): remove list styles (bullets/numbers) from ol, ul, and menu feat(reset.scss): set max-inline-size and max-block-size to 100% for images feat(reset.scss): set border-collapse: collapse for tables feat(reset.scss): set -webkit-user-select: auto for input and textarea to fix Safari issue feat(reset.scss): revert white-space property for textarea on Safari feat(reset.scss): set -webkit-appearance: revert for meter element feat(reset.scss): revert all styles for preformatted text feat(reset.scss): unset color for input placeholder feat(reset.scss): remove default dot sign for lists feat(reset.scss): set display: none for elements with hidden attribute feat(reset.scss): revert styles for contenteditable elements feat(reset.scss): set -webkit-user-drag: element for draggable elements feat(reset.scss): revert native behavior for modal dialogs feat(typography.scss): set line-height, font-size, and font-family for body feat(typography.scss): increase font-size for tablet and laptop breakpoints * feat: add custom cursor styles Add a new file `_customCursor.scss` to the `assets/css/_partial` directory. This file contains styles for a custom cursor. The `.cursor` class is used to position the cursor and set its appearance. The `.active` class is used to display the cursor. The `.cursorInner` class is used to position the inner content of the cursor. --- refactor: remove unused footer styles Delete the file `_footer.scss` from the `assets/css/_partial` directory. This file contains styles for the footer section of the page. The styles are no longer used and can be safely removed. --- refactor: remove unused image styles Delete the files `_imagesDesktop.scss` and `_imagesMobile.scss` from the `assets/css/_partial` directory. These files contain styles for displaying images on desktop and mobile devices. The styles are no longer used and can be safely removed. --- feat: add navigation styles Add a new file `_nav.scss` to the `assets/css/_partial` directory. This file contains styles for the navigation bar. The styles define the layout and appearance of the navigation bar, including its position, background color, and alignment of its contents. The styles also include media queries to adjust the layout for smaller screens. --- refactor: remove unused overlay styles Delete the file `_overlay.scss` from the `assets/css/_partial` directory. This file contains styles for an overlay element. The styles are no longer used and can be safely removed. --- feat: add stage styles Add a new file `_stage.scss` to the `assets/css/_partial` directory. This file contains styles for the stage element, which is used to display images. The styles define the position and size of the stage, as well as the appearance of the images within it. --- feat: add stage navigation overlay styles Add a new file `_stageNav.scss` to the `assets/css/_partial` directory. This file contains styles for the stage navigation overlay. The styles define the position and size of the overlay, as well as its appearance and behavior. The overlay is used for navigation within the stage. * chore(variables.scss): update variable names and values for better readability and consistency chore(style.scss): reorganize import statements for better organization and readability * fix(main.ts): import correct functions from utils module feat(stage.ts): implement stage navigation functionality feat(stageNav.ts): implement stage navigation overlay functionality feat(state.ts): implement state management for index and threshold feat(utils.ts): add utility functions for increment and decrement * fix(index.html): fix doctype declaration to use lowercase 'doctype' for HTML5 compliance fix(index.html): fix meta tag indentation for better readability fix(index.html): fix indentation of head and body tags for better readability fix(index.html): fix indentation of header, main, and footer sections for better readability fix(index.html): fix indentation of script tag for better readability fix(index.html): fix indentation of closing div tag for better readability fix(index.html): fix indentation of closing body and html tags for better readability feat(index.html): add partial for navigation bar to improve website navigation fix(head.html): fix indentation of esBuildOpts variable for better readability fix(head.html): fix indentation of script tag for better readability feat(nav.html): add navigation bar partial to improve website navigation * refactor(stage.ts): change cordHist, isOpen, isAnimating, and active variables to instances of the watchable class to improve semantics and encapsulation * refactor(customCursor.ts): rename addActiveCallback to active.addWatcher for better readability and consistency refactor(stageNav.ts): rename getIsAnimating to isAnimating.get for better readability and consistency refactor(stageNav.ts): rename addActiveCallback to active.addWatcher for better readability and consistency feat(stageNav.ts): add check for isOpen.get() and isAnimating.get() before handling key events to prevent unwanted actions * chore(package.json): add prettier-plugin-go-template as a dev dependency to enable formatting of Go templates with Prettier * chore: add helvetica now font * chore(tsconfig.json): add "moduleResolution" property with value "node" to improve module resolution in the project configuration * refactor(stage.ts): rename class 'watchable' to 'Watchable' for consistency and clarity feat(utils.ts): add Watchable class to provide a generic watchable object with getter, setter, and watcher functionality |