File tree 11 files changed +46
-43
lines changed
11 files changed +46
-43
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,14 @@ export default Vue.extend({
30
30
computed: {
31
31
isActive(): IsActive {
32
32
return {
33
- 'is-active': this.$route.path === this.path,
33
+ 'is-active': ( this.isHash ? this. $route.hash : this.$route. path) === this.path,
34
34
};
35
35
},
36
36
path(): string {
37
- return this.localePath(this.to);
37
+ return this.isHash ? this.to : this.localePath(this.to);
38
+ },
39
+ isHash(): boolean {
40
+ return this.to.startsWith('#');
38
41
},
39
42
},
40
43
});
Original file line number Diff line number Diff line change 11
11
<button class =" button is-warning" @click =" setCookies(false)" >
12
12
{{ $t('action.decline') }}
13
13
</button >
14
- <NuxtLink : to =" localePath(' /about') " class =" button is-info" >
14
+ <ElementLink to =" /about" class =" button is-info" >
15
15
{{ $t('navbar.about') }}
16
- </NuxtLink >
16
+ </ElementLink >
17
17
</div >
18
18
</div >
19
19
</template >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<nav class =" navbar" >
3
3
<div class =" navbar-brand" >
4
- <NuxtLink : to =" localePath('/') " class =" navbar-item icon-text" >
4
+ <ElementLink to =" / " class =" navbar-item icon-text" >
5
5
<img src =" ~assets/oengus.svg" class =" icon" alt =" Oengus logo" >
6
6
<span >
7
7
Oengus
8
8
</span >
9
- </NuxtLink >
9
+ </ElementLink >
10
10
<button class =" button navbar-burger" :class =" isActiveClass" @click =" toggleNavbarActive" >
11
11
<span />
12
12
<span />
41
41
<div class =" navbar-item" >
42
42
<WidgetV1Redirect />
43
43
</div >
44
- <NuxtLink : to =" localePath(' /about') " class =" navbar-item" >
44
+ <ElementLink to =" /about" class =" navbar-item" >
45
45
{{ $t('navbar.about') }}
46
- </NuxtLink >
47
- <NuxtLink : to =" localePath(' /patrons') " class =" navbar-item" >
46
+ </ElementLink >
47
+ <ElementLink to =" /patrons" class =" navbar-item" >
48
48
{{ $t('navbar.patrons') }}
49
- </NuxtLink >
49
+ </ElementLink >
50
50
<WidgetLanguagePicker />
51
51
<WidgetSignInPicker type =" navbar" is-right />
52
52
</div >
Original file line number Diff line number Diff line change 5
5
{{ $t('calendar.title') }}
6
6
</span >
7
7
<span >
8
- (<NuxtLink : to =" localePath(' /calendar') " >{{ $t('homepage.marathons.calendar') }}</NuxtLink >)
8
+ (<ElementLink to =" /calendar" >{{ $t('homepage.marathons.calendar') }}</ElementLink >)
9
9
</span >
10
10
</h3 >
11
11
18
18
<div :key =" marathonsList.key + 'prespacer'" class =" spacer" />
19
19
<template v-for =" (marathon , index ) in homepageMarathons [marathonsList .key ] " >
20
20
<span :key =" marathonsList.key + 'name' + index" class =" notification" :class =" getRowParity(index)" >
21
- <NuxtLink :to =" localePath( `/marathon/${marathon.id}`) " >
21
+ <ElementLink :to =" `/marathon/${marathon.id}`" >
22
22
{{ marathon.name }}
23
- </NuxtLink >
23
+ </ElementLink >
24
24
</span >
25
25
<span :key =" marathonsList.key + 'location' + index" class =" notification location" :class =" getRowParity(index)" >
26
26
<span v-if =" marathon.onsite && marathon.country" class =" icon flag-icon" :class =" `flag-icon-${marathon.country.toLowerCase()}`" />
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div v-if =" ticker" class =" message" :class =" messageClass" >
3
3
<div class =" message-header" >
4
- <NuxtLink :to =" linkedRun" >
4
+ <ElementLink :to =" linkedRun" >
5
5
{{ $t(messageHeaderTitle, messageHeaderArgs) }}
6
- </NuxtLink >
6
+ </ElementLink >
7
7
</div >
8
8
9
9
<div class =" message-body" >
Original file line number Diff line number Diff line change 5
5
{{ run.setupBlock ? run.setupBlockText : run.gameName }}
6
6
</h4 >
7
7
<p v-for =" runner in run.runners" :key =" runner.id" >
8
- <NuxtLink :to =" localePath( `/user/${runner.username}`) " >
8
+ <ElementLink :to =" `/user/${runner.username}`" >
9
9
{{ runner.username }}
10
- </NuxtLink >
10
+ </ElementLink >
11
11
</p >
12
12
</div >
13
13
54
54
</template >
55
55
56
56
<span class =" is-label" >{{ $t('marathon.schedule.table.link') }}</span >
57
- <NuxtLink :to =" ' #run-' + run.id" rel =" nofollow" >
57
+ <ElementLink :to =" ` #run-${ run.id}` " rel =" nofollow" >
58
58
{{ `#run-${run.id}` }}
59
- </NuxtLink >
59
+ </ElementLink >
60
60
</div >
61
61
</template >
62
62
Original file line number Diff line number Diff line change 5
5
</p >
6
6
<ul class =" menu-list" >
7
7
<li >
8
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/settings`) " >
8
+ <ElementLink :to =" `/marathon/${marathonId}/settings`" >
9
9
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'cogs' ]" />
10
10
<span class =" menu-item-label" >
11
11
{{ $t('marathon.menu.settings') }}
12
12
</span >
13
- </NuxtLink >
13
+ </ElementLink >
14
14
</li >
15
15
<li >
16
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/selection`) " >
16
+ <ElementLink :to =" `/marathon/${marathonId}/selection`" >
17
17
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'check-square' ]" />
18
18
<span class =" menu-item-label" >
19
19
{{ $t('marathon.menu.selectRuns') }}
20
20
</span >
21
- </NuxtLink >
21
+ </ElementLink >
22
22
</li >
23
23
<li >
24
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/schedule/manage`) " >
24
+ <ElementLink :to =" `/marathon/${marathonId}/schedule/manage`" >
25
25
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'calendar-check' ]" />
26
26
<span class =" menu-item-label" >
27
27
{{ $t('marathon.menu.manageSchedule') }}
28
28
</span >
29
- </NuxtLink >
29
+ </ElementLink >
30
30
</li >
31
31
<li >
32
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/incentives/manage`) " >
32
+ <ElementLink :to =" `/marathon/${marathonId}/incentives/manage`" >
33
33
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'dot-circle' ]" />
34
34
<span class =" menu-item-label" >
35
35
{{ $t('marathon.menu.manageIncentives') }}
36
36
</span >
37
- </NuxtLink >
37
+ </ElementLink >
38
38
</li >
39
39
</ul >
40
40
</div >
Original file line number Diff line number Diff line change 5
5
</p >
6
6
<ul class =" menu-list" >
7
7
<li >
8
- <NuxtLink :to =" localePath( `/marathon/${marathonId}`) " >
8
+ <ElementLink :to =" `/marathon/${marathonId}`" >
9
9
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'home' ]" />
10
10
<span class =" menu-item-label" >
11
11
{{ $t('marathon.menu.home') }}
12
12
</span >
13
- </NuxtLink >
13
+ </ElementLink >
14
14
</li >
15
15
<li >
16
16
<ElementLink :to =" `/marathon/${marathonId}/schedule`" >
21
21
</ElementLink >
22
22
</li >
23
23
<li >
24
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/submissions`) " >
24
+ <ElementLink :to =" `/marathon/${marathonId}/submissions`" >
25
25
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'book' ]" />
26
26
<span class =" menu-item-label" >
27
27
{{ $t('marathon.menu.viewSubmissions') }}
28
28
</span >
29
- </NuxtLink >
29
+ </ElementLink >
30
30
</li >
31
31
<li v-if =" shouldShowRedirectLinks" >
32
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/submit`) " >
32
+ <ElementLink :to =" `/marathon/${marathonId}/submit`" >
33
33
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'paper-plane' ]" />
34
34
<span class =" menu-item-label" >
35
35
{{ $t('marathon.menu.submitRuns') }}
36
36
</span >
37
- </NuxtLink >
37
+ </ElementLink >
38
38
</li >
39
39
</ul >
40
40
</div >
Original file line number Diff line number Diff line change 5
5
</p >
6
6
<ul class =" menu-list" >
7
7
<li >
8
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/donate`) " >
8
+ <ElementLink :to =" `/marathon/${marathonId}/donate`" >
9
9
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'donate' ]" />
10
10
<span class =" menu-item-label" >
11
11
{{ $t('marathon.menu.donate') }}
12
12
</span >
13
- </NuxtLink >
13
+ </ElementLink >
14
14
</li >
15
15
<li >
16
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/donations`) " >
16
+ <ElementLink :to =" `/marathon/${marathonId}/donations`" >
17
17
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'money-bill' ]" />
18
18
<span class =" menu-item-label" >
19
19
{{ $t('marathon.menu.donations') }}
20
20
</span >
21
- </NuxtLink >
21
+ </ElementLink >
22
22
</li >
23
23
<li >
24
- <NuxtLink :to =" localePath( `/marathon/${marathonId}/incentives`) " >
24
+ <ElementLink :to =" `/marathon/${marathonId}/incentives`" >
25
25
<FontAwesomeIcon class =" menu-item-icon" :icon =" [ 'fas', 'bullseye' ]" />
26
26
<span class =" menu-item-label" >
27
27
{{ $t('marathon.menu.incentives') }}
28
28
</span >
29
- </NuxtLink >
29
+ </ElementLink >
30
30
</li >
31
31
</ul >
32
32
</div >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <NuxtLink v-if =" shouldShowRedirectLink" :to =" localePath( `${$route.path}/v1`) " class =" button is-warning" >
2
+ <ElementLink v-if =" shouldShowRedirectLink" :to =" `${$route.path}/v1`" class =" button is-warning" >
3
3
{{ $t('footer.v1Link') }}
4
- </NuxtLink >
4
+ </ElementLink >
5
5
</template >
6
6
7
7
<script lang="ts">
Original file line number Diff line number Diff line change 13
13
<FontAwesomeIcon :icon =" [ 'fas', 'home' ]" />
14
14
<span >Oengus</span >
15
15
</a >
16
- <NuxtLink v-else class =" error-link" : to =" localePath('/') " >
16
+ <ElementLink v-else class =" error-link" to =" / " >
17
17
<FontAwesomeIcon :icon =" [ 'fas', 'home' ]" />
18
18
<span >Oengus</span >
19
- </NuxtLink >
19
+ </ElementLink >
20
20
</p >
21
21
22
22
<div class =" logo" >
You can’t perform that action at this time.
0 commit comments