Skip to content

Commit

Permalink
Improve responsive behavior (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert authored Dec 29, 2024
1 parent fa0aff9 commit a6a552d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/components/round/SideBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<div class="sidebar">
<span class="fw-bold">{{t('sideBar.round', {round})}}</span><br/>
<span class="small fst-italic">{{t(`age.${round}`)}}</span>
<div>
<span class="fw-bold">{{t('sideBar.round', {round})}}</span><br/>
<span class="small fst-italic">{{t(`age.${round}`)}}</span>
</div>

<div class="prosperityCard" v-for="(techs,index) in navigationState.prosperityCards.current" :key="index">
<div class="cardTop">
Expand Down Expand Up @@ -130,8 +132,20 @@ export default defineComponent({
width: 30px;
}
@media (max-width: 600px) {
float: none;
display: flex;
gap: 5px;
justify-content: space-evenly;
align-items: center;
border-top-left-radius: 0;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
margin-top: -15px;
margin-left: 0px;
margin-right: 0px;
padding: 5px 5px 10px 5px;
width: 100%;
font-size: 0.8rem;
width: 120px;
.prosperityCard {
width: 80px;
.cardTop {
Expand Down
3 changes: 3 additions & 0 deletions src/components/round/TechCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export default defineComponent({
> .icon {
width: 75px;
margin-top: 10px;
@media (max-width: 600px) {
width: 65px;
}
}
.prosperity {
position: absolute;
Expand Down
23 changes: 23 additions & 0 deletions src/components/round/TechCardDraft.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ export default defineComponent({
.number {
bottom: 97px;
}
@media (max-width: 600px) {
.icon {
bottom: 65px;
}
.number {
bottom: 82px;
}
}
}
.income2 {
margin-left: -40px;
Expand All @@ -275,6 +283,17 @@ export default defineComponent({
.number {
bottom: 27px;
}
@media (max-width: 600px) {
.icon {
bottom: 0px;
}
.number {
bottom: 17px;
}
}
}
@media (max-width: 600px) {
width: calc(4 * (70px + 10px) + 40px);
}
}
.techCard {
Expand All @@ -284,5 +303,9 @@ export default defineComponent({
height: 120px;
margin-right: 10px;
margin-bottom: 10px;
@media (max-width: 600px) {
width: 70px;
height: 100px;
}
}
</style>

0 comments on commit a6a552d

Please sign in to comment.