Skip to content

Commit 7871aeb

Browse files
authored
Merge pull request #2847 from Brain-up/fix/mobile-responsiveness
Fix mobile responsiveness across all pages
2 parents baa2274 + d21569e commit 7871aeb

23 files changed

Lines changed: 80 additions & 33 deletions

File tree

frontend/app/components/audiometry/test-player/index.gts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ export default class AudiometryTestPlayerComponent extends Component<AudiometryT
724724
{{t "audiometry.replay"}}
725725
</button>
726726

727-
<div class="grid grid-cols-3 gap-3 max-w-md mx-auto">
727+
<div class="grid grid-cols-2 sm:grid-cols-3 gap-3 max-w-md mx-auto">
728728
{{#each this.speechDisplayWords as |option|}}
729729
<button
730730
data-test-speech-word

frontend/app/components/exercise-type/index.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
flex-direction: column;
1212
overflow: hidden;
1313
position: relative;
14-
width: 410px;
14+
max-width: 410px;
15+
width: 100%;
1516
}
1617

1718
.card-img {
@@ -29,7 +30,8 @@
2930

3031
@media (max-width: 640px) {
3132
.c-exercise-type .card {
32-
width: 220px;
33+
max-width: 220px;
34+
width: 100%;
3335
}
3436
}
3537

frontend/app/components/footer/index.gts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { t } from 'ember-intl';
2424
</span>
2525
</div>
2626
<div>
27-
<ul class="c-footer__sponsors min-width-10 flex items-center">
27+
<ul class="c-footer__sponsors min-w-10 flex flex-wrap items-center">
2828
<li data-test-support-logo>
2929
<a href="https://www.jetbrains.com/" target="blank" rel="noopener">
3030
<img src="/logos/jetbrains-variant-4_.png" alt="JetBrains" />

frontend/app/components/header/index.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,20 @@
9595
display: block;
9696
min-width: 100px;
9797
padding: 6px 20px;
98-
white-space: nowrap;
98+
}
99+
100+
.dropdown a[target="_blank"] {
101+
position: relative;
102+
padding-right: 30px;
103+
}
104+
105+
.dropdown a[target="_blank"] .external-icon {
106+
position: absolute;
107+
top: 4px;
108+
right: 8px;
109+
width: 12px;
110+
height: 12px;
111+
opacity: 0.6;
99112
}
100113

101114
.dropdown a:hover {

frontend/app/components/header/index.gts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ import XpBadge from 'brn/components/xp-badge';
1919
import StreakCounter from 'brn/components/streak-counter';
2020
import GamificationService from 'brn/services/gamification';
2121

22+
const ExternalLinkIcon = <template>
23+
<svg class="external-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
24+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
25+
<polyline points="15 3 21 3 21 9" />
26+
<line x1="10" y1="14" x2="21" y2="3" />
27+
</svg>
28+
</template>;
29+
2230
export default class HeaderComponent extends Component {
2331
@service('session') session!: Session;
2432
@service('user-data') userData!: UserDataService;
@@ -118,13 +126,13 @@ export default class HeaderComponent extends Component {
118126
<span class="md:inline-flex md:px-2 items-center shrink-0 hidden font-semibold tracking-wider text-white uppercase">
119127
<button
120128
type="button"
121-
class="btn-press hover:text-white/50 py-2 text-white bg-transparent rounded uppercase {{if (eq this.activeLocale 'ru-ru') 'font-bold'}}"
129+
class="btn-press hover:text-white/50 min-h-[44px] min-w-[44px] py-2 text-white bg-transparent rounded uppercase {{if (eq this.activeLocale 'ru-ru') 'font-bold'}}"
122130
{{on "click" (fn this.setLocale "ru")}}
123131
>RU</button>
124132
<span class="mx-1">/</span>
125133
<button
126134
type="button"
127-
class="btn-press hover:text-white/50 py-2 text-white bg-transparent rounded uppercase {{if (eq this.activeLocale 'en-us') 'font-bold'}}"
135+
class="btn-press hover:text-white/50 min-h-[44px] min-w-[44px] py-2 text-white bg-transparent rounded uppercase {{if (eq this.activeLocale 'en-us') 'font-bold'}}"
128136
{{on "click" (fn this.setLocale "en")}}
129137
>EN</button>
130138
</span>
@@ -151,9 +159,9 @@ export default class HeaderComponent extends Component {
151159
>EN</button>
152160
</div>
153161
<LinkTo class="lg:hidden" @route="description" {{on "click" this.closeMenu}}>{{t "header.about"}}</LinkTo>
154-
<a class="xl:hidden" target="_blank" href="https://t.me/BrainUpUsers" rel="noopener noreferrer" {{on "click" this.closeMenu}}>Telegram</a>
155-
<a target="_blank" href="https://opencollective.com/brainup" rel="noopener noreferrer">{{t "header.donate"}}</a>
156-
<a target="_blank" href="https://github.com/Brain-up/brn" rel="noopener noreferrer">{{t "header.github"}}</a>
162+
<a class="xl:hidden" target="_blank" href="https://t.me/BrainUpUsers" rel="noopener noreferrer" {{on "click" this.closeMenu}}>Telegram<ExternalLinkIcon /></a>
163+
<a target="_blank" href="https://opencollective.com/brainup" rel="noopener noreferrer">{{t "header.donate"}}<ExternalLinkIcon /></a>
164+
<a target="_blank" href="https://github.com/Brain-up/brn" rel="noopener noreferrer">{{t "header.github"}}<ExternalLinkIcon /></a>
157165
<LinkTo @route="contact" {{on "click" this.closeMenu}}>{{t "header.contact"}}</LinkTo>
158166
<LinkTo @route="specialists" {{on "click" this.closeMenu}}>{{t "header.specialists"}}</LinkTo>
159167
<LinkTo @route="contributors" {{on "click" this.closeMenu}}>{{t "header.contributors"}}</LinkTo>
@@ -251,8 +259,8 @@ export default class HeaderComponent extends Component {
251259
>{{t "header.more"}}</button>
252260
<input type="checkbox" />
253261
<div class="sm:text-base bottom absolute z-20 py-2 text-xs rounded">
254-
<a target="_blank" href="https://opencollective.com/brainup" rel="noopener noreferrer">{{t "header.donate"}}</a>
255-
<a target="_blank" href="https://github.com/Brain-up/brn" rel="noopener noreferrer">{{t "header.github"}}</a>
262+
<a target="_blank" href="https://opencollective.com/brainup" rel="noopener noreferrer">{{t "header.donate"}}<ExternalLinkIcon /></a>
263+
<a target="_blank" href="https://github.com/Brain-up/brn" rel="noopener noreferrer">{{t "header.github"}}<ExternalLinkIcon /></a>
256264
<LinkTo @route="contact" {{on "click" this.closeMenu}}>{{t "header.contact"}}</LinkTo>
257265
<LinkTo @route="specialists" {{on "click" this.closeMenu}}>{{t "header.specialists"}}</LinkTo>
258266
<LinkTo @route="contributors" {{on "click" this.closeMenu}}>{{t "header.contributors"}}</LinkTo>

frontend/app/components/image-display-block/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.image-block {
44
animation: fade-out 0.5s;
5-
min-width: 350px;
5+
min-width: min(350px, 100%);
66
min-height: 350px;
77
max-width: 100%;
88
max-height: 100%;

frontend/app/components/profile/index.gts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export default class ProfileComponent extends Component {
277277
title="{{this.user.email}}"
278278
style={{htmlSafe
279279
(concat "background-image: url('" this.avatarUrl "');")
280-
}} class="btn-press gradient-background focus:outline-hidden inline-flex items-center justify-center w-32 h-32 m-auto bg-center bg-contain border border-gray-400 rounded-full" {{on "click" this.onShowAvatars}}
280+
}} class="btn-press gradient-background focus:outline-hidden inline-flex items-center justify-center w-24 h-24 sm:w-32 sm:h-32 m-auto bg-center bg-contain border border-gray-400 rounded-full" {{on "click" this.onShowAvatars}}
281281
>
282282
</button>
283283
</div>

frontend/app/components/robot/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
position: relative;
55
margin: 6em auto 0 auto;
66
padding: 10px;
7+
width: 320px;
78
-webkit-transform-origin: bottom;
89
transform-origin: bottom;
910
-webkit-transform: rotate(0deg) translate3d(0px, 0px, 0px);

frontend/app/components/robot/index.gts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { LinkTo } from '@ember/routing';
1010
xmlns:xlink="http://www.w3.org/1999/xlink"
1111
x="0"
1212
y="0"
13-
width="320px"
14-
height="300px"
13+
style="max-width:100%;height:auto"
1514
viewBox="0 0 160 300"
1615
enable-background="new 0 0 320 300"
1716
xml:space="preserve"

frontend/app/components/statistics/week-time-track/index.gts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export default class WeekTimeTrackComponent extends Component<WeekTimeTrackSigna
9494
},
9595
size: {
9696
height: 200,
97-
width: 1000,
9897
},
9998
legend: {
10099
show: false,

0 commit comments

Comments
 (0)