├── src ├── styles │ └── global.css ├── utils │ ├── episode.js │ └── api.js ├── components │ ├── Footer.astro │ ├── ui │ │ ├── Table.astro │ │ ├── Carousel.astro │ │ └── Card.astro │ └── Header.astro ├── layouts │ └── Layout.astro ├── assets │ ├── background.svg │ └── astro.svg ├── pages │ ├── watch │ │ └── [id] │ │ │ └── [slug].astro │ ├── completed.astro │ └── index.astro └── scripts │ ├── infinite-scroll.js │ └── watch.js ├── .vscode ├── extensions.json └── launch.json ├── tsconfig.json ├── .prettierrc.mjs ├── .gitignore ├── astro.config.mjs ├── package.json ├── public └── favicon.svg └── README.md /src/styles/global.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | @plugin "daisyui"; 3 | 4 | @variant hover (&:hover); 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /src/utils/episode.js: -------------------------------------------------------------------------------- 1 | export function getEpisodeToPlay(episodes, isFinished, episodeParam) { 2 | const totalEp = episodes?.at(-1) ?? 1; 3 | return episodeParam ?? (isFinished ? episodes[0] : totalEp); 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict", 3 | "include": [".astro/types.d.ts", "**/*"], 4 | "exclude": ["dist"], 5 | "compilerOptions": { 6 | "baseUrl": ".", 7 | "paths": { 8 | "~/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/components/Footer.astro: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /.prettierrc.mjs: -------------------------------------------------------------------------------- 1 | // .prettierrc.mjs 2 | /** @type {import("prettier").Config} */ 3 | export default { 4 | plugins: ['prettier-plugin-astro'], 5 | overrides: [ 6 | { 7 | files: '*.astro', 8 | options: { 9 | parser: 'astro', 10 | }, 11 | }, 12 | ], 13 | }; 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | 4 | # generated types 5 | .astro/ 6 | 7 | # dependencies 8 | node_modules/ 9 | 10 | # logs 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | 23 | # jetbrains setting folder 24 | .idea/ 25 | .vercel 26 | -------------------------------------------------------------------------------- /src/components/ui/Table.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { data } = Astro.props; 3 | --- 4 | 5 |
6 | 7 | 8 | { 9 | data.map((i: any, index: number) => ( 10 | 11 | 12 | 13 | 14 | )) 15 | } 16 | 17 |
{i.type}{i.data}
18 |
19 | -------------------------------------------------------------------------------- /astro.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import { defineConfig } from "astro/config"; 3 | import tailwindcss from "@tailwindcss/vite"; 4 | import cloudflare from "@astrojs/cloudflare"; 5 | 6 | import playformCompress from "@playform/compress"; 7 | 8 | // https://astro.build/config 9 | export default defineConfig({ 10 | vite: { 11 | plugins: [tailwindcss()], 12 | build: { 13 | minify: false, 14 | }, 15 | }, 16 | 17 | output: "server", 18 | 19 | adapter: cloudflare({ 20 | platformProxy: { 21 | enabled: false, 22 | }, 23 | }), 24 | 25 | integrations: [playformCompress()], 26 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "animez-astro", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "build": "astro build", 8 | "preview": "astro preview", 9 | "astro": "astro", 10 | "format": "prettier --write src/*", 11 | "cf": "astro build && npx wrangler pages deploy dist/" 12 | }, 13 | "dependencies": { 14 | "@astrojs/cloudflare": "^12.2.3", 15 | "@playform/compress": "^0.1.7", 16 | "@tailwindcss/vite": "^4.0.9", 17 | "astro": "^5.4.1", 18 | "tailwindcss": "^4.0.9" 19 | }, 20 | "devDependencies": { 21 | "daisyui": "^5.0.0", 22 | "prettier": "^3.5.3", 23 | "prettier-plugin-astro": "^0.14.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /src/layouts/Layout.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import "~/styles/global.css"; 3 | import { ClientRouter } from "astro:transitions"; 4 | import Header from "~/components/Header.astro"; 5 | import Footer from "~/components/Footer.astro"; 6 | 7 | const { title, description } = Astro.props; 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {title} 18 | 19 | 20 | 21 |
22 |
23 |
24 | 25 |
26 |
27 |