More winners, wines and link to see all wines
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="highscores" v-if="highscore.length > 0">
|
<div class="highscores" v-if="highscore.length > 0">
|
||||||
<h3>Topp 5 vinnere</h3>
|
<h3>Topp 10 vinnere</h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="person in highscore">
|
<li v-for="person in highscore">
|
||||||
{{ person.name }} - {{ person.wins.length }}
|
{{ person.name }} - {{ person.wins.length }}
|
||||||
@@ -23,7 +23,7 @@ export default {
|
|||||||
response = response.filter(
|
response = response.filter(
|
||||||
person => person.name != null && person.name != ""
|
person => person.name != null && person.name != ""
|
||||||
);
|
);
|
||||||
this.highscore = response.slice(0, 5);
|
this.highscore = response.slice(0, 10);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="wines.length > 0">
|
<div v-if="wines.length > 0">
|
||||||
<h3>
|
<h3>
|
||||||
<router-link to="viner">Topp 5 viner</router-link>
|
<router-link to="viner"
|
||||||
|
>Topp 10 viner <span class="link">Se alle ></span></router-link
|
||||||
|
>
|
||||||
</h3>
|
</h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="wine in wines">
|
<li v-for="wine in wines">
|
||||||
@@ -17,13 +19,14 @@
|
|||||||
class="wine-link"
|
class="wine-link"
|
||||||
:href="wine.vivinoLink"
|
:href="wine.vivinoLink"
|
||||||
@click="wineClick(wine, $event)"
|
@click="wineClick(wine, $event)"
|
||||||
>Les mer</a>
|
>Les mer</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<div class="wine-window-outer" v-if="wineOpen" @click="closeWine">
|
<div class="wine-window-outer" v-if="wineOpen" @click="closeWine">
|
||||||
<div class="wine-window">
|
<div class="wine-window">
|
||||||
<div class="close-modal" @click="closeWine">X</div>
|
<div class="close-modal" @click="closeWine">X</div>
|
||||||
<Wine :wine="clickedWine" :fullscreen="true"/>
|
<Wine :wine="clickedWine" :fullscreen="true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -59,7 +62,7 @@ export default {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
this.wines = response.slice(0, 5);
|
this.wines = response.slice(0, 10);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
wineClick: function(wine, event) {
|
wineClick: function(wine, event) {
|
||||||
@@ -179,6 +182,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: 1px solid #ff5fff;
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.close-modal {
|
.close-modal {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user