-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bb63fac
Showing
19 changed files
with
5,858 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:astro/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": ["*.astro"], | ||
"parser": "astro-eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"parser": "@typescript-eslint/parser", | ||
"extraFileExtensions": [".astro"] | ||
}, | ||
"rules": {} | ||
} | ||
], | ||
"plugins": ["@typescript-eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Expected Behavior | ||
|
||
## Actual Behavior | ||
|
||
## Steps to Reproduce the Problem | ||
|
||
1. | ||
1. | ||
1. | ||
|
||
## Specifications | ||
|
||
- Version: | ||
- Platform: | ||
- Subsystem: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## Change made | ||
|
||
- [ ] Bug fixes | ||
- [ ] New features | ||
- [ ] Breaking changes | ||
|
||
## Describe what you have done | ||
|
||
- | ||
|
||
### New Features | ||
|
||
- | ||
|
||
### Fix | ||
|
||
- | ||
|
||
### Others | ||
|
||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Lint Pull Request | ||
|
||
on: | ||
pull_request: | ||
types: ["opened", "edited", "reopened", "synchronize"] | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: latest | ||
run_install: false | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: pnpm | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: pnpm lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# build output | ||
dist/ | ||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
|
||
# vscode | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
engine-strict=true | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/**/* | ||
pnpm-lock.yaml | ||
dist/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"plugins": [ | ||
"prettier-plugin-astro", | ||
"prettier-plugin-organize-imports", | ||
"prettier-plugin-tailwindcss" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": "*.astro", | ||
"options": { | ||
"parser": "astro" | ||
} | ||
} | ||
], | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": false, | ||
"endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
# OPH66 | ||
|
||
Frontend interface for the GearFestival website. | ||
|
||
> ⚠️ Warning: This document might not be zero-error. If you encounter any problems, please contact _Leon_ on Discord. | ||
## Prerequisites | ||
|
||
Please install the following. | ||
|
||
- [Node.js](https://nodejs.org/en/): **v20 or above** is required. **v20.8.1** is recommended. | ||
- [pnpm](https://pnpm.io/): **v8 or above** is required. latest version is recommended. | ||
- [Git](https://git-scm.com/): latest version is recommended. | ||
|
||
## Setting Up the Development Environment | ||
|
||
1. [VSCode](https://code.visualstudio.com/) is recommended for development. | ||
1. Install the following extensions (Optional but highly recommended): | ||
- [Astro](https://marketplace.visualstudio.com/items?itemName=astro.astro) | ||
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) | ||
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) | ||
1. Setting the VSCode workspace settings (Optional but highly recommended): | ||
|
||
1. Open the command palette (Ctrl + Shift + P) | ||
1. Type "Preferences: Open Settings (JSON)" and press Enter | ||
1. Insert the following code into the settings.json file | ||
|
||
```json | ||
{ | ||
"tailwindCSS.experimental.classRegex": [ | ||
["clsx\\(([^)]_)\\)", "(?:'|\"|`)([^']_)(?:'|\"|`)"] | ||
], | ||
"prettier.documentSelectors": ["**/*.astro"], | ||
"[astro]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"astro", | ||
"typescript", | ||
"typescriptreact" | ||
], | ||
"files.insertFinalNewline": true | ||
} | ||
``` | ||
|
||
> Note: Please make sure you understand what you are doing before changing the settings. | ||
> | ||
> Here is a brief explanation of the settings. | ||
> | ||
> `tailwindCSS.experimental.classRegex` is for the Tailwind CSS and clsx() support. | ||
> | ||
> `prettier.documentSelectors (astro)` | ||
> and | ||
> `[astro]: { "editor.defaultFormatter": "esbenp.prettier-vscode" }` | ||
> are for the Prettier support for Astro files. | ||
> | ||
> `eslint.validate` is for the ESLint support. | ||
> | ||
> `files.insertFinalNewline` is for the final newline at the end of the file which if set to `false`, you may encounter some problems with Prettier. | ||
|
||
1. Save the file and you are done! | ||
|
||
## Getting Started | ||
|
||
1. Clone this repository | ||
|
||
```bash | ||
git clone https://github.com/esc-chula/gearfest-frontend.git | ||
``` | ||
|
||
or download the zip file and extract it. | ||
|
||
> Note: Make sure you go into the directory after cloning or extracting the zip file. | ||
> | ||
> ```bash | ||
> cd gearfest-frontend | ||
> ``` | ||
|
||
> 📣 For **Windows** users, please run the following command to prevent line ending issues. | ||
> | ||
> ```bash | ||
> git config --global core.autocrlf false | ||
> ``` | ||
|
||
1. Install dependencies | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
Make sure that all dependencies are installed successfully. | ||
|
||
1. Run the development server | ||
```bash | ||
pnpm dev | ||
``` | ||
1. Open [localhost:4321](http://localhost:4321) in your browser. Done! | ||
|
||
## Contributing | ||
|
||
1. Create a new branch | ||
|
||
```bash | ||
git checkout -b <branch-name> origin/dev | ||
``` | ||
|
||
> Note: In case you don't confident about how to name your branch, the branch name from Linear is a good choice. | ||
|
||
1. Make your changes | ||
1. Stage and commit your changes | ||
|
||
```bash | ||
git add . | ||
|
||
git commit -m "<commit-message>" | ||
``` | ||
|
||
> Note: Don't forget to use the [conventional commit format](#conventional-commit-format) for your commit message. | ||
|
||
1. Push your changes | ||
|
||
```bash | ||
git push origin <branch-name> | ||
``` | ||
|
||
1. Create a pull request to the dev branch in GitHub | ||
1. Wait for the code to be reviewed and merged | ||
1. Repeat | ||
|
||
> Note: Don't forget to always pull the latest changes from the dev branch before creating a new branch. | ||
> | ||
> ```bash | ||
> git pull origin dev | ||
> ``` | ||
|
||
**If you have any questions, please contact _Leon_ on Discord.** | ||
|
||
**Enjoy! 😋** | ||
|
||
### Conventional Commit Format | ||
|
||
In short, the commit message should look like this: | ||
|
||
```bash | ||
git commit -m "feat: <what-you-did>" | ||
|
||
# or | ||
|
||
git commit -m "fix: <what-you-fixed>" | ||
|
||
# or | ||
|
||
git commit -m "refactor: <what-you-refactored>" | ||
``` | ||
|
||
The commit message should start with one of the following types: | ||
|
||
- feat: A new feature | ||
- fix: A bug fix | ||
- refactor: A code change that neither fixes a bug nor adds a feature | ||
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
- docs: Documentation only changes | ||
- chore: Changes to the build process or auxiliary tools and libraries | ||
|
||
For more information, please read the [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/) documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import tailwind from "@astrojs/tailwind"; | ||
import { defineConfig } from "astro/config"; | ||
|
||
import react from "@astrojs/react"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind(), react()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "gearfest-frontend", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro check && astro build", | ||
"preview": "astro preview", | ||
"astro": "astro", | ||
"format": "prettier --write .", | ||
"lint": "eslint --ext .astro,.js,.jsx,.ts,.tsx, src && prettier --check ." | ||
}, | ||
"dependencies": { | ||
"@astrojs/check": "^0.3.4", | ||
"@astrojs/react": "^3.0.8", | ||
"@astrojs/tailwind": "^5.0.4", | ||
"@types/react": "^18.2.45", | ||
"@types/react-dom": "^18.2.18", | ||
"astro": "^4.0.7", | ||
"clsx": "2.0.0", | ||
"framer-motion": "10.16.16", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"sharp": "^0.33.1", | ||
"tailwindcss": "^3.4.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.15.0", | ||
"@typescript-eslint/parser": "^6.15.0", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-astro": "^0.31.0", | ||
"prettier": "^3.1.1", | ||
"prettier-plugin-astro": "^0.12.2", | ||
"prettier-plugin-organize-imports": "^3.2.4", | ||
"prettier-plugin-tailwindcss": "^0.5.9" | ||
}, | ||
"engines": { | ||
"node": "^20", | ||
"pnpm": "^8" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.