Skip to content

Commit

Permalink
Improve semester selection in home sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefSchoenberger committed Aug 23, 2023
1 parent 721f5cc commit e0a0080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/template/home.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<i class="fa-solid fa-calendar"></i>
Semesters
</header>
<span class="tum-live-side-navigation-group-item mb-1 border-l-4 bg-blue-100/50 border-blue-500/50 dark:bg-indigo-500/25 dark:border-indigo-600/50"
<span class="tum-live-side-navigation-group-item mb-4 border-l-4 bg-blue-100/50 border-blue-500/50 dark:bg-indigo-500/25 dark:border-indigo-600/50"
x-text="semesters[selectedSemesterIndex]?.FriendlyString()"></span>
<template x-if="navigation.getChild('allSemesters').value">
<template x-for="s in semesters">
Expand Down Expand Up @@ -832,4 +832,4 @@
</div>
</div>
</div>
{{end}}
{{end}}
5 changes: 4 additions & 1 deletion web/ts/api/semesters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export class Semester {
}

public FriendlyString(): string {
return `${this.TeachingTerm === "W" ? "Winter" : "Summer"} ${this.Year}`;
if (this.TeachingTerm === "W")
return `Winter ${this.Year}/${this.Year + 1}`;
else
return `Summer ${this.Year}`;
}
}

Expand Down

0 comments on commit e0a0080

Please sign in to comment.