-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtimeTracking.html
More file actions
232 lines (214 loc) · 12.7 KB
/
Copy pathtimeTracking.html
File metadata and controls
232 lines (214 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<title>Frontend Mentor | Time tracking dashboard</title>
<link rel="stylesheet" href="css/styles.css">
<!-- <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> -->
<link rel="stylesheet" href="./images/timeTrack/styles.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500&display=swap');
</style>
</head>
<body>
<main class="h-full mt-20 md:h-screen w-full flex justify-center items-center">
<div
x-data = "{myData: sourceData, selected: 'daily'}"
class="grid grid-cols-1 md:grid-cols-4 gap-6 md:max-w-6xl mx-auto">
<!-- profile -->
<div class="base md:row-span-2 rounded-xl w-80 md:w-auto">
<div class="profile rounded-xl grid grid-cols-3 md:grid-cols-1 py-6 items-center pl-8">
<img src="./images/timeTrack/image-jeremy.png" alt="jeremy photo" class="h-20 w-20 border-4 col-span-1 md:my-3 rounded-full">
<div class="text-white col-span-2 md:pt-6 md:pb-16 ">
<p class="text-gray-400">Report for</p>
<h1 class="text-gray-200 text-2xl md:text-4xl font-light tracking-wide">Jeremy Robson</h1>
</div>
</div>
<div class="grid grid-cols-3 md:grid-cols-1 justify-items-center md:justify-items-start md:gap-y-3 md:pl-8 text-lg text-gray-500 py-7">
<a href="#" @click = "selected = 'daily'" class="hover:text-gray-100 focus:text-gray-100">Daily</a>
<a href="#" @click = "selected = 'weekly'" class="hover:text-gray-100 focus:text-gray-100">Weekly</a>
<a href="#" @click = "selected = 'monthly'" class="hover:text-gray-100 focus:text-gray-100">Monthly</a>
</div>
</div>
<!-- cards -->
<template x-for = "item in myData" :key="item">
<div
:class= "{
'bgwork' : item.title === 'Work',
'bgplay' : item.title === 'Play',
'bgstudy': item.title === 'Study',
'bgexercise' : item.title === 'Exercise',
'bgsocial' : item.title === 'Social',
'bgselfcare' : item.title === 'Self Care'
}"
class="relative rounded-xl overflow-hidden w-80 md:w-auto">
<div x-html = "item.logo"
class="float-right -mt-3 mr-3"></div>
<!-- <svg width="79" height="79" class="float-right -mt-3 mr-3" xmlns="http://www.w3.org/2000/svg">
<path d="m18.687 10.43 15.464 30.906c.31.682.743 1.322 1.3 1.88.558.557 1.198.99 1.714 1.217L68.237 59.98 52.484 75.732a8.025 8.025 0 0 1-11.355 0L2.934 37.538a8.025 8.025 0 0 1 0-11.356L18.687 10.43Zm19.345-7.99 10.839 10.838 2.065-2.064a5.845 5.845 0 0 1 8.258 0l8.258 8.259a5.845 5.845 0 0 1 0 8.258l-2.064 2.064 10.839 10.84a8.025 8.025 0 0 1 0 11.355l-4.728 4.728L39.126 40.53a1.963 1.963 0 0 1-.578-.413 1.963 1.963 0 0 1-.413-.578L21.95 7.168l4.728-4.728a8.025 8.025 0 0 1 11.355 0Zm17.033 12.903-2.064 2.065 8.258 8.258 2.064-2.064-8.258-8.259Z" fill="#D96C47" fill-rule="nonzero"/></svg> -->
<div
class="base relative text-gray-200 rounded-xl p-6 mt-9 h-full">
<div
class="grid grid-cols-2 w-full relative">
<p
x-text="item.title"
class="text-lg">
</p>
<svg
xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-400 justify-self-end hover:text-gray-100 cursor-pointer" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z" />
</svg>
</div>
<div class="grid grid-cols-2 md:grid-cols-1 md:gap-y-3 items-center">
<h2
x-text = "item.timeframes[selected].current + ' hrs'"
class="text-3xl md:text-6xl md:mt-6 font-light">
</h2>
<p
x-text = "item.timeframes[selected].label + ' ' + item.timeframes[selected].previous + ' hrs'"
class="text-gray-400"></p>
</div>
</div>
</div>
</template>
</div>
</main>
<footer class="attribution flex justify-center items-center text-gray-200">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="https://codepen.io/cssbubble">Priyanka</a>
</footer>
<script>
var sourceData = [
{
"title": "Work",
"timeframes": {
"daily": {
"current": 5,
"previous": 7,
"label": 'Yesterday'
},
"weekly": {
"current": 32,
"previous": 36,
"label": 'Last week'
},
"monthly": {
"current": 103,
"previous": 128,
"label": 'Last Month'
}
},
"logo": '<svg width="79" height="79" class="float-right -mt-3 mr-3" xmlns="http://www.w3.org/2000/svg"><path d="m18.687 10.43 15.464 30.906c.31.682.743 1.322 1.3 1.88.558.557 1.198.99 1.714 1.217L68.237 59.98 52.484 75.732a8.025 8.025 0 0 1-11.355 0L2.934 37.538a8.025 8.025 0 0 1 0-11.356L18.687 10.43Zm19.345-7.99 10.839 10.838 2.065-2.064a5.845 5.845 0 0 1 8.258 0l8.258 8.259a5.845 5.845 0 0 1 0 8.258l-2.064 2.064 10.839 10.84a8.025 8.025 0 0 1 0 11.355l-4.728 4.728L39.126 40.53a1.963 1.963 0 0 1-.578-.413 1.963 1.963 0 0 1-.413-.578L21.95 7.168l4.728-4.728a8.025 8.025 0 0 1 11.355 0Zm17.033 12.903-2.064 2.065 8.258 8.258 2.064-2.064-8.258-8.259Z" fill="#D96C47" fill-rule="nonzero"/></svg><div>'
},
{
"title": "Play",
"timeframes": {
"daily": {
"current": 1,
"previous": 2,
"label": 'Yesterday'
},
"weekly": {
"current": 10,
"previous": 8,
"label": 'Last week'
},
"monthly": {
"current": 23,
"previous": 29,
"label": 'Last Month'
}
},
"logo": '<svg width="76" height="77" xmlns="http://www.w3.org/2000/svg"><path d="m60.91 71.846 12.314-19.892c3.317-5.36 3.78-13.818-2.31-19.908l-26.36-26.36c-4.457-4.457-12.586-6.843-19.908-2.31L4.753 15.69c-5.4 3.343-6.275 10.854-1.779 15.35a7.773 7.773 0 0 0 7.346 2.035l7.783-1.945a3.947 3.947 0 0 1 3.731 1.033l22.602 22.602c.97.97 1.367 2.4 1.033 3.732l-1.945 7.782a7.775 7.775 0 0 0 2.037 7.349c4.49 4.49 12.003 3.624 15.349-1.782Zm-24.227-46.12-1.891-1.892-1.892 1.892a2.342 2.342 0 0 1-3.312-3.312l1.892-1.892-1.892-1.891a2.342 2.342 0 0 1 3.312-3.312l1.892 1.891 1.891-1.891a2.342 2.342 0 0 1 3.312 3.312l-1.891 1.891 1.891 1.892a2.342 2.342 0 0 1-3.312 3.312Zm14.19 14.19a2.343 2.343 0 1 1 3.315-3.312 2.343 2.343 0 0 1-3.314 3.312Zm0 7.096a2.343 2.343 0 0 1 3.313-3.312 2.343 2.343 0 0 1-3.312 3.312Zm7.096-7.095a2.343 2.343 0 1 1 3.312 0 2.343 2.343 0 0 1-3.312 0Zm0 7.095a2.343 2.343 0 0 1 3.312-3.312 2.343 2.343 0 0 1-3.312 3.312Z" fill="#3F9CBB" fill-rule="nonzero"/></svg>'
},
{
"title": "Study",
"timeframes": {
"daily": {
"current": 0,
"previous": 1,
"label": 'Yesterday'
},
"weekly": {
"current": 4,
"previous": 7,
"label": 'Last week'
},
"monthly": {
"current": 13,
"previous": 19,
"label": 'Last Month'
}
},
"logo": '<svg width="79" height="79" xmlns="http://www.w3.org/2000/svg"><path d="M33.227 1.495a1.87 1.87 0 0 1 2.646 0l1.323 1.323-27.78 27.78c-2.189 2.189-2.1 5.837.088 8.026l12.132 12.132a5.624 5.624 0 0 0 1.096 6.388 5.624 5.624 0 0 0 6.389 1.097l12.132 12.132c2.188 2.188 5.837 2.276 8.025.088l27.78-27.78 1.323 1.322a1.87 1.87 0 0 1 0 2.646L46.632 78.4a1.87 1.87 0 0 1-2.645 0L29.12 63.531a5.624 5.624 0 0 1-6.389-1.097l-5.291-5.291a5.624 5.624 0 0 1-1.097-6.388L1.478 35.89a1.87 1.87 0 0 1 0-2.646ZM59.74 22.783c1.948.27 3.83 1.117 5.325 2.612l10.583 10.583a1.87 1.87 0 0 1 0 2.646L46.544 67.727a1.87 1.87 0 0 1-2.646 0L30.67 54.498a1.872 1.872 0 0 0-2.646 0ZM49.19 6.875a1.87 1.87 0 0 1 2.647 0c4.489 4.489 5.877 8.98 6.178 12.342L27.67 49.56c.349-1.527 1.181-7.463-4.938-13.582a1.87 1.87 0 0 1 0-2.646Zm-7.936-2.646a1.87 1.87 0 0 1 2.645 0l1.323 1.323-25.134 25.134a5.619 5.619 0 0 0 0 7.938c4.005 4.005 4.2 7.696 4.043 9.335L12.15 35.978a1.87 1.87 0 0 1 0-2.646Z" fill="#F04667" fill-rule="nonzero"/></svg>'
},
{
"title": "Exercise",
"timeframes": {
"daily": {
"current": 1,
"previous": 1,
"label": 'Yesterday'
},
"weekly": {
"current": 4,
"previous": 5,
"label": 'Last week'
},
"monthly": {
"current": 11,
"previous": 18,
"label": 'Last Month'
}
},
"logo": '<svg width="81" height="55" xmlns="http://www.w3.org/2000/svg"><path d="m33.357.579 16.447.426c.33.009.645.144.88.38l9.953 9.953a4.946 4.946 0 0 1 1.451 3.311l.514 12.87c.02.503.433.895.937.894l9.595-.05a4.438 4.438 0 0 1 4.437 4.43v.26c0 1.164-.453 2.259-1.277 3.082a4.334 4.334 0 0 1-3.083 1.277h-15.77c-2.347 0-4.393-2.045-4.393-4.393l-.001-8.405-12.05-.009.01 15.17c.001.426-.21.826-.56 1.067l-18.098 12.41c-1.363.849-2.958 1.033-4.426.537a5.147 5.147 0 0 1-1.994-1.237 5.247 5.247 0 0 1-1.193-1.85c-.875-2.293.074-4.934 2.256-6.277l12.303-8.973.252-11.28-13.556.442a1.291 1.291 0 0 1-.957-.377L2.237 11.439c-1-.999-1.55-2.38-1.513-3.792a5.124 5.124 0 0 1 1.714-3.71c2.042-1.84 5.234-1.688 7.267.345l8.576 8.576 29.444-1.635-2.133-2.133-12.263.347a4.434 4.434 0 0 1-3.294-1.28l-.016-.015a4.409 4.409 0 0 1-1.294-3.307c.08-2.347 2.16-4.255 4.632-4.256Zm33.78 11.774c3.025-3.025 7.945-3.025 10.97 0 3.024 3.025 3.024 7.944 0 10.97-3.025 3.024-7.945 3.024-10.97 0-3.024-3.026-3.025-7.945 0-10.97Z" fill="#29BA66" fill-rule="nonzero"/></svg>'
},
{
"title": "Social",
"timeframes": {
"daily": {
"current": 1,
"previous": 3,
"label": 'Yesterday'
},
"weekly": {
"current": 5,
"previous": 10,
"label": 'Last week'
},
"monthly": {
"current": 21,
"previous": 23,
"label": 'Last Month'
}
},
"logo": '<svg width="75" height="100" xmlns="http://www.w3.org/2000/svg"><g fill="#5A1CBB" fill-rule="nonzero"><path d="M45.834 46.627c4.78 4.78 13.1 5.754 19.257-.403 5.2-5.199 5.198-13.657 0-18.855L47.151 9.428C42.335 4.614 34.02 3.7 27.892 9.83c-4.701 4.7-5.151 12.066-1.352 17.277l-6.265 6.265c-1.339 1.339-.317 3.644 1.585 3.533l13.474-.777 10.499 10.499Zm11.404-11.483a2.567 2.567 0 1 1-3.629 3.631 2.567 2.567 0 0 1 3.63-3.631ZM35.745 20.909a2.567 2.567 0 1 1 3.63-3.629 2.567 2.567 0 0 1-3.63 3.63Zm12.562 5.303a2.567 2.567 0 1 1-3.63 3.63 2.567 2.567 0 0 1 3.63-3.63ZM55.16 63.698 37.219 45.756c-5.198-5.197-13.658-5.197-18.857.001-6.072 6.073-5.26 14.4-.402 19.258l10.499 10.5-.777 13.473c-.11 1.886 2.186 2.931 3.533 1.584l6.265-6.265c5.212 3.8 12.577 3.349 17.277-1.352 6.06-6.059 5.274-14.386.403-19.257ZM25.813 57.24a2.567 2.567 0 1 1 3.63-3.631 2.567 2.567 0 0 1-3.63 3.63Zm8.932 8.931a2.567 2.567 0 1 1 3.63-3.629 2.567 2.567 0 0 1-3.63 3.63Zm8.932 8.933a2.567 2.567 0 1 1 3.63-3.631 2.567 2.567 0 0 1-3.63 3.63Z"/></g></svg>'
},
{
"title": "Self Care",
"timeframes": {
"daily": {
"current": 0,
"previous": 1,
"label": 'Yesterday'
},
"weekly": {
"current": 2,
"previous": 2,
"label": 'Last week'
},
"monthly": {
"current": 7,
"previous": 11,
"label": 'Last Month'
}
},
"logo": '<svg width="67" height="67" xmlns="http://www.w3.org/2000/svg"><path d="M.918 50.848c.114 1.723.232 3.5.346 5.336l.003.038.448 6.038c.06.81.412 1.536.951 2.075.54.54 1.266.892 2.075.952l6.038.447.038.003c12.086.755 21.237 1.231 28.95.484 9.007-.873 15.369-3.445 20.02-8.096 8.413-8.413 8.398-21.609-.034-30.041-3.79-3.79-8.959-6.11-14.31-6.526-.415-5.352-2.736-10.52-6.526-14.31C30.484-1.185 17.288-1.2 8.875 7.214-1.295 17.384-.415 30.697.918 50.848ZM21.36 27.122l6.172 6.173 6.16-6.159 6.172 6.173-6.16 6.158 6.173 6.173-6.158 6.158-6.173-6.172-6.158 6.158-6.173-6.172 6.159-6.159-6.173-6.172 6.16-6.159Z" fill="#E6A532" fill-rule="nonzero"/></svg>'
}
]
</script>
</body>
</html>