96 lines
1.8 KiB
Vue
96 lines
1.8 KiB
Vue
<template>
|
|
<div class="product-box">
|
|
<div class="header">
|
|
<div class="kind-image">
|
|
<img :src="$helper.getImage(product.kind.image)" />
|
|
</div>
|
|
<div>
|
|
<h2>{{ $t(product.name) }}</h2>
|
|
<h3>{{ $t(product.farm) }} • {{ $t(product.strain) }}</h3>
|
|
</div>
|
|
<div class="shopping-cart">
|
|
<a :href="product.url" target="_blank"><img src="@images/shoppingcart.svg"></a>
|
|
</div>
|
|
</div>
|
|
<div class="product-box-image">
|
|
<img :src="$helper.getImage(product.images[0])" alt="" />
|
|
</div>
|
|
<div class="footer">
|
|
<product-table :product="product"></product-table>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProductTable from "./ProductTable.vue";
|
|
export default {
|
|
props: {
|
|
product: Object,
|
|
},
|
|
components: {
|
|
ProductTable,
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.shopping-cart {
|
|
img {
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
.product-box {
|
|
width: 330px;
|
|
height: 450px;
|
|
border-radius: 12px;
|
|
background-position: top left;
|
|
box-sizing: border-box;
|
|
color: #141218;
|
|
padding: 0 px 0;
|
|
|
|
.header {
|
|
background-color: #1f1f1f;
|
|
border-top-left-radius: 12px;
|
|
border-top-right-radius: 12px;
|
|
color: #c1c1a1;
|
|
padding: 12px 16px;
|
|
align-items: center;
|
|
align-self: stretch;
|
|
width: 100%;
|
|
display: grid;
|
|
grid-template-columns: 40px auto 30px;
|
|
|
|
.kind-image {
|
|
align-self: start;
|
|
img {
|
|
width: 40px;
|
|
}
|
|
}
|
|
|
|
h2 {
|
|
padding: 0px;
|
|
font-weight: 500;
|
|
font-size: 20px;
|
|
text-align: left;
|
|
line-height: 32px;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
&-image {
|
|
width: 330px;
|
|
height: 250px;
|
|
|
|
img {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
</style> |