Skip to content

Commit

Permalink
Merge pull request #85 from Untersander/main
Browse files Browse the repository at this point in the history
Fix Musterstudienpläne first semester always being wrong
  • Loading branch information
jeremystucki authored Oct 30, 2024
2 parents c8b45a3 + 2a2de62 commit f188e99
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default defineComponent({
data() {
return {
isBurgerActive: false,
startSemesterName: SemesterInfo.lastSpringSemester().toString(),
startSemesterName: SemesterInfo.lastAutumnSemester().toString(),
categories: [
{
title: 'Musterpläne Teilzeit',
Expand Down
1 change: 1 addition & 0 deletions src/components/PageFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
],
},
},
Expand Down
10 changes: 10 additions & 0 deletions src/helpers/semester-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const plugin = require('tailwindcss/plugin')
import plugin from 'tailwindcss/plugin';

/** @type {import('tailwindcss').Config} */
export default {
Expand Down

0 comments on commit f188e99

Please sign in to comment.