current
Last change
on this file since 02b96c5 was
02b96c5,
checked in by Borja Lopez <borja@…>, 5 years ago
|
(#7) Added calendar heatmap chart to the profile page.
The calendar shows the current month, each day without a workout represented
by a light grey square, each day with workout data in a red/pink color, picked
up from a gradient generated based on the app main colors, and calculated based
on the amount of workout time for the day.
A tooltip is shown on hover with more info (only the total workouts time for
now)
|
-
Property mode set to
100644
|
File size:
3.0 KB
|
Line | |
---|
1 | .user-profile { |
---|
2 | .workout-options { |
---|
3 | .font-size(13); |
---|
4 | margin-right: 2em; |
---|
5 | } |
---|
6 | } |
---|
7 | |
---|
8 | .user-profile-account { |
---|
9 | background-color: @color-main-xtralight; |
---|
10 | border-bottom: 1px solid @color-main-light; |
---|
11 | padding: 2em 1em; |
---|
12 | @media (min-width: @screen-s){ |
---|
13 | padding: 2em 6em; |
---|
14 | } |
---|
15 | >div { |
---|
16 | @media (min-width: @screen-m){ |
---|
17 | display: flex; |
---|
18 | align-items: center; |
---|
19 | } |
---|
20 | } |
---|
21 | img { |
---|
22 | width: 64px; |
---|
23 | height: 64px; |
---|
24 | object-fit: cover; |
---|
25 | border-radius: 50%; |
---|
26 | margin-bottom: .5em; |
---|
27 | margin-right: 1em; |
---|
28 | @media (min-width: @screen-m){ |
---|
29 | width: 140px; |
---|
30 | height: 140px; |
---|
31 | } |
---|
32 | } |
---|
33 | h2 { |
---|
34 | margin: 0 0 .15em 0; |
---|
35 | .font-size(21); |
---|
36 | font-weight: 400; |
---|
37 | } |
---|
38 | p{ |
---|
39 | color: @color-main-dark; |
---|
40 | .font-size(14); |
---|
41 | margin: 0; |
---|
42 | a { |
---|
43 | color: @color-app; |
---|
44 | text-decoration: none; |
---|
45 | &:hover { |
---|
46 | color: @color-main; |
---|
47 | } |
---|
48 | } |
---|
49 | span { |
---|
50 | color: @color-main-medium; |
---|
51 | } |
---|
52 | } |
---|
53 | } |
---|
54 | .total-workouts { |
---|
55 | .font-size(13); |
---|
56 | font-weight: bold; |
---|
57 | span { |
---|
58 | color: @color-main-medium; |
---|
59 | margin-right: .5em; |
---|
60 | &:first-child { |
---|
61 | color: @color-main; |
---|
62 | &:after { |
---|
63 | content: "|"; |
---|
64 | color: @color-main-light; |
---|
65 | margin-left: .5em; |
---|
66 | } |
---|
67 | } |
---|
68 | } |
---|
69 | } |
---|
70 | |
---|
71 | .profile-data { |
---|
72 | list-style-type: none; |
---|
73 | padding: 0; |
---|
74 | .font-size(14); |
---|
75 | background-color: white; |
---|
76 | padding: .5em .75em; |
---|
77 | border-radius: 4px; |
---|
78 | border: 1px solid @color-main-light; |
---|
79 | li { |
---|
80 | display: flex; |
---|
81 | justify-content: space-between; |
---|
82 | color: @color-main-medium; |
---|
83 | &:not(:last-child) { |
---|
84 | margin-bottom: .5em; |
---|
85 | padding-bottom: .5em; |
---|
86 | border-bottom: 1px solid @color-main-light; |
---|
87 | } |
---|
88 | span { |
---|
89 | font-weight: bold; |
---|
90 | color: @color-main; |
---|
91 | } |
---|
92 | a { |
---|
93 | color: @color-app; |
---|
94 | text-decoration: none; |
---|
95 | &:hover { |
---|
96 | color: @color-main; |
---|
97 | } |
---|
98 | &:active, &:focus { |
---|
99 | outline: 0; |
---|
100 | border: none; |
---|
101 | -moz-outline-style: none; |
---|
102 | } |
---|
103 | } |
---|
104 | } |
---|
105 | } |
---|
106 | |
---|
107 | .profile-bio { |
---|
108 | margin: .5em 0; |
---|
109 | .font-size(14); |
---|
110 | } |
---|
111 | |
---|
112 | .month-stats, |
---|
113 | .latest-workouts { |
---|
114 | max-width: 700px |
---|
115 | } |
---|
116 | |
---|
117 | .center { |
---|
118 | text-align: center; |
---|
119 | } |
---|
120 | |
---|
121 | .month-stats { |
---|
122 | margin-bottom: 4em; |
---|
123 | } |
---|
124 | |
---|
125 | .latest-workouts { |
---|
126 | h4 { |
---|
127 | margin:0; |
---|
128 | a { |
---|
129 | color: @color-main; |
---|
130 | text-decoration: none; |
---|
131 | } |
---|
132 | } |
---|
133 | >span { |
---|
134 | .font-size(13); |
---|
135 | } |
---|
136 | p { |
---|
137 | margin-top: .25em; |
---|
138 | color: @color-main-medium; |
---|
139 | .font-size(13); |
---|
140 | } |
---|
141 | } |
---|
142 | |
---|
143 | .profile-dropdown-sports, |
---|
144 | .profile-dropdown-years { |
---|
145 | color: @color-main; |
---|
146 | text-decoration: none; |
---|
147 | &:hover { |
---|
148 | color: @color-main; |
---|
149 | } |
---|
150 | &:active, &:focus { |
---|
151 | outline: 0; |
---|
152 | border: none; |
---|
153 | -moz-outline-style: none; |
---|
154 | } |
---|
155 | } |
---|
156 | |
---|
157 | |
---|
158 | /* Calendar heatmap */ |
---|
159 | .calendar-heatmap { |
---|
160 | margin: 20px; |
---|
161 | .month { |
---|
162 | margin-right: 8px; |
---|
163 | } |
---|
164 | .month-name { |
---|
165 | font-size: 85%; |
---|
166 | fill: #777; |
---|
167 | } |
---|
168 | .day-name { |
---|
169 | font-size: 85%; |
---|
170 | fill: #777; |
---|
171 | } |
---|
172 | .day { |
---|
173 | &:hover { |
---|
174 | stroke: #e1e1e1; |
---|
175 | stroke-width: 2; |
---|
176 | } |
---|
177 | &:focus { |
---|
178 | stroke: #e1e1e1; |
---|
179 | stroke-width: 2; |
---|
180 | } |
---|
181 | } |
---|
182 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.