|
71 | 71 | </script>
|
72 | 72 |
|
73 | 73 | <div class="flex flex-col page w-full">
|
74 |
| - <h1 class="font-bold">Routes</h1> |
75 |
| - <input |
76 |
| - class="w-full border-black border-solid border p-2 rounded" |
77 |
| - type="text" |
78 |
| - bind:value={$filterText} /> |
79 |
| - <div class="flex flex-row justify-between w-full"> |
80 |
| - <label> |
81 |
| - Only with picture |
82 |
| - <input type="checkbox" bind:checked={$onlyWithPicture} /> |
83 |
| - </label> |
84 |
| - <label> |
85 |
| - Visible on map |
86 |
| - <input type="checkbox" bind:checked={$visibleOnly} /> |
87 |
| - </label> |
88 |
| - </div> |
89 |
| - <div class="flex flex-row justify-between w-full"> |
90 |
| - <label> |
91 |
| - Alpine |
92 |
| - <input type="checkbox" bind:checked={$alpine} /> |
93 |
| - </label> |
94 |
| - <label> |
95 |
| - Rock |
96 |
| - <input type="checkbox" bind:checked={$rock} /> |
97 |
| - </label> |
98 |
| - <label> |
99 |
| - Ice |
100 |
| - <input type="checkbox" bind:checked={$ice} /> |
101 |
| - </label> |
102 |
| - <label> |
103 |
| - Mixed |
104 |
| - <input type="checkbox" bind:checked={$mixed} /> |
105 |
| - </label> |
106 |
| - </div> |
107 |
| - <SortyBy |
108 |
| - options={[ |
109 |
| - { name: 'name', getter: ([m, r]) => r.name }, |
110 |
| - { |
111 |
| - name: 'length', |
112 |
| - getter: ([m, r]) => { |
113 |
| - const length = parseInt(r.length) |
114 |
| - return isNaN(length) ? 0 : length |
| 74 | + <details open> |
| 75 | + <summary class="font-bold">Routes</summary> |
| 76 | + <input |
| 77 | + class="w-full border-black border-solid border p-2 rounded" |
| 78 | + type="text" |
| 79 | + bind:value={$filterText} /> |
| 80 | + <div class="flex flex-row justify-between w-full"> |
| 81 | + <label> |
| 82 | + Only with picture |
| 83 | + <input type="checkbox" bind:checked={$onlyWithPicture} /> |
| 84 | + </label> |
| 85 | + <label> |
| 86 | + Visible on map |
| 87 | + <input type="checkbox" bind:checked={$visibleOnly} /> |
| 88 | + </label> |
| 89 | + </div> |
| 90 | + <div class="flex flex-row justify-between w-full"> |
| 91 | + <label> |
| 92 | + Alpine |
| 93 | + <input type="checkbox" bind:checked={$alpine} /> |
| 94 | + </label> |
| 95 | + <label> |
| 96 | + Rock |
| 97 | + <input type="checkbox" bind:checked={$rock} /> |
| 98 | + </label> |
| 99 | + <label> |
| 100 | + Ice |
| 101 | + <input type="checkbox" bind:checked={$ice} /> |
| 102 | + </label> |
| 103 | + <label> |
| 104 | + Mixed |
| 105 | + <input type="checkbox" bind:checked={$mixed} /> |
| 106 | + </label> |
| 107 | + </div> |
| 108 | + <SortyBy |
| 109 | + options={[ |
| 110 | + { name: 'name', getter: ([m, r]) => r.name }, |
| 111 | + { |
| 112 | + name: 'length', |
| 113 | + getter: ([m, r]) => { |
| 114 | + const length = parseInt(r.length) |
| 115 | + return isNaN(length) ? 0 : length |
| 116 | + }, |
115 | 117 | },
|
116 |
| - }, |
117 |
| - { name: 'pitches', getter: ([m, r]) => r.pitches.length }, |
118 |
| - { name: 'grade', getter: ([m, r]) => r.grade }, |
119 |
| - ]} |
120 |
| - unsorted={filteredRoutes} |
121 |
| - bind:direction={$direction} |
122 |
| - bind:selectedIndex={$sortBy} |
123 |
| - bind:sorted /> |
| 118 | + { name: 'pitches', getter: ([m, r]) => r.pitches.length }, |
| 119 | + { name: 'grade', getter: ([m, r]) => r.grade }, |
| 120 | + ]} |
| 121 | + unsorted={filteredRoutes} |
| 122 | + bind:direction={$direction} |
| 123 | + bind:selectedIndex={$sortBy} |
| 124 | + bind:sorted /> |
| 125 | + </details> |
124 | 126 | <div class="my-2">
|
125 | 127 | (showing {filteredRoutes.length} of {routes.length} routes)
|
126 | 128 | </div>
|
|
0 commit comments