Wine has bottom slot where components or ui elements can be injected.
This commit is contained in:
@@ -1,24 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="inner-wine-container" :class="{ 'big': fullscreen }">
|
<div class="container">
|
||||||
<div class="left">
|
<div class="inner-wine-container" :class="{ 'big': fullscreen }">
|
||||||
<img :src="wine.image" class="wine-image" :class="{ 'fullscreen': fullscreen }" />
|
<div class="left">
|
||||||
</div>
|
<img v-if="wine.image" :src="wine.image" class="wine-image" :class="{ 'fullscreen': fullscreen }" />
|
||||||
<div class="right">
|
<img v-else class="wine-placeholder" alt="Wine image" />
|
||||||
<h2>{{ wine.name }}</h2>
|
</div>
|
||||||
<span v-if="wine.rating">{{ wine.rating }} rating</span>
|
<div class="right">
|
||||||
|
<h2 v-if="wine.name">{{ wine.name }}</h2><h2 v-else>(no name)</h2>
|
||||||
|
<span v-if="wine.rating">{{ wine.rating }} rating</span>
|
||||||
|
<span v-if="wine.price">{{ wine.price }} NOK</span>
|
||||||
|
<span v-if="wine.country">{{ wine.country }}</span>
|
||||||
|
|
||||||
<a :href="wine.vivinoLink" class="wine-link">Les mer</a>
|
<a v-if="wine.vivinoLink" :href="wine.vivinoLink" class="wine-link">Les mer</a>
|
||||||
<span class="name-wins" v-if="wine.winners">
|
<span class="name-wins" v-if="wine.winners">
|
||||||
Vunnet av:
|
Vunnet av:
|
||||||
{{wine.winners.join(", ")}}
|
{{wine.winners.join(", ")}}
|
||||||
</span>
|
</span>
|
||||||
<div class="color-wins" :class="{ 'big': fullscreen }">
|
<div class="color-wins" :class="{ 'big': fullscreen }"
|
||||||
<span class="color-win blue">{{wine.blue == undefined ? 0 : wine.blue}}</span>
|
v-if="wine.blue || wine.red || wine.green || wine.yellow">
|
||||||
<span class="color-win red">{{wine.red == undefined ? 0 : wine.red}}</span>
|
<span class="color-win blue">{{wine.blue == undefined ? 0 : wine.blue}}</span>
|
||||||
<span class="color-win green">{{wine.green == undefined ? 0 : wine.green}}</span>
|
<span class="color-win red">{{wine.red == undefined ? 0 : wine.red}}</span>
|
||||||
<span class="color-win yellow">{{wine.yellow == undefined ? 0 : wine.yellow}}</span>
|
<span class="color-win green">{{wine.green == undefined ? 0 : wine.green}}</span>
|
||||||
|
<span class="color-win yellow">{{wine.yellow == undefined ? 0 : wine.yellow}}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,6 +47,8 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./src/styles/media-queries";
|
@import "./src/styles/media-queries";
|
||||||
|
@import "./src/styles/variables";
|
||||||
|
|
||||||
.wine-image {
|
.wine-image {
|
||||||
height: 250px;
|
height: 250px;
|
||||||
|
|
||||||
@@ -49,6 +59,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.wine-placeholder {
|
||||||
|
height: 250px;
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
.name-wins,
|
.name-wins,
|
||||||
.color-wins {
|
.color-wins {
|
||||||
@@ -109,26 +123,26 @@ h3 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.inner-wine-container {
|
.inner-wine-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
width: 500px;
|
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
margin-bottom: 30px;
|
width: 100%;
|
||||||
|
|
||||||
&.big {
|
&.big {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include desktop {
|
@include desktop {
|
||||||
justify-content: center;
|
max-width: 600px;
|
||||||
}
|
|
||||||
|
|
||||||
@include mobile {
|
|
||||||
width: auto;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -159,4 +173,11 @@ a:visited {
|
|||||||
border-bottom: 1px solid #ff5fff;
|
border-bottom: 1px solid #ff5fff;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-container {
|
||||||
|
& button.red {
|
||||||
|
background-color: $light-red;
|
||||||
|
color: $red;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user