mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
Starting designing homepage
This commit is contained in:
parent
723a7d2c63
commit
73472b5603
11 changed files with 116 additions and 49 deletions
|
|
@ -1,11 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app" class="font-sans bg-gray-200">
|
<div id="app" class="font-sans bg-gray-200">
|
||||||
<div class="nav">
|
|
||||||
|
|
||||||
|
<!-- <div class="nav">
|
||||||
<router-link to="/">Accueil</router-link> |
|
<router-link to="/">Accueil</router-link> |
|
||||||
<router-link :to="`/summoner/euw/${summoner}`">
|
<router-link :to="`/summoner/euw/${summoner}`">
|
||||||
{{ linkText }}
|
{{ linkText }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<router-view/>
|
<router-view/>
|
||||||
|
|
||||||
|
|
|
||||||
8
client/src/assets/Logo.svg
Normal file
8
client/src/assets/Logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
BIN
client/src/assets/bg-homepage-1.jpg
Normal file
BIN
client/src/assets/bg-homepage-1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 672 KiB |
1
client/src/assets/css/base.css
Normal file
1
client/src/assets/css/base.css
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
@import url('https://fonts.googleapis.com/css?family=Lato:300,400,700,900');
|
||||||
25
client/src/assets/css/form.css
Normal file
25
client/src/assets/css/form.css
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
button:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical-center {
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.horizontal-center {
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
border: 4px solid rgba(129, 230, 217, .7);
|
||||||
|
background: rgba(40, 94, 97, .35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input:focus,
|
||||||
|
.btn:hover {
|
||||||
|
background: rgba(40, 94, 97, .75);
|
||||||
|
border-color: rgba(129, 230, 217, .9);
|
||||||
|
}
|
||||||
3
client/src/assets/css/main.css
Normal file
3
client/src/assets/css/main.css
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
@import 'tailwind.css';
|
||||||
|
@import 'base.css';
|
||||||
|
@import 'form.css';
|
||||||
|
|
@ -1,42 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<form @submit.prevent="formSubmit" class="flex">
|
<form @submit.prevent="formSubmit" class="flex text-teal-100 text-lg w-full">
|
||||||
<div class="relative">
|
<div class="relative w-full">
|
||||||
<v-icon name="search" class="absolute ml-2 vertical-center"></v-icon>
|
<!-- <v-icon name="search" class="absolute ml-2 vertical-center"></v-icon> -->
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Entre un pseudo."
|
autofocus
|
||||||
class="bg-gray-300 p-2 rounded-l outline-none focus:bg-gray-400 pl-8 pr-16"
|
class="input w-full px-2 py-4 rounded-lg outline-none pl-8 pr-16 font-bold"
|
||||||
v-model="summoner"
|
v-model="summoner"
|
||||||
>
|
>
|
||||||
<div class="absolute right-0 vertical-center flex items-center h-full mr-1">
|
<div class="absolute right-0 vertical-center flex items-center h-full mr-2">
|
||||||
<div
|
<div
|
||||||
@click="dropdown = !dropdown"
|
@click="dropdown = !dropdown"
|
||||||
class="cursor-pointer flex items-center px-2 py-1 rounded-lg hover:bg-gray-200"
|
class="cursor-pointer flex items-center px-2 py-1 rounded-lg hover:bg-teal-700"
|
||||||
>
|
>
|
||||||
<span class="selected">{{ selectedRegion }}</span>
|
<span class="selected font-bold">{{ selectedRegion }}</span>
|
||||||
<v-icon name="caret-down" class="ml-1"></v-icon>
|
<v-icon name="caret-down" class="ml-1"></v-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<transition name="bounce">
|
||||||
<div
|
<div
|
||||||
v-if="dropdown"
|
v-if="dropdown"
|
||||||
@click="dropdown = !dropdown"
|
@click="dropdown = !dropdown"
|
||||||
class="absolute right-0 text-white rounded-b-lg shadow cursor-pointer"
|
class="absolute right-0 text-white rounded-b-lg shadow cursor-pointer mr-2"
|
||||||
>
|
|
||||||
<div
|
|
||||||
v-for="(region, index) in regions"
|
|
||||||
:key="region"
|
|
||||||
@click="selectedRegion = region"
|
|
||||||
class="px-4 py-1 text-sm bg-teal-500 hover:bg-teal-400"
|
|
||||||
:class="classRegions(index)"
|
|
||||||
>
|
>
|
||||||
{{ region }}
|
<div
|
||||||
|
v-for="(region, index) in regions"
|
||||||
|
:key="region"
|
||||||
|
@click="selectedRegion = region"
|
||||||
|
class="px-4 py-1 text-sm bg-teal-600 hover:bg-teal-500"
|
||||||
|
:class="classRegions(index)"
|
||||||
|
>
|
||||||
|
{{ region }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</transition>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="bg-teal-500 p-2 text-white rounded-r hover:bg-teal-400" type="submit">Rechercher</button>
|
<button class="input btn w-20 rounded-lg ml-2 relative" type="submit">
|
||||||
|
<v-icon name="search" class="absolute vertical-center horizontal-center"></v-icon>
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -69,8 +72,23 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.vertical-center {
|
.bounce-enter-active {
|
||||||
top: 50%;
|
animation: bounce-in .5s;
|
||||||
transform: translateY(-50%);
|
}
|
||||||
|
|
||||||
|
.bounce-leave-active {
|
||||||
|
animation: bounce-in .5s reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes bounce-in {
|
||||||
|
0% {
|
||||||
|
transform: scale(0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.25);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import axios from 'axios'
|
||||||
import VueAxios from 'vue-axios'
|
import VueAxios from 'vue-axios'
|
||||||
import DotLoader from 'vue-spinner/src/DotLoader.vue'
|
import DotLoader from 'vue-spinner/src/DotLoader.vue'
|
||||||
|
|
||||||
import '@/assets/css/tailwind.css'
|
import '@/assets/css/main.css'
|
||||||
import 'vue-awesome/icons'
|
import 'vue-awesome/icons'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="h-screen flex flex-col items-center justify-center">
|
<div class="homepage h-screen flex flex-col items-center justify-center">
|
||||||
<h1>Home page test</h1>
|
|
||||||
|
|
||||||
<SearchForm @formSubmit="redirect"/>
|
<div class="relative flex flex-col items-center w-full max-w-lg">
|
||||||
|
<div class="absolute logo">
|
||||||
|
<img src="@/assets/Logo.svg" alt="logo">
|
||||||
|
</div>
|
||||||
|
<SearchForm @formSubmit="redirect"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -21,3 +25,16 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.homepage {
|
||||||
|
background-image: url("../assets/bg-homepage-1.jpg");
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
top: -160px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,27 @@
|
||||||
<div>
|
<div>
|
||||||
<button class="debug" @click="resetLocalStorage"></button>
|
<button class="debug" @click="resetLocalStorage"></button>
|
||||||
|
|
||||||
<div class="search mb-4">
|
<header class="search mb-4 bg-teal-900 text-teal-100">
|
||||||
<div class="container mx-auto">
|
<div class="container mx-auto flex justify-between py-8">
|
||||||
|
|
||||||
|
<router-link to="/" class="flex items-center text-lg text-teal-100 mr-8 hover:text-teal-200">Accueil</router-link>
|
||||||
|
|
||||||
<SearchForm @formSubmit="redirect"/>
|
<SearchForm @formSubmit="redirect"/>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
v-if="summonerFound"
|
v-if="summonerFound"
|
||||||
id="refresh"
|
id="refresh"
|
||||||
class="block bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 px-4 border border-gray-400 rounded shadow ml-2"
|
class="input btn w-20 rounded-lg ml-2 relative"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
@click="apiCall"
|
@click="apiCall"
|
||||||
>
|
>
|
||||||
<v-icon name="sync"/>
|
<v-icon name="sync" class="absolute vertical-center horizontal-center"/>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</header>
|
||||||
|
|
||||||
<template v-if="summonerFound && !loading">
|
<template v-if="summonerFound && !loading">
|
||||||
<div class="container mx-auto pb-16">
|
<div class="container mx-auto pb-16">
|
||||||
|
|
@ -264,18 +268,6 @@ export default {
|
||||||
background: #ef5753;
|
background: #ef5753;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
|
||||||
background: #4dc0b5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search .container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-around;
|
|
||||||
|
|
||||||
padding: 32px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.player {
|
.player {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 16px auto 0;
|
margin: 16px auto 0;
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: [
|
sans: [
|
||||||
|
'Lato',
|
||||||
'-apple-system',
|
'-apple-system',
|
||||||
'BlinkMacSystemFont',
|
'BlinkMacSystemFont',
|
||||||
'"Segoe UI"',
|
'"Segoe UI"',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue