Skip to content

Commit 2b03d59

Browse files
committed
improve responsive behavior
1 parent caf1498 commit 2b03d59

6 files changed

Lines changed: 32 additions & 10 deletions

File tree

src/components/round/ActionBox.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
:class="{'instruction': hasInstruction, 'managedByApp': managedByApp}">
44
<slot name="action"></slot>
55
<div v-if="vp" class="vpGain">
6-
<span v-html="t('roundTurnBot.gainVP', {vp: vp})"></span><template v-if="xp">,
7-
<span v-html="t('roundTurnBot.gainXP')"/>
8-
<FlowerIcon v-for="flower in xp" :key="flower" :flower="flower" class="xpFlowerIcon"/></template>
6+
<span class="text-nowrap" v-html="t('roundTurnBot.gainVP', {vp: vp})"></span><template v-if="xp">,
7+
<span class="text-nowrap"><span v-html="t('roundTurnBot.gainXP')"/>
8+
<FlowerIcon v-for="flower in xp" :key="flower" :flower="flower" class="xpFlowerIcon"/></span></template>
99
</div>
1010
<div v-if="currentCard?.remove" class="remove"><AppIcon name="x" class="icon"/></div>
1111
</div>

src/components/round/PlayerMakeDelivery.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ export default defineComponent({
143143
<style lang="scss" scoped>
144144
.floor-windows {
145145
display: flex;
146-
flex-wrap: wrap;
147146
gap: 0.75rem;
148147
}
149148
.window-box {

src/components/round/SideBar.vue

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div v-for="price in marketPrices.prices" :key="price.flower" class="flowerPrice"
99
:data-bs-toggle="readOnly ? '' : 'modal'" data-bs-target="#marketPriceModal" :role="readOnly ? '' : 'button'"
1010
@click="openPriceEdit(price.flower, price.price)">
11-
<FlowerIcon :flower="price.flower"/>
11+
<FlowerIcon :flower="price.flower" class="flowerIcon"/>
1212
<div class="price buy">$<span class="value">{{price.price}}</span></div>
1313
<div class="price sell">$<span class="value">{{price.priceSell}}</span></div>
1414
</div>
@@ -154,10 +154,15 @@ export default defineComponent({
154154
hr {
155155
margin: 0.6rem 0;
156156
}
157+
@media (max-width: 600px) {
158+
font-size: 0.8rem;
159+
width: 110px;
160+
}
157161
}
158162
.flowerPrice {
159163
display: flex;
160164
gap: 0.5rem;
165+
align-items: center;
161166
margin-bottom: 0.25rem;
162167
.price {
163168
&.buy {
@@ -170,6 +175,11 @@ export default defineComponent({
170175
font-weight: bold;
171176
}
172177
}
178+
@media (max-width: 600px) {
179+
.flowerIcon {
180+
width: 1.5rem;
181+
}
182+
}
173183
}
174184
.numberInput {
175185
width: 4rem;
@@ -187,6 +197,9 @@ export default defineComponent({
187197
}
188198
.flowerIcon {
189199
width: 1.5rem;
200+
@media (max-width: 600px) {
201+
width: 1.3rem;
202+
}
190203
}
191204
}
192205
</style>

src/components/scoring/FinalAmounts.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
<td>
5555
<NumberInput v-model="amount.playerBillboardVP[floor-1]" :max="18"/>
5656
</td>
57-
<td v-for="player in billboardWonSelection" :key="player">
58-
<div class="form-check">
57+
<td class="wonBy">
58+
<div class="form-check" v-for="player in billboardWonSelection" :key="player">
5959
<label class="form-check-label">
6060
<input class="form-check-input" type="radio" :name="`billboardWonFloor${floor}`" v-model="amount.billboardsWon[floor-1]" :value="player">
61-
{{t(player ? `player.${player}` : 'endOfGameAmounts.billboards.tied')}}
61+
<span class="text-nowrap">{{t(player ? `player.${player}` : 'endOfGameAmounts.billboards.tied')}}</span>
6262
</label>
6363
</div>
6464
</td>
@@ -230,4 +230,13 @@ th {
230230
input[type=text] {
231231
width: 5rem;
232232
}
233+
td.wonBy {
234+
display: flex;
235+
flex-wrap: wrap;
236+
gap: 1rem;
237+
text-align: left;
238+
@media (max-width: 600px) {
239+
display: block;
240+
}
241+
}
233242
</style>

src/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"gainXP": "XP: "
8888
},
8989
"roundStart": {
90+
"title": "{season} Year {year}",
9091
"harvest": "Harvest your garden."
9192
},
9293
"endOfGameAmounts": {
@@ -132,7 +133,7 @@
132133
"fifthFloor": "Fifth Floor"
133134
},
134135
"sideBar": {
135-
"year": "Year {year}",
136+
"year": "Y{year}",
136137
"marketPrice": {
137138
"title": "Market Price",
138139
"decrease": "Decrease",

src/views/RoundStart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<SideBar :navigationState="navigationState" :readOnly="true"/>
3-
<h1>{{t(`season.${season}`)}} {{t('sideBar.year', {year})}}</h1>
3+
<h1>{{t('roundStart.title', {season: t(`season.${season}`), year})}}</h1>
44

55
<p class="mt-4 mb-5" v-html="t('roundStart.harvest')"></p>
66

0 commit comments

Comments
 (0)