Commit Graph

76 Commits

Author SHA1 Message Date
Sped0n
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()
2023-10-29 22:12:06 +08:00
Sped0n
bd2354e2f5 feat: add new SCSS partials for collection and gallery components
- 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.
2023-10-29 22:11:04 +08:00
Spedon
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
2023-10-29 12:39:56 +08:00
Spedon
7da5c2228a now html element can be generated by typescript 2023-03-21 11:55:05 +08:00
Spedon
8245c54b09 get ready for flexible stack 2023-03-20 21:59:01 +08:00
Spedon
843e9bb24e disable resizer for performance 2023-03-20 21:58:09 +08:00
Spedon
1e74555d86 dev 2023-03-20 20:19:37 +08:00
Spedon
3247219da8 update overlay design 2023-03-18 01:12:01 +08:00
Spedon
931f57802c add mobile wrapper html 2023-03-16 00:06:54 +08:00
Spedon
fea22a556a camel naming 2023-03-16 00:06:41 +08:00
Spedon
ecaaa38363 move desktop components to desktop_wrapper.html 2023-03-14 23:53:32 +08:00
Spedon
d5a280a98a separate overlay.html 2023-03-14 23:30:24 +08:00
Spedon
211e2fd4fb transition from javascript to typescript 2023-03-14 01:01:23 +08:00
Spedon
22967b6f5c finish transition to json data fetching
add smooth close animation
2023-03-11 19:56:27 +08:00
Spedon
a36abb412a add overlay section
add use json to store images data
2023-03-11 14:37:15 +08:00
Spedon
f21437878b warp image elements with a div 2023-03-10 16:59:58 +08:00
Spedon
7116a9f7ad add height and width to image elements 2023-03-10 16:03:36 +08:00
Spedon
bdace69eb8 add threshold adjustment function 2023-03-09 22:17:49 +08:00
Spedon
4208b6ed56 eslint update 2023-03-09 21:24:22 +08:00
Spedon
0341bc5e69 eslint update for footer 2023-03-09 21:23:28 +08:00
Spedon
aa162c1229 footer set up (basic function) 2023-03-09 20:36:29 +08:00
Spedon
b0c0298320 add style process plugin 2023-03-09 17:07:22 +08:00
Spedon
da2406082b import css and js 2023-03-09 17:07:08 +08:00
Spedon
4ee452f78e layout initialization 2023-03-09 12:01:06 +08:00
Spedon
4a58950a44 example site setup 2023-03-09 12:00:13 +08:00
Spedon
7d4dcb5319 initialization 2023-03-09 08:50:16 +08:00