LeagueStats/client/src/views/Home.vue

70 lines
1.4 KiB
Vue
Raw Normal View History

2019-03-30 22:55:48 +00:00
<template>
2019-04-10 20:05:52 +00:00
<div class="homepage h-screen flex flex-col items-center justify-center">
2019-03-30 22:55:48 +00:00
2019-04-16 12:28:42 +00:00
<div class="absolute top-0 right-0">
<div class="line line-top relative mr-4 mt-4 w-20 h-2"></div>
</div>
<div class="absolute bottom-0 left-0">
<div class="line line-bottom relative ml-4 mb-4 w-20 h-2"></div>
</div>
2019-04-10 20:05:52 +00:00
<div class="relative flex flex-col items-center w-full max-w-lg">
2019-04-16 12:28:42 +00:00
<img class="absolute logo" src="@/assets/Logo.svg" alt="logo">
2019-04-10 20:05:52 +00:00
<SearchForm @formSubmit="redirect"/>
</div>
2019-04-08 20:06:22 +00:00
2019-03-30 22:55:48 +00:00
</div>
</template>
<script>
2019-04-08 20:06:22 +00:00
import SearchForm from '@/components/SearchForm.vue';
2019-03-30 22:55:48 +00:00
export default {
2019-04-08 20:06:22 +00:00
components: {
SearchForm
2019-03-30 22:55:48 +00:00
},
methods: {
2019-04-08 20:06:22 +00:00
redirect(summoner, region) {
this.$router.push(`/summoner/${region}/${summoner}`)
},
2019-03-30 22:55:48 +00:00
}
};
</script>
2019-04-10 20:05:52 +00:00
<style scoped>
.homepage {
background-image: url("../assets/bg-homepage-1.jpg");
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
2019-04-16 12:28:42 +00:00
.line {
background: rgba(178, 245, 234, .55);
}
.line::after {
content: '';
position: absolute;
width: 4.5rem;
height: .5rem;
background: rgba(178, 245, 234, .55);
}
.line-top::after {
transform-origin: bottom right;
transform: rotate(90deg) translateX(100%);
}
.line-bottom::after {
transform-origin: top left;
transform: rotate(90deg) translateX(-100%);
margin-left: .5rem;
}
2019-04-10 20:05:52 +00:00
.logo {
top: -160px;
}
</style>