Skip to content

Commit

Permalink
Hide current semester if show all is pressed and highlight current se… (
Browse files Browse the repository at this point in the history
#1205)

Currently selected semester will be highlighted in semester list but won't be shown twice at the top
  • Loading branch information
SebiWrn authored Nov 20, 2023
1 parent d29a949 commit ff094d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/template/home.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@
Semesters
</header>
<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>
x-text="semesters[selectedSemesterIndex]?.FriendlyString()"
x-show="!navigation.getChild('allSemesters').value"></span>
<template x-if="navigation.getChild('allSemesters').value">
<template x-for="s in semesters">
<template x-for="(s, i) in semesters">
<button type="button" @click="switchSemester(s.Year, s.TeachingTerm)"
:class="{'border-l-4 bg-blue-100/50 border-blue-500/50 dark:bg-indigo-500/25 dark:border-indigo-600/50': i == selectedSemesterIndex }"
class="tum-live-side-navigation-group-item hover"
x-text="s.FriendlyString()"></button>
</template>
Expand Down

0 comments on commit ff094d4

Please sign in to comment.