Increased height to 30vh & added expand/collapse icon on hover

This commit is contained in:
2022-03-04 18:13:43 +01:00
parent 86efb04eb8
commit ca4d87b315

View File

@@ -1,16 +1,29 @@
<template> <template>
<header v-bind:style="{ 'background-image': 'url(' + imageFile + ')' }"> <header
:class="{ expanded, noselect: true }"
v-bind:style="{ 'background-image': 'url(' + imageFile + ')' }"
@click="expanded = !expanded"
>
<div class="container"> <div class="container">
<h1 class="title">Request movies or tv shows</h1> <h1 class="title">Request movies or tv shows</h1>
<strong class="subtitle" <strong class="subtitle"
>Create a profile to track and view requests</strong >Create a profile to track and view requests</strong
> >
</div> </div>
<div class="expand-icon">
<IconExpand v-if="!expanded" />
<IconShrink v-else />
</div>
</header> </header>
</template> </template>
<script> <script>
import IconExpand from "../icons/IconExpand.vue";
import IconShrink from "../icons/IconShrink.vue";
export default { export default {
components: { IconExpand, IconShrink },
props: { props: {
image: { image: {
type: String, type: String,
@@ -25,7 +38,8 @@ export default {
"dune.jpg", "dune.jpg",
"mandalorian.jpg" "mandalorian.jpg"
], ],
imageFile: undefined imageFile: undefined,
expanded: false
}; };
}, },
beforeMount() { beforeMount() {
@@ -46,7 +60,7 @@ export default {
header { header {
width: 100%; width: 100%;
height: 200px; height: 30vh;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -55,8 +69,29 @@ header {
background-position: 50% 50%; background-position: 50% 50%;
position: relative; position: relative;
@include tablet-min { &.expanded {
height: 284px; height: calc(100vh - var(--header-size));
width: calc(100vw - var(--header-size));
}
.expand-icon {
visibility: hidden;
opacity: 0;
transition: all 0.5s ease-in-out;
height: 1.8rem;
width: 1.8rem;
fill: var(--text-color-50);
position: absolute;
top: 0.5rem;
right: 1rem;
}
&:hover {
.expand-icon {
visibility: visible;
opacity: 1;
}
} }
&:before { &:before {