Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 9451289

Browse files
committed
Fix #995 - Stats row in the dashboard (mobile view)
1 parent 88ffd7d commit 9451289

File tree

3 files changed

+45
-27
lines changed

3 files changed

+45
-27
lines changed

app/directives/responsive-carousel/responsive-carousel.directive.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ import angular from 'angular'
4545
} else if(width >= 1010) {
4646
// desktop
4747
buildCarouselSlide(5)
48-
} else if(width < 1010 && width >= 768) {
49-
// tablet
48+
} else if(width < 1010) {
49+
// tablet & mobile
5050
buildCarouselSlide(4)
51-
} else {
52-
// we don't need to build carousel for mobile as we show horizontal scroll
53-
// phone
54-
buildCarouselSlide(3)
55-
}
51+
}
5652
}
5753

5854

assets/css/directives/responsive-carousel.scss

+41-20
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,30 @@
88
margin: 0 auto;
99
@media only screen and (max-width: 767px) {
1010
display: none;
11+
width: auto;
1112
}
12-
&[slide-count="1"] {
13-
width: 170px;
14-
}
15-
&[slide-count="2"] {
16-
width: 340px;
17-
}
18-
&[slide-count="3"] {
19-
width: 510px;
20-
}
21-
&[slide-count="4"] {
22-
width: 680px;
23-
}
24-
&[slide-count="5"] {
25-
width: 850px;
26-
}
27-
&[slide-count="6"] {
28-
width: 1020px;
29-
}
30-
&[slide-count="7"] {
31-
width: 1190px;
13+
@media only screen and (min-width: 768px) {
14+
&[slide-count="1"] {
15+
width: 170px;
16+
}
17+
&[slide-count="2"] {
18+
width: 340px;
19+
}
20+
&[slide-count="3"] {
21+
width: 510px;
22+
}
23+
&[slide-count="4"] {
24+
width: 680px;
25+
}
26+
&[slide-count="5"] {
27+
width: 850px;
28+
}
29+
&[slide-count="6"] {
30+
width: 1020px;
31+
}
32+
&[slide-count="7"] {
33+
width: 1190px;
34+
}
3235
}
3336

3437
li {
@@ -125,6 +128,24 @@
125128
}
126129
}
127130
}
131+
132+
133+
ul[slide-count="3"] {
134+
@media only screen and (min-width: 575px) {
135+
.slide {
136+
display: inline-block;
137+
138+
&:not(:first-child) {
139+
.carousel-elem:before {
140+
top: 32px;
141+
left: -18px;
142+
@include forward-slash(1px, 60px, 0, 2px, 30deg);
143+
}
144+
}
145+
}
146+
}
147+
}
148+
128149
.carousel-elem {
129150
position: relative;
130151
display: inline-block;

assets/css/profile/subtrack.scss

+1
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@
572572

573573
> li {
574574
position: relative;
575+
text-align: center;
575576

576577
.slide {
577578
text-align: center;

0 commit comments

Comments
 (0)