diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a882442 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..79e544f --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,22 @@ +name: Format + +on: + push: + pull_request: + +jobs: + format: + runs-on: ubuntu-latest + name: Format Files + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - name: Prettier + run: bun run format ./src + env: + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + with: + commit_message: 'style: format files' diff --git a/README.md b/README.md index 3620165..337d398 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # inflatedchickens ## usage + ```bash # install dependencies bun i diff --git a/package.json b/package.json index 0ae020d..7422207 100644 --- a/package.json +++ b/package.json @@ -28,4 +28,40 @@ "vite": "^4.5.5" }, "type": "module" + "name": "floatingchickens", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/kit": "^2.7.4", + "@typescript-eslint/eslint-plugin": "^8.13.0", + "@typescript-eslint/parser": "^8.13.0", + "autoprefixer": "^10.4.20", + "eslint": "^9.14.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-svelte": "^2.46.0", + "postcss": "^8.4.47", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", + "svelte": "^5.1.9", + "svelte-check": "^4.0.5", + "tailwindcss": "^3.4.14", + "tslib": "^2.8.1", + "typescript": "^5.6.3", + "vite": "^5.4.10" + }, + "type": "module", + "dependencies": { + "@sveltejs/vite-plugin-svelte": "^4.0.0", + "svelte-kit": "^1.2.0" + } } diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b..0f77216 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/src/app.html b/src/app.html index 165a387..00b6bae 100644 --- a/src/app.html +++ b/src/app.html @@ -1,12 +1,12 @@ - + - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/components/Action.svelte b/src/lib/components/Action.svelte index 647d543..1e4f9ec 100644 --- a/src/lib/components/Action.svelte +++ b/src/lib/components/Action.svelte @@ -1,11 +1,27 @@ - diff --git a/src/lib/components/Timeline.svelte b/src/lib/components/Timeline.svelte index 820141d..a640534 100644 --- a/src/lib/components/Timeline.svelte +++ b/src/lib/components/Timeline.svelte @@ -2,15 +2,33 @@ import type { ActionData } from '$lib/types'; import Action from './Action.svelte'; - let { actions = $bindable() }: { actions: ActionData[] } = $props() + let { + actions = $bindable(), + displaying = $bindable() + }: { actions: ActionData[]; displaying: boolean } = $props(); + // let latestActions: ActionData[] = $derived(actions.toReversed().slice(0, 5)); -
+

Timeline

+
+ + {#each actions as _, i} { - actions.splice(i, 1); + actions.splice(actions.indexOf(actions[i]), 1); }} /> {/each} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0034574..c0aa26d 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,12 +1,12 @@ +{@render children()} + - -{@render children()} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 42dee6f..aefc4d7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,3 +1,6 @@ -

hiiii :3

- -scount +
+

hiiii :3

+ + scout + +
diff --git a/src/routes/scout/+page.svelte b/src/routes/scout/+page.svelte index 60df937..81227d6 100644 --- a/src/routes/scout/+page.svelte +++ b/src/routes/scout/+page.svelte @@ -1,6 +1,7 @@
@@ -39,5 +42,14 @@ + +
+