source: OpenWorkouts-current/ow/static/less/modules/workout.less @ bf01534

currentfeature/docs
Last change on this file since bf01534 was bf01534, checked in by Segundo Fdez <segun.2@…>, 5 years ago

update workout detail layout and ui

  • Property mode set to 100644
File size: 7.9 KB
Line 
1.workout-content {
2    padding: 2em  1em;
3    @media (min-width: @screen-s){
4        padding: 2em 6em;
5    }
6     @media (min-width: @screen-m){
7        display: flex;
8        justify-content:space-between;
9    }
10}
11
12/* list mode */
13.workout-list {
14    margin-right: 2em;
15    width: 100%;
16    >h2{
17        font-weight: 300;
18        margin: 0 0 1.5em;
19    }
20    /* provisional layout, replace this with grid layout system based on final content */
21}
22
23/* Module resume on dashboard workouts */
24.workout-resume {
25    padding: 1.5em 0;
26    position: relative;
27    max-width: 700px;
28    @media (min-width: @screen-m){
29        padding-left: 2em;
30        border-left: 1px solid @color-main-light;
31        transition: all 250ms ease-in-out;
32    }
33    &:hover{
34        border-color: @color-main;
35        .workout-title{
36            &:before{
37                color: @color-main;
38            }
39        }
40    }
41    ul{
42        padding: 0;
43        list-style-type: none;
44        .font-size(13);
45        a{
46            display: block;
47            text-decoration: none;
48        }
49    }
50}
51.bike{
52    &:before{
53        display: block;
54        //position: absolute;
55        content: "";
56        width: 30px;
57        height: 30px;
58        //left:-3.25em;
59        //top: 1.6em;
60        background-image: url('../media/img/bike.svg');
61        background-size: 100%;
62    }
63}
64
65.workout-title{
66    .font-size(14);
67    margin: 0 0 0em 0;
68    position: relative;
69    &:before{
70        transition: all 250ms ease-in-out;
71        content: "▶";
72        position: absolute;
73        left: -3.25em;
74        top:.35em;
75        color:@color-main-light;
76        .font-size(10);
77    }
78    a{
79        color: @color-main;
80        text-decoration: none;
81        &:hover {
82            color: @color-app;
83        }
84    }
85}
86
87.workout-info {
88    display: flex;
89    align-items:center;
90    margin: .25em 0;
91    li{
92        color: @color-main-medium;
93        &:after{
94            content: "|";
95            margin:0 .5em;
96        }
97        &:last-child{
98            &:after{
99                content: "";
100                margin:0;
101            }
102        }
103    }
104}
105
106.workout-map {
107    margin-top: 1em;
108    img {
109        width: 100%;
110    }
111}
112
113.workout-intro {
114    .font-size(13);
115    color: @color-main;
116}
117
118.workout-options{
119    display: inline-block;
120    border:1px solid @color-main-light;
121    margin-bottom: 0;
122    border-radius: 4px;
123    padding: 0;
124    li{
125        display: inline-block;
126        border-right: 1px solid @color-main-light;
127        &:last-child{
128            border-right:none;
129        }
130    }
131    a{
132        display: block;
133        color: @color-main-medium;
134        padding: .5em .75em;
135        text-decoration: none;
136        &:hover{
137            color: @color-main;
138        }
139        &.is-active {
140            background-color: @color-main-medium;
141            color: white;
142        }
143    }
144}
145
146.owo-del{
147    a{
148        &:hover{
149            color: red;
150        }
151    }
152}
153
154.workout-aside{
155    width: 100%;
156    @media (min-width: @screen-m){
157        max-width: 300px;
158        padding-left: 1.5em;
159        border-left:1px solid @color-main-light;
160    }
161}
162
163
164
165.aside-profile {
166    margin-bottom: 1em;
167    img {
168        width: 80px;
169        height: 80px;
170        object-fit: cover;
171        border-radius: 50%;
172    }
173    h2 {
174        font-weight: 400;
175        .font-size(18);
176         margin: 0 0 .5em 0;
177    }
178    ul {
179        list-style-type: none;
180        margin:0;
181        padding:0;
182        .font-size(13);
183        color: @color-main-dark;
184    }
185}
186
187
188
189/* Workout detail */
190#map {
191    height: 400px;
192    @media (min-width: @screen-s){
193        height: calc(100vh - 380px);
194    }
195}
196
197.workout-detail {
198    padding: 0em  1em;
199    @media (min-width: @screen-s){
200        max-width: 1280px;
201        margin: 0 auto;
202    }
203     @media (min-width: @screen-m){
204        display: flex;
205        justify-content:space-between;
206    }
207}
208
209.workout-detail-resume {
210    max-width: 500px;
211    margin-bottom: 2em;
212    padding-top: 2em;
213    @media (min-width: @screen-m){
214        margin-right: 6em;
215    }
216    h3 {
217        margin-top: 0;
218        margin-bottom: .5em;
219        & + div {
220            .font-size(14);
221            color: @color-main-medium;
222            line-height: 1.35em;
223        }
224    }
225    .workout-options {
226        .font-size(13);
227    }
228}
229
230.workout-detail-info {
231    max-width: 600px;
232    @media (min-width: @screen-m){
233        border-right: 1px solid @color-main-light;
234        border-left: 1px solid @color-main-light;
235        padding:2em 1em 2em 2em;
236    }
237    ul {
238        list-style-type: none;
239        padding:0;
240        margin: 0;
241        display: flex;
242        justify-content:space-between;
243        flex-flow: row wrap;
244        span {
245            display: block;
246            .font-size(13);
247            color: @color-main-medium;
248            margin-bottom: .25em;
249            &.min,
250            &.avg,
251            &.max {
252                display: inline-block;
253                color: white;
254                padding: .5em .85em;
255                border-radius: 3px;
256            }
257            &.max {
258                background-color: @color-app;
259            }
260            &.min {
261                background-color: #1395CA;
262                margin-right: .5em;
263            }
264
265            &.avg {
266                background-color: #17C898;
267                margin-right: .5em;
268            }
269        }
270    }
271    li {
272        margin-bottom: 2em;
273        margin-right: 1em;
274        color: @color-main-medium;
275        .font-size(15);
276        &.important {
277            .font-size(21);
278            color: @color-main;
279        }
280    }
281}
282
283
284
285/* Week report */
286.svg-cotent {
287    svg {
288        width: 100%;
289        height: 100%;
290    }
291
292    .label {
293        .font-size(13);
294        text-anchor: middle;
295    }
296    .tick {
297        .font-size(13);
298    }
299
300}
301
302/* dashboard graphics*/
303.x-axis path, .x-axis line {
304    fill: none;
305    stroke: none;
306}
307
308.bar {
309    fill: #f8b5be;
310    &:hover {
311        fill: #ee4056;
312    }
313}
314
315.current {
316    fill: #ee4056;
317}
318
319
320
321.week-stats {
322    border: 1px solid @color-main-light;
323    background-color: fade(@color-main-light, 10%);
324    padding: .75em;
325    border-radius: 4px;
326    margin-bottom: 2em;
327    h3 {
328        margin: 0;
329        .font-size(14);
330        & + p {
331            margin: .25em 0 2em 0;
332            color: @color-main-medium;
333            .font-size(13);
334        }
335    }
336}
337
338.workout-activity-summary {
339    list-style-type: none;
340    padding: 0;
341    margin: 0;
342    background-color: fade(@color-main, 80%);
343    margin-bottom: .75em;
344    li {
345        color: @color-main-light;
346        border-bottom: 1px solid @color-main-medium;
347        padding: .75em 1em;
348        display: flex;
349        justify-content: space-between;
350        &:last-child {
351            margin-bottom: 0;
352            border: none;
353        }
354        span {
355            &:first-child {
356                font-weight: bold;
357            }
358        }
359    }
360}
361
362.workout-activity-tree {
363    list-style-type: none;
364    padding: 0;
365    margin: 0;
366    transition:all 250ms ease-in-out;
367    .font-size(13);
368    >li {
369        margin-bottom: .5em;
370        padding-bottom: .5em;
371        border-bottom: 1px solid @color-main-light;
372    }
373    a {
374        text-decoration: none;
375        display: block;
376        color: @color-app;
377        &:hover{
378            color: @color-main;
379        }
380
381        &.viewing-year {
382            color: @color-main;
383            font-weight: 700;
384            margin-bottom: .5em;
385            .font-size(16);
386        }
387        &.viewing-month {
388            background-color: @color-main-light;
389            color: @color-main;
390            font-weight: 700;
391        }
392    }
393}
394
395
396.workout-activity-tree-year {
397    list-style-type: none;
398    padding: 0;
399    margin: 0;
400    >li {
401        display: block;
402        margin-bottom: .5em;
403    }
404    a {
405        display: flex;
406        justify-content: space-between;
407        padding: .5em;
408        background-color: @color-main-xtralight;
409        color: @color-main-dark;
410        &:hover {
411            background-color: @color-main-light;
412        }
413    }
414}
415
416
Note: See TracBrowser for help on using the repository browser.