Skip to content

Commit e7827bf

Browse files
More consistent format
1 parent 334dac0 commit e7827bf

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<script lang="ts">
2+
import { Route } from "../../stores/mountains"
3+
export let route: Route;
4+
</script>
5+
6+
<div class="italic text-gray-600">{route.ascent}</div>

src/components/mountains/RouteInfo.svelte

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
import { Route } from '../../stores/mountains'
33
import { repeatString } from '../../utils/array'
44
import TopoText from '../TopoText.svelte'
5-
import Pitches from './Pitches.svelte'
5+
import Pitches from './Pitches.svelte'
6+
import RouteAttribution from './RouteAttribution.svelte'
67
7-
export let route: Route;
8+
export let route: Route
89
</script>
910

1011
<div class="font-bold">
@@ -16,11 +17,15 @@
1617
</div>
1718
{#if route.image}
1819
<a target="_blank" rel="noopener noreferrer" href={route.image}>
19-
<img class="h-64 w-full object-cover object-scale" alt={route.name} src={route.image} />
20+
<img
21+
class="h-64 w-full object-cover object-scale"
22+
alt={route.name}
23+
src={route.image} />
2024
</a>
2125
{/if}
2226
<div>
2327
<TopoText text={route.description} />
2428
</div>
2529

26-
<Pitches pitches={route.pitches}/>
30+
<Pitches pitches={route.pitches} />
31+
<RouteAttribution {route} />

src/components/mountains/RoutesFilter.svelte

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
import Grade from './Grade.svelte'
2525
import { parseGrade } from '../../utils/grade'
2626
import VirtualList from '../VirtualList.svelte'
27-
import { repeatString } from '../../utils/array'
27+
import { repeatString } from '../../utils/array'
28+
import RouteAttribution from './RouteAttribution.svelte'
2829
2930
const viewMountain = (mountain: Mountain, route: Route) => {
3031
fragment.update((value) => ({
@@ -71,7 +72,7 @@
7172
)
7273
})
7374
// Filter stars
74-
.filter(([,r]) => {
75+
.filter(([, r]) => {
7576
if ($minStars !== 'any' && r.quality < $minStars) return false
7677
if ($maxStars !== 'any' && r.quality > $maxStars) return false
7778
return true
@@ -121,7 +122,7 @@
121122
<label>
122123
Min:
123124
<select bind:value={$minStars}>
124-
<option value='any'>Any</option>
125+
<option value="any">Any</option>
125126
<option value={1}>1</option>
126127
<option value={2}>2</option>
127128
<option value={3}>3</option>
@@ -130,7 +131,7 @@
130131
<label>
131132
Max:
132133
<select bind:value={$maxStars}>
133-
<option value='any'>Any</option>
134+
<option value="any">Any</option>
134135
<option>0</option>
135136
<option>1</option>
136137
<option>2</option>
@@ -185,7 +186,7 @@
185186
</div>
186187
<div>
187188
{item[1].description}
188-
<div class="italic text-gray-600">{item[1].ascent}</div>
189+
<RouteAttribution route={item[1]} />
189190
</div>
190191
</Card>
191192
</div>

0 commit comments

Comments
 (0)