The rollup.config.mjs file is added to the project. This file contains the configuration for Rollup, a module bundler, to bundle and transpile TypeScript code. The configuration includes the input file path, the output directory, the output format, and other options such as source maps and code minification. The resolve plugin is used to resolve module imports, the typescript plugin is used to transpile TypeScript code, and the terser plugin is used to minify the code in production builds. The configuration also checks the BUILD environment variable to conditionally enable code minification in production builds.
- Update the name field from "bridget-src" to "bridget" for better clarity.
- Add "sideEffects" field and set it to false to optimize tree shaking.
- Update the "lint" script to remove unnecessary file extensions and fix linting issues.
- Update the "dev" script to remove existing JavaScript files before running rollup and hugo in development mode.
- Update the "build" script to remove existing JavaScript files before running rollup and hugo in production mode.
- Update the "server" script to remove existing JavaScript files before running rollup and hugo in production mode.
- Add new scripts for rollup and hugo commands in different environments.
- Update devDependencies to include new rollup plugins and npm-run-all.
Note: The specific versions of the devDependencies are not mentioned in the diff.
chore(link.html): update main style source and options to improve performance and maintainability
chore(link.html): remove unused meta.html file
chore(nav.html): update decrement and increment buttons to use Unicode characters for better accessibility
chore(plugin/style.html): update style plugin to support inline styles for critical CSS
chore(plugin/style.html): update style plugin to support minification and fingerprinting for main CSS
chore(plugin/style.html): remove script plugin as it is no longer used
chore(plugin/style.html): update style plugin to support inline styles for critical CSS
chore(plugin/style.html): update style plugin to support minification and fingerprinting for main CSS
chore(resources/imageJSON.html): update image resize options for better performance and quality
The 404.html file is a new file added to the layouts directory. This file defines the layout for the 404 page. It includes a container div, a navigation partial, and an article element with three paragraphs displaying the "404 page not found" message. This layout will be used when a user navigates to a non-existent page on the website.
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
- Add "static" and "exampleSite" directories to .eslintignore to exclude them from linting
- Add "static" and "exampleSite" directories to .prettierignore to exclude them from formatting
chore(font.scss): add font-face declaration for 'fw' font and set font-display property for better font loading performance
chore(typography.scss): update font-family property for body element to use 'Geist' font as the primary font
chore(typography.scss): update font-family property for button element to use 'fw' font as the primary font
chore(Info.md): update theme description to clarify that Bridget is a minimal Hugo theme designed for photographers/visual artists
chore(Info.md): add information about the inspiration for the theme and the modifications made to mimic the original design
chore(Info.md): update the Instagram link to point to the correct profile
chore(Info.md): update the Github link to point to the correct profile
chore(Info.md): update the site design credit to mention Tyler McRobert as the original designer
chore(Info.md): update the copyright information to mention Spedon as the current owner and mention that the site is powered by Hugo
chore(params.toml): add website title parameter for better customization
chore(baseof.html): update page title to use the website title parameter
chore(nav.html): update navigation link to use the website title parameter
refactor(stage.ts): move lores(getElNextFive()) to setPositions() function to ensure images are preloaded before setting positions
refactor(stage.ts): move lores(getElTrail()) to setPositions() function to ensure images are preloaded before setting positions when isOpen is true
refactor(stage.ts): remove redundant lores(imgs) call from minimizeImage() function
refactor(stage.ts): move lores(getElNextFive()) to initStage() function to ensure images are preloaded when stage is initialized
refactor(stage.ts): remove unused e.src assignment in createStage() function
feat(state.ts): add nextFive property to state object to store the next five indices for preload
feat(state.ts): add getNextFive function to calculate the next five indices based on the current index and length
refactor(imageJSON.html): modify image resizing logic to generate separate low resolution and high resolution image URLs, heights, and widths to improve performance and optimize image loading
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 `year.html` file is a new file that has been added. It contains a shortcode that displays the current year using the `now.Year` variable. This shortcode can be used in the layout templates to dynamically display the current year.
The imageJSON.html partial template has been added to the layouts/partials/resources directory. This template generates JSON data for image resources on a page. It retrieves the page context and the gallery resources using the site.GetPage and .Resources.ByType functions. It then iterates over the image resources, resizing them and adding their information to a Scratch variable. Finally, it outputs the JSON data as a script tag with the id "imagesSource". This JSON data can be used to dynamically load and display images on the page.
The `script.html` partial template has been added to handle the rendering of script tags with various options. This template supports the following features:
- If the `Content` variable is provided, it will be rendered as the content of the script tag.
- If the `Source` variable starts with "<script", it will be rendered as safe HTML.
- If the `Source` variable is provided and is a local resource, it will be processed as a template and minified if specified. If the `Fingerprint` variable is provided, the resource will also be fingerprinted and the integrity attribute will be set accordingly.
- If the `Link` variable is provided, it will be used as the source of the script tag.
- The `Crossorigin` variable can be used to add the crossorigin attribute to the script tag.
- The `Async` variable can be used to add the async attribute to the script tag.
- The `Defer` variable can be used to add the defer attribute to the script tag.
- The `Attr` variable can be used to add additional attributes to the script tag.
This new partial template provides flexibility in rendering script tags with different options based on the provided variables.
The currentMenuItem.html template partial is added to the layouts/partials/function directory. This partial is used to retrieve the current menu item based on the current page URL. It iterates through the main menu items defined in the site configuration and compares the URL of each menu item with the URL of the current page. If a match is found, the name and ID of the menu item are stored in variables. Finally, a dictionary containing the name and ID is returned. This partial can be used to highlight the current menu item in the navigation menu.
This commit adds a new layout template called baseof.html. This template is used as the base layout for all other templates in the project. It includes the basic HTML structure, meta tags, and a placeholder for the main content.
The purpose of this change is to provide a consistent and reusable base layout for all pages in the project, reducing code duplication and improving maintainability.
---
feat(layouts): add single.html layout template
This commit adds a new layout template called single.html. This template is used for rendering individual content pages. It includes a block for the main content and some additional logic for handling the current menu item and generating image JSON.
The purpose of this change is to provide a specific layout for individual content pages, allowing for customization and flexibility in their presentation.
---
refactor(layouts): remove index.html layout template and related partials
This commit removes the index.html layout template and its associated partials (footer.html, head.html, link.html, meta.html, seo.html, mobile_wrapper.html, and nav.html).
The index.html layout template was no longer needed as the project has transitioned to using the baseof.html and single.html templates for rendering pages. The associated partials were also no longer used and can be safely removed.
The purpose of this change is to clean up unused code and reduce clutter in the project.
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.