Skip to content

Commit e817de9

Browse files
committed
frontend: linting
1 parent 281e4f2 commit e817de9

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed
+10-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<script lang="ts">
2-
let {width = "75px", height = "75px"} = $props();
2+
let { width = "75px", height = "75px" } = $props();
33
</script>
44

5-
<svg
6-
{width}
7-
{height}
8-
viewBox="0 0 24 24"
9-
fill="none"
10-
xmlns="http://www.w3.org/2000/svg"
11-
>
12-
<path d="M5.06152 12C5.55362 8.05369 8.92001 5 12.9996 5C17.4179 5 20.9996 8.58172 20.9996 13C20.9996 17.4183 17.4179 21 12.9996 21H8M13 13V9M11 3H15M3 15H8M5 18H10"
13-
stroke="currentColor" stroke-width="2" stroke-linecap="round"
14-
stroke-linejoin="round"/>
15-
</svg>
5+
<svg {width} {height} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
6+
<path
7+
d="M5.06152 12C5.55362 8.05369 8.92001 5 12.9996 5C17.4179 5 20.9996 8.58172 20.9996 13C20.9996 17.4183 17.4179 21 12.9996 21H8M13 13V9M11 3H15M3 15H8M5 18H10"
8+
stroke="currentColor"
9+
stroke-width="2"
10+
stroke-linecap="round"
11+
stroke-linejoin="round"
12+
/>
13+
</svg>

frontend/src/components/timetable/TimePicker.svelte

+4-7
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@
7474
type="button"
7575
class:ring-2={isOpen}
7676
class:ring-accent={isOpen}
77-
class="flex flex-row items-center gap-x-2 rounded-md p-0.5 md:p-2 text-center md:text-2xl hover:ring-2 hover:ring-accent"
78-
onclick={() => isOpen = true}
77+
class="flex flex-row items-center gap-x-2 rounded-md p-0.5 text-center hover:ring-2 hover:ring-accent md:p-2 md:text-2xl"
78+
onclick={() => (isOpen = true)}
7979
>
8080
<Calendar />
8181
<span>{selectedDate.toFormat("dd.MM.yyyy - HH:mm")}</span>
8282
</button>
8383

8484
{#if isOpen}
8585
<div
86-
class="absolute left-1/2 top-1/2 z-10 mt-8 w-80 -translate-x-1/4 transform rounded bg-primary p-4 shadow-lg md:left-auto md:top-full md:mt-2 md:w-128 md:transform-none"
86+
class="md:w-128 absolute left-1/2 top-1/2 z-10 mt-8 w-80 -translate-x-1/4 transform rounded bg-primary p-4 shadow-lg md:left-auto md:top-full md:mt-2 md:transform-none"
8787
>
8888
<!-- header -->
8989
<div class="mb-4 flex items-center justify-between">
@@ -156,10 +156,7 @@
156156
</div>
157157

158158
<!-- select button -->
159-
<button
160-
class="mt-4 w-full rounded bg-accent py-2 font-bold text-black"
161-
onclick={() => isOpen = false}
162-
>
159+
<button class="mt-4 w-full rounded bg-accent py-2 font-bold text-black" onclick={() => (isOpen = false)}>
163160
Select
164161
</button>
165162
</div>

frontend/src/components/timetable/TimeTable.svelte

+18-17
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
};
1919
</script>
2020

21-
<div class="flex flex-col md:w-[40%] gap-y-2">
21+
<div class="flex flex-col gap-y-2 md:w-[40%]">
2222
<div class="flex flex-row items-center justify-end gap-x-2">
2323
<button
2424
type="button"
@@ -53,23 +53,24 @@
5353
<TimePicker bind:selectedDate={dateSelected} />
5454

5555
<div class="ml-auto flex gap-1 md:gap-3">
56-
<!-- Reset time -->
57-
<button class="flex flex-row items-center bg-primary rounded-3xl px-2 md:px-4"
58-
onclick={() => (dateSelected = DateTime.now().set({ second: 0, millisecond: 0 }))}>
59-
<Clock height="25px" width="25px" />
60-
<span class="hidden md:block text-xl">Now</span>
61-
</button>
56+
<!-- Reset time -->
57+
<button
58+
class="flex flex-row items-center rounded-3xl bg-primary px-2 md:px-4"
59+
onclick={() => (dateSelected = DateTime.now().set({ second: 0, millisecond: 0 }))}
60+
>
61+
<Clock height="25px" width="25px" />
62+
<span class="hidden text-xl md:block">Now</span>
63+
</button>
6264

63-
<!-- Query departures/ arrivals of a station -->
64-
<button
65-
class="{stationSelected && dateSelected
66-
? 'bg-accent text-black'
67-
: 'bg-primary text-text'} flex items-center justify-center rounded-3xl px-4 text-background md:text-2xl font-bold"
68-
onclick={gotoRequest}
69-
>
70-
Search
71-
</button>
65+
<!-- Query departures/ arrivals of a station -->
66+
<button
67+
class="{stationSelected && dateSelected
68+
? 'bg-accent text-black'
69+
: 'bg-primary text-text'} flex items-center justify-center rounded-3xl px-4 font-bold text-background md:text-2xl"
70+
onclick={gotoRequest}
71+
>
72+
Search
73+
</button>
7274
</div>
7375
</div>
74-
7576
</div>

frontend/src/routes/+layout.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<a href="/">
1616
<div class="flex cursor-pointer flex-row items-center">
1717
<Logo />
18-
<h1 class="relative top-[-0.25rem] hidden md:inline text-[2rem] font-bold">NAVIGATOR</h1>
18+
<h1 class="relative top-[-0.25rem] hidden text-[2rem] font-bold md:inline">NAVIGATOR</h1>
1919
</div>
2020
</a>
2121

2222
<Navbar bind:type />
2323
</div>
2424

2525
<!-- Content -->
26-
{@render children()}
26+
{@render children()}

0 commit comments

Comments
 (0)