Develop #8
@@ -73,7 +73,7 @@ export default {
|
|||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding: 0.55rem 0.75rem 0.35rem 0.75rem;
|
padding: 0.35rem 0.75rem;
|
||||||
margin-left: 0.75rem;
|
margin-left: 0.75rem;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
@@ -1,7 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h2><span @click="() => this.$router.back()">◀</span> Details</h2>
|
<h2><span @click="() => this.$router.push('/')">◀</span> Details</h2>
|
||||||
{{ this.fruit }}
|
<article>
|
||||||
|
<img :src="fruit.image" :alt="fruit.name" />
|
||||||
|
<section>
|
||||||
|
<h3>
|
||||||
|
{{ fruit.name }}
|
||||||
|
<span class="tag" :style="{ backgroundColor: fruit.color }">{{ fruit.taste }}</span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>{{ fruit.description }}</p>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<p class="price">{{ "$" + fruit.price }}</p>
|
||||||
|
{{ fruit.expires }}
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -15,4 +30,82 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style lang="less" scoped>
|
||||||
|
h2 span {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-flow: column;
|
||||||
|
|
||||||
|
img,
|
||||||
|
section {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
//max-height: 285px;
|
||||||
|
object-fit: scale-down;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 1.5rem 1rem;
|
||||||
|
background-color: @secondary-color;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-bottom: 0.55rem;
|
||||||
|
font-size: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100px;
|
||||||
|
color: #cece;
|
||||||
|
margin: 1.35rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
margin-left: 0.75rem;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
img,
|
||||||
|
section {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 485px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-height: 435px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-right: 1.5rem;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user