Skip to content

Commit 76d187c

Browse files
committed
feat: fix mobile
1 parent a11ecec commit 76d187c

File tree

4 files changed

+180
-114
lines changed

4 files changed

+180
-114
lines changed

assets/data/health.json

-18
Original file line numberDiff line numberDiff line change
@@ -418,18 +418,6 @@
418418
},
419419
"name": "Вечная жажда сладкого"
420420
},
421-
{
422-
"_id": {
423-
"$oid": "6770a630314eefb30a2193f2"
424-
},
425-
"name": "Длительное использование стикеров"
426-
},
427-
{
428-
"_id": {
429-
"$oid": "6770a630314eefb30a2193f3"
430-
},
431-
"name": "Многоразовый синдром потери зарядки"
432-
},
433421
{
434422
"_id": {
435423
"$oid": "6770a630314eefb30a2193f4"
@@ -448,12 +436,6 @@
448436
},
449437
"name": "Неспособность сказать «нет»"
450438
},
451-
{
452-
"_id": {
453-
"$oid": "6770a630314eefb30a2193f7"
454-
},
455-
"name": "Взрыв мозга от трекинга лайков"
456-
},
457439
{
458440
"_id": {
459441
"$oid": "6770a630314eefb30a2193f8"

pages/modules/[module]/[id].vue

+52-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
<div>
33
<h1 class='title'><el-button plain @click="open">Бункер</el-button><el-button plain @click="refreshData">Обновить данные</el-button></h1>
44
<client-only>
5-
<el-carousel ref="carusel" type="card" height="80vh" :autoplay="false" @change="changeRoute">
5+
<el-carousel ref="carusel" height="80vh" :autoplay="false" @change="changeRoute">
66
<el-carousel-item v-for="item in sections" :key="item">
77
<div class="card">
8+
<el-button style="position: absolute;right: 30px;top: 5px;">
9+
x
10+
</el-button>
811
<h3>Игрок: {{ item.player }} <strong><span v-if="item.player === lastSegment || item.profession.visible ">{{ item.profession.name }}</span>
912
<el-button
1013
v-if="item.player === lastSegment && !item.profession.visible"
@@ -250,7 +253,7 @@
250253
Заменить
251254
</el-button>
252255
</li>
253-
<li><strong>Здорровье:</strong> <span v-if="item.player === lastSegment || item.health.visible">{{ item.health.name }}</span>
256+
<li><strong>Здоровье:</strong> <span v-if="item.player === lastSegment || item.health.visible">{{ item.health.name }}</span>
254257
<el-button
255258
v-if="item.player === lastSegment && !item.health.visible"
256259
@click="changeVisible('health', item)"
@@ -1239,19 +1242,22 @@ const open = () => {
12391242
.el-container {
12401243
background: #07184F;
12411244
}
1242-
</style>
1243-
<style scoped>
1245+
12441246
.title {
12451247
text-align: center;
12461248
color: #8092CE;
1249+
font-size: 20px;
1250+
padding: 10px;
12471251
}
1252+
12481253
.el-carousel__item h3 {
12491254
color: #475669;
12501255
opacity: 0.75;
12511256
font-size: 20px;
12521257
margin: 0;
12531258
text-align: center;
12541259
}
1260+
12551261
.el-carousel__item:nth-child(2n) {
12561262
background-color: #99a9bf;
12571263
border-radius: 8px;
@@ -1263,6 +1269,7 @@ const open = () => {
12631269
border-radius: 8px;
12641270
min-width: 230px;
12651271
}
1272+
12661273
.card {
12671274
border-radius: 8px;
12681275
padding: 20px;
@@ -1291,4 +1298,45 @@ const open = () => {
12911298
.card li strong {
12921299
color: #2f3e70;
12931300
}
1301+
1302+
/* Медиазапросы для мобильных устройств */
1303+
@media (max-width: 768px) {
1304+
.title {
1305+
font-size: 18px;
1306+
padding: 5px;
1307+
}
1308+
1309+
.el-carousel__item {
1310+
min-width: 100%; /* Для слайдов на мобильных */
1311+
}
1312+
1313+
.card {
1314+
padding: 15px;
1315+
}
1316+
1317+
.card h3 {
1318+
font-size: 16px;
1319+
}
1320+
1321+
.card li {
1322+
font-size: 14px;
1323+
}
1324+
1325+
.card .el-button {
1326+
font-size: 12px; /* Уменьшаем размер кнопок для мобильных */
1327+
padding: 6px 12px;
1328+
}
1329+
1330+
.card .el-button + .el-button {
1331+
margin-top: 5px;
1332+
}
1333+
1334+
.el-carousel__item h3 {
1335+
font-size: 18px;
1336+
}
1337+
1338+
.el-carousel {
1339+
height: 90vh; /* Уменьшаем высоту карусели */
1340+
}
1341+
}
12941342
</style>

0 commit comments

Comments
 (0)