Commit Graph

280 Commits

Author SHA1 Message Date
Sped0n
07a6860529 feat: update js artifacts 2023-11-01 23:25:33 +08:00
Sped0n
b496e23d9a chore(tsconfig.json): remove "watch" option to avoid confusion as it is not needed
chore(tsconfig.json): add "baseUrl" option with value "./" to set the base URL for module resolution
2023-11-01 23:24:05 +08:00
Sped0n
788b9433ba chore(fonts): add GeistVF.woff2 font file and remove HelveticaNowText-Regular.woff2 font file
feat(fonts): add fw.svg font file
refactor(swiper): remove swiper-bundle.min.css file
2023-11-01 23:23:34 +08:00
Sped0n
09583bfc0a chore(rollup.config.mjs): add rollup configuration file to bundle and transpile TypeScript code
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.
2023-11-01 23:13:05 +08:00
Sped0n
b91a67e0da chore(package.json): update scripts and devDependencies
- 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.
2023-11-01 23:12:19 +08:00
Sped0n
df5d839074 chore(link.html): update critical style source and options to improve performance and maintainability
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
2023-11-01 23:09:53 +08:00
Sped0n
1ac67f17ae feat(404.html): add 404 page layout
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.
2023-11-01 23:09:27 +08:00
Sped0n
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
2023-11-01 23:09:02 +08:00
Sped0n
aefdaa86eb chore: update .eslintignore and .prettierignore files
- Add "static" and "exampleSite" directories to .eslintignore to exclude them from linting
- Add "static" and "exampleSite" directories to .prettierignore to exclude them from formatting
2023-11-01 23:04:47 +08:00
Sped0n
bb15dbea36 chore(style.scss): update import statement for article partial to import swiper.scss from node_modules
chore(link.html): remove unused swiper css import statement
2023-11-01 23:04:05 +08:00
Sped0n
7b48cf6e91 chore(font.scss): update font-face declaration for 'Geist' font and add font-display property for better font loading performance
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
2023-11-01 23:02:37 +08:00
Sped0n
3d88d5a243 style(base.scss): remove empty line at the end of the file for consistency
style(nav.scss): remove unused import statement for mixins in _core folder
2023-11-01 23:02:02 +08:00
Sped0n
2f75ed3d59 feat(scss): add critical.scss file and import necessary partials for critical styles 2023-11-01 23:01:38 +08:00
Sped0n
1a9d5762c4 chore: update images for exampleSite 2023-11-01 23:00:24 +08:00
Sped0n
d01dca5f36 chore(Info.md): update menu configuration to include Info page in the main menu with weight 4 and identifier "Info"
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
2023-11-01 22:59:42 +08:00
Sped0n
9bbf3a7f7a chore(hugo.toml): remove unused disableKinds to improve build performance
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
2023-11-01 22:59:03 +08:00
Sped0n
eb3c91d017 feat(content): move menu configuration to markdown and add new content pages for Erwitt, Gruyaert, and Webb 2023-11-01 22:56:36 +08:00
Sped0n
67c0dcd70b chore(dependabot.yml): change the update schedule interval from daily to weekly 2023-11-01 22:54:23 +08:00
Sped0n
7c7a58ea24 chore: remove images files 2023-10-31 00:36:30 +08:00
Sped0n
e1720906f7 refactor(article.scss): remove margin-top from .info class to improve layout consistency
feat(article.scss): add media query to apply margin-top to .info class on tablets and devices with no hover support to improve responsiveness
2023-10-31 00:35:17 +08:00
Sped0n
ee40055d6a feat(link.html): add support for minification of style and script files based on Hugo production mode 2023-10-31 00:07:51 +08:00
Sped0n
bf859ebed9 feat(plugin/script.html): add support for ESBuild to optimize JavaScript resources 2023-10-31 00:07:27 +08:00
Sped0n
bffd43c6cc feat(gallery.ts): add support for loading active images when sliding up to improve user experience 2023-10-31 00:06:47 +08:00
Sped0n
68ddbce37b feat(collection.ts): add image preloading functionality to improve performance and user experience 2023-10-31 00:06:14 +08:00
Sped0n
6606dcec93 refactor(stage.ts): extract getElNextFive() function to improve code readability and reusability
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
2023-10-31 00:05:43 +08:00
Sped0n
1e945353df refactor(state.ts): improve code readability by adding comments and organizing code into sections
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
2023-10-31 00:04:29 +08:00
Sped0n
102e9aacf7 fix(state.ts): change the increment value in decThreshold function from 1 to -1 to correctly decrease the threshold value 2023-10-31 00:03:59 +08:00
Sped0n
f9af230110 refactor(collection.ts): rename variable 'container' to 'collection' for better clarity and semantics
refactor(collection.ts): update classList manipulation to use 'collection' instead of 'container' for consistency and clarity
2023-10-31 00:03:14 +08:00
Sped0n
4b2639d669 style(article.scss): add margin-top to .info class to create space below the navigation bar
style(article.scss): remove media query for positioning .info class on tablets and devices without hover support
2023-10-31 00:02:28 +08:00
Sped0n
071f53071e feat(gallery.ts): change image source to a data attribute and dynamically load it when the image is visible 2023-10-30 17:47:06 +08:00
Sped0n
b5aae19c70 feat(stage.ts): add functions to switch between high-resolution and low-resolution images for better image quality and performance 2023-10-30 17:45:46 +08:00
Sped0n
3cbbc5b6da refactor(resources.ts): update ImageJSON interface to include separate properties for low resolution and high resolution image URLs, heights, and widths for better organization and clarity
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
2023-10-30 17:44:59 +08:00
Sped0n
6be9717f2f style(article.scss): add media query for tablets and devices with no hover support to fix positioning of .info element
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.
2023-10-30 17:44:21 +08:00
Sped0n
33c9f863c8 feat(year.html): add new shortcode to display the current year
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.
2023-10-30 15:58:53 +08:00
Sped0n
e20fb7c105 feat(imageJSON.html): add imageJSON.html partial template to generate JSON data for image resources
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.
2023-10-30 15:58:37 +08:00
Sped0n
2553c7e1fc feat(plugin): add script.html partial template to handle rendering of script tags with various options
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.
2023-10-30 15:58:00 +08:00
Sped0n
a74f15b908 feat(currentMenuItem.html): add template partial to retrieve the current menu item based on the current page URL
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.
2023-10-30 15:57:32 +08:00
Sped0n
1632803e91 refactor(plugin/style.html): improve code formatting and indentation for better readability 2023-10-30 15:57:13 +08:00
Sped0n
0b350db741 feat(layouts): add baseof.html layout template
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.
2023-10-30 15:56:43 +08:00
Sped0n
40f278ce1c feat(nav.ts): add functionality to set the current link based on the currentMenuItemIndex attribute 2023-10-30 15:55:02 +08:00
Sped0n
ead0a84ac7 refactor(main.ts): improve code readability by adding conditional check for ijs length before initializing stage or collection
fix(resources.ts): handle case when imagesJson element is not found to prevent error and return empty array
2023-10-30 15:54:36 +08:00
Sped0n
f328d727d5 refactor(stage.ts): reorder imports for better readability and consistency
fix(stage.ts): fix incorrect import order of incIndex and state in stage.ts
2023-10-30 15:54:03 +08:00
Sped0n
d575d8e867 feat(scss): add new partial _article.scss to handle styling for article content 2023-10-30 15:53:27 +08:00
Sped0n
e4bc4a8d92 style(customCursor.scss): reorganize code to improve readability and maintainability
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.
2023-10-30 15:53:06 +08:00
Sped0n
dc0318a4dc chore(swiper): add swiper-bundle.min.css file
The commit adds the `swiper-bundle.min.css` file to the `static/lib/swiper` directory. This file contains the CSS styles for the Swiper library version 11.0.3. The styles define the appearance and behavior of the Swiper slider component. The file is released under the MIT License and was last updated on October 26, 2023.
2023-10-30 15:52:39 +08:00
Sped0n
3d9237758d chore: update example site 2023-10-30 15:51:52 +08:00
Sped0n
144132ae72 fix(fonts): update font file path in _font.scss to use the new woff2 file format
fix(fonts): remove HelveticaNowText-Regular.woff font file and add HelveticaNowText-Regular.woff2 font file
2023-10-30 15:51:17 +08:00
Sped0n
2022c7f03a feat(customCursor.scss): add custom cursor styles to improve user experience
refactor(customCursor.ts): remove unused code and optimize custom cursor functionality
refactor(stageNav.ts): remove unused code and optimize stage navigation functionality
refactor(stage.ts): remove unused code and optimize stage functionality
2023-10-29 22:25:36 +08:00
Sped0n
bfea861ed4 blind commit 2023-10-29 22:17:02 +08:00
Sped0n
13fa8b21fb Merge branch 'dev' into main 2023-10-29 22:15:47 +08:00