Skip to content

Commit

Permalink
Some more layout changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SebiWrn committed Sep 20, 2024
1 parent 6b37b1d commit 81ef5fd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion web/assets/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ label:has(~ .tum-live-input) {
}

.tum-live-search-result-main {
@apply flex text-left rounded-lg text-4 text-sm py-1 px-2 mt-1 border border-black dark:border-gray-300 w-full text-black dark:text-gray-300 h-fit;
@apply flex text-left rounded-lg text-4 text-sm py-1 px-2 mt-1 border border-black dark:border-gray-300 w-full text-black dark:text-gray-300;
width: 100%;
height: fit-content !important;
}
4 changes: 3 additions & 1 deletion web/template/search-global.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@
searcher.searchInput='';
searcher.open = false;
document.location.href = '/w/' + subtitle.courseSlug + '/' + subtitle.streamID + '/?t=' + (subtitle.timestamp / 1000);">
<p x-text="subtitle.streamName"></p>
<p class="text-gray-600 dark:text-gray-400" x-text="subtitle.streamName" x-show="subtitle.streamName != ''"></p>
<p class="text-gray-600 dark:text-gray-400" x-text="home.datetimeToFriendly(subtitle.streamStartTime)" x-show="subtitle.streamName == ''"></p>
<p x-text="subtitle.text"></p>
<p class="text-gray-600 dark:text-gray-400" x-text="(new Date(subtitle.timestamp)).toLocaleTimeString('en-US', {timeZone: 'UTC', hourCycle:'h24'})"></p>
</a>
</li>
{{end}}
Expand Down
17 changes: 13 additions & 4 deletions web/template/search-page.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@
<template x-if="searcher != undefined" class="h-full w-1/2">
<ul class="center rounded-lg grid py-1 px-1 mt-1 gap-1" style="width: 60%;" role="listbox" id="search-results">

<li role="listitem" aria-selected="false" class="text-gray-700 dark:text-gray-200">
<p>Courses</p>
</li>
<template x-if="!searcher.hits.COURSES || searcher.hits.COURSES.length <= 0">
<li role="listitem" aria-selected="false">
<a class="flex text-left rounded-lg text-4 tum-live-bg text-sm py-1 px-2 mt-1">
Expand All @@ -284,6 +287,9 @@
</li>
</template>

<li role="listitem" aria-selected="false" class="text-gray-700 dark:text-gray-200">
<p>Subtitles</p>
</li>
<template x-if="!searcher.hits.SUBTITLES || searcher.hits.SUBTITLES.length <= 0">
<div>
<template x-if="filterCourses.length == 0">
Expand All @@ -303,7 +309,7 @@
</div>
</template>
<template x-for="subtitle in searcher.hits.SUBTITLES">
<li role="option" aria-selected="false" tabindex="-1">
<li role="option" aria-selected="false" tabindex="-1" class="h-fit">
<a class="tum-live-search-result-main flex flex-col"
@mousedown="
document.location.href = '/w/' + subtitle.courseSlug + '/' + subtitle.streamID + '/?t=' + (subtitle.timestamp / 1000);"
Expand All @@ -326,16 +332,19 @@
</li>
</template>

<li role="listitem" aria-selected="false" class="text-gray-700 dark:text-gray-200">
<p>Streams</p>
</li>
<template x-if="!searcher.hits.STREAMS || searcher.hits.STREAMS.length <= 0">
<div>
<template x-if="filterSemesters.length == 0">
<template x-if="(filterSemesters.length == 0 || filterSemesters.length > 1) && filterCourses.length == 0">
<li role="listitem" aria-selected="false">
<a class="flex text-left rounded-lg text-4 tum-live-bg text-sm py-1 px-2 mt-1">
No Stream found (at least one semester selection required)
No Stream found (only one selection required or some courses have to be selected)
</a>
</li>
</template>
<template x-if="filterSemesters.length > 0">
<template x-if="filterSemesters.length == 1 || filterCourses.length > 0">
<li role="listitem" aria-selected="false">
<a class="flex text-left rounded-lg text-4 tum-live-bg text-sm py-1 px-2 mt-1">
No Stream found
Expand Down

0 comments on commit 81ef5fd

Please sign in to comment.