added template for gamemodes block in mobile-home

This commit is contained in:
Kostya
2023-11-27 18:03:32 +03:00
parent 74f50014ac
commit cc2914380d
2 changed files with 47 additions and 5 deletions

View File

@@ -17,14 +17,13 @@
border-radius: 20px;
background: #17181C;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
height: 45%;
height: 55%;
}
.main-mobile {
grid-area: main-mobile;
width: 100%;
height: 100%;
background: #983838;
}
.footer-mobile {
@@ -94,7 +93,7 @@
/* Main */
.main-mobile {
margin-top: 40%;
margin-top: 30%;
}
.main-mobile__content {
@@ -102,4 +101,23 @@
justify-content: center;
}
.bg-mobile {
border-radius: 10px;
background: #EF4444;
box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
width: 150px;
height: 105px;
}
.card-mobile__content {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
}
.card-first {
margin-left: 10px;
}
/* /Main */

View File

@@ -20,7 +20,17 @@
</header>
<main class="main-mobile">
<div class="main-mobile__content">
<div class="main-mobile__first-line" v-for="mode in firstlineGameMode" :key="mode">
<div class="card-mobile__content bg-mobile card-first">
<h2>{{ mode.title }}</h2>
<div class="card-mobile__btn">
<a href="#">Play ></a>
</div>
</div>
</div>
<div class="main-mobile__two-line" v-for="mode in twolineGameMode" :key="mode">
<h1>1</h1>
</div>
</div>
</main>
<footer class="footer-mobile">
@@ -31,9 +41,23 @@
<script>
import '@/assets/css/PagesStyles/adaptive-pages/homemobile.css'
import '@/mocks/GameModes'
import GameModes from "@/mocks/GameModes";
export default {
data() {
return {
GameModes
}
},
computed: {
firstlineGameMode() {
return this.GameModes.filter(mode => [1, 2].includes(mode.id))
},
twolineGameMode() {
return this.GameModes.filter(mode => [3, 4].includes(mode.id))
}
}
}
</script>