Move bundled outputs to dedicated css/js subdirs. Update Vite
config to output directly to bundled/ with simplified naming.
Add Hugo module mounts to expose as assets/bundled and
static/bundled. Adjust gitignore and partial accordingly.
Signed-off-by: Sped0n <hi@sped0n.com>
Delete multilingual i18n files for UI labels. Add English labels to
params.toml under [labels]. Update 404.html, single.html, and nav.html
to use site.Params.labels instead of i18n.
Signed-off-by: Sped0n <hi@sped0n.com>
Simplify to Geist font family for all languages. Update README, SCSS,
partials, and config. Fix style template execution order.
Signed-off-by: Sped0n <hi@sped0n.com>
* refactor: migrate part of the sass compilation to vite
now `bundled` option is deprecated
* fix: update build script
* chore: add a “type” field to the package.json file to resolve Vite’s complaints about CommonJS modules.
* 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 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
* 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
* chore(Geist): bump geist font to v1.0.1
* refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers
* refactor(stage.ts): bump up preload count on desktop
* feat(params.toml): add support for user defined resize option
* feat(_fonts.scss): add a new font file to better support fullwidth plus and minus
* refactor(info): update info
* chore(build.yml): update branch name for updating bundled artifacts to include the current date
* chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase
* feat: refactor initialization process for retrieving and sorting image data
- Modify `main.ts` to use async initialization of resources
- Change the return type of `initResources` function to `Promise<ImageJSON[]>`
- Add try-catch block to handle errors in `initResources` function
- Use fetch API to retrieve image data from `index.json`
- Sort the image data based on the index field
* refactor: update file naming and variable assignments in layouts
- Add new file `exampleSite/config/_default/outputs.toml` with the contents `page = ["HTML", "JSON"]`
- Rename file `layouts/partials/resources/imageJSON.html` to `layouts/_default/single.json`
- Modify variable assignments and references in the `single.json` layou
* chore: remove code that includes imageJSON.html partials in layouts
- Remove the code that includes the "resources/imageJSON.html" partial in the 404.html layout
- Remove the code that includes the "resources/imageJSON.html" partial in the single.html layout
* chore(Geist): bump geist font to v1.0.1
* refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers
* refactor(stage.ts): bump up preload count on desktop
* feat(params.toml): add support for user defined resize option
* feat(_fonts.scss): add a new font file to better support fullwidth plus and minus
* refactor(info): update info
* chore(build.yml): update branch name for updating bundled artifacts to include the current date
* chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase
feat(analytics.html): create partial to include analytics scripts for various analytics services (Google Analytics, Fathom Analytics, Baidu Analytics, Umami Analytics, Plausible Analytics, Cloudflare Analytics, Splitbee Analytics) to track website traffic and user behavior
The `script.html` partial template has been added to handle the rendering of script tags with various attributes and options. It 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 be fingerprinted and the integrity attribute will be set accordingly.
- The `Link` variable can be used to specify an external script URL.
- The `Esm` variable can be set to true to render the script tag as a module.
- The `Crossorigin` variable can be set to true to add the crossorigin attribute.
- The `Async` variable can be set to true to add the async attribute.
- The `Defer` variable can be set to true to add the defer attribute.
- The `Attr` variable can be used to add additional attributes to the script tag.
This new partial template provides flexibility and customization options for rendering script tags in the application.
The meta.html file was modified to add three meta tags. The first meta tag sets the description of the website using the `site.Params.description` value. The second meta tag sets the application name using the `site.Params.app.title` value or falls back to the site title if not provided. The third meta tag sets the apple-mobile-web-app-title using the same logic as the second meta tag. These changes were made to improve the SEO and user experience of the website.
The `langCode.html` partial template is added to the `layouts/partials/function` directory. This template is used to check if the current language code matches the site's language code. It iterates over the language codes and sets a boolean variable `$res` to `true` if there is a match. The template then returns the value of `$res`. This partial template can be used in other templates to conditionally render content based on the language code.
refactor(baseof.html): update page title to use site.Title variable for consistency and easier maintenance
refactor(nav.html): update anchor tags to use relURL instead of relLangURL for correct URL generation
refactor(nav.html): update link text to use .Title instead of .Identifier for better readability
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
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(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 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.
- 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.
* 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