From 0a7e3da6d33a8868173fdef6431bb442a28bc48b Mon Sep 17 00:00:00 2001 From: Jan Untersander Date: Tue, 29 Oct 2024 23:11:00 +0100 Subject: [PATCH 1/2] Change require to import statement to fix npm run dev/build --- tailwind.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index 81f65d4..9d71799 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,4 @@ -const plugin = require('tailwindcss/plugin') +import plugin from 'tailwindcss/plugin'; /** @type {import('tailwindcss').Config} */ export default { From 2a2de62ea6a2931cb94e315be18c0d4940ea2263 Mon Sep 17 00:00:00 2001 From: Jan Untersander Date: Tue, 29 Oct 2024 23:11:42 +0100 Subject: [PATCH 2/2] Update first semster to always be current or last HS for musterstudienplaene --- src/components/Navigation.vue | 2 +- src/components/PageFooter.vue | 1 + src/helpers/semester-info.ts | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 4f60d80..8cc82e4 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -70,7 +70,7 @@ export default defineComponent({ data() { return { isBurgerActive: false, - startSemesterName: SemesterInfo.lastSpringSemester().toString(), + startSemesterName: SemesterInfo.lastAutumnSemester().toString(), categories: [ { title: 'Musterpläne Teilzeit', diff --git a/src/components/PageFooter.vue b/src/components/PageFooter.vue index ef4c1e0..5d565ac 100644 --- a/src/components/PageFooter.vue +++ b/src/components/PageFooter.vue @@ -47,6 +47,7 @@ export default defineComponent({ { name: "Vina Zahnd", githubHandle: "Venyla" }, { name: "Linus Flury", githubHandle: "CHLinusch" }, { name: "Marco Schneider", githubHandle: "marcoschneider" }, + { name: "Jan Untersander", githubHandle: "Untersander" }, ], }, }, diff --git a/src/helpers/semester-info.ts b/src/helpers/semester-info.ts index 9794d90..b31e45a 100644 --- a/src/helpers/semester-info.ts +++ b/src/helpers/semester-info.ts @@ -27,6 +27,16 @@ export class SemesterInfo { return currentSemester.minus(1); } + static lastAutumnSemester() { + const currentSemester = SemesterInfo.now(); + + if (!currentSemester.isSpringSemester) { + return currentSemester; + } + + return currentSemester.minus(1); + } + static parse(text: string) { if (text.length !== 4) return null;