inlineSlot prop to have slot content displayed under other content on right side of wine image. For mobile components should width: 100% to expand out of this area for more explicit formatting.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container" >
|
||||||
<div class="inner-wine-container" :class="{ 'big': fullscreen }">
|
<div class="wine-container" :class="{ 'big': fullscreen }">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<img v-if="wine.image" :src="wine.image" class="wine-image" :class="{ 'fullscreen': fullscreen }" />
|
<img v-if="wine.image" :src="wine.image" class="wine-image" :class="{ 'fullscreen': fullscreen }" />
|
||||||
<img v-else class="wine-placeholder" alt="Wine image" />
|
<img v-else class="wine-placeholder" alt="Wine image" />
|
||||||
@@ -13,9 +13,11 @@
|
|||||||
|
|
||||||
<a v-if="wine.vivinoLink" :href="wine.vivinoLink" class="wine-link">Les mer</a>
|
<a v-if="wine.vivinoLink" :href="wine.vivinoLink" class="wine-link">Les mer</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<slot></slot>
|
<slot v-if="inlineSlot"></slot>
|
||||||
|
</div>
|
||||||
|
<slot v-if="!inlineSlot"></slot>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -29,6 +31,11 @@ export default {
|
|||||||
fullscreen: {
|
fullscreen: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
inlineSlot: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -71,11 +78,9 @@ h2 {
|
|||||||
|
|
||||||
.container {
|
.container {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
|
||||||
|
|
||||||
.inner-wine-container {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
@@ -84,21 +89,35 @@ h2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@include desktop {
|
@include desktop {
|
||||||
max-width: 600px;
|
max-width: 550px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wine-container {
|
||||||
|
width: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: row;
|
||||||
|
// flex-wrap: wrap;
|
||||||
|
|
||||||
|
>* {
|
||||||
|
// flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
float: left;
|
||||||
|
margin-right: 3rem;
|
||||||
|
|
||||||
|
@include mobile {
|
||||||
|
margin-right: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 150px;
|
height: max-content;
|
||||||
margin-left: 50px;
|
margin-bottom: 2rem;
|
||||||
|
|
||||||
@include mobile {
|
|
||||||
margin-left: 2rem;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a,
|
a,
|
||||||
|
|||||||
Reference in New Issue
Block a user