From df9fa7c6050c5eefd4d409a1e3287544f0c79d41 Mon Sep 17 00:00:00 2001 From: jzitnik-dev Date: Thu, 12 Feb 2026 20:18:37 +0100 Subject: [PATCH] chore: Some minor website modification changes --- README.md | 10 +-- package.json | 3 +- server.ts | 2 +- viewer/README.md | 36 --------- viewer/app/layout.tsx | 6 +- viewer/components/own/schedule-viewer.tsx | 94 +++++++++++++++++++---- viewer/next.config.ts | 2 +- web/hugo.yaml | 9 ++- 8 files changed, 92 insertions(+), 70 deletions(-) delete mode 100644 viewer/README.md diff --git a/README.md b/README.md index cd6cc58..7f815a9 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,6 @@ Jednoduchý parser pro SPŠE Ječná tabulku suplování. -## Environmental variables +## Self-hosting -- `SHAREPOINT_URL` - URL adresa sharepointu dané tabulky (volitelné, využije hard-coded URL) -- `EMAIL` - SPŠE Ječná account email (povinné, username@spsejecna.cz) -- `PASSWORD` - Heslo k SPŠE Ječná účtu - -## Spouštění serveru - -Just `npm start` 💀 +[Dokumentace zde](https://jecnarozvrh.jzitnik.dev/posts/self-hosting/) diff --git a/package.json b/package.json index ede9a6e..d94d828 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "build-noweb": "tsc", "serve": "concurrently \"node dist/server.js\" \"node dist/cron-runner.js\"", "dev-web": "cd web && hugo serve", - "parse-timetable": "node scripts/load_static_schedule.js" + "parse-timetable": "node scripts/load_static_schedule.js", + "dev-preview": "tsx server.ts" }, "dependencies": { "axios": "^1.13.5", diff --git a/server.ts b/server.ts index 16cccb5..9c7812c 100644 --- a/server.ts +++ b/server.ts @@ -134,7 +134,7 @@ if (SERVE_WEB) { // @ts-ignore const nextApp = next({ dev, - dir: path.join(__dirname, '../viewer') + dir: dev ? path.join(__dirname, 'viewer') : path.join(__dirname, '../viewer') }) const handle = nextApp.getRequestHandler() diff --git a/viewer/README.md b/viewer/README.md deleted file mode 100644 index e215bc4..0000000 --- a/viewer/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/viewer/app/layout.tsx b/viewer/app/layout.tsx index 629b8c7..b1fd281 100644 --- a/viewer/app/layout.tsx +++ b/viewer/app/layout.tsx @@ -49,11 +49,11 @@ export default function RootLayout({ -