-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
326 lines (308 loc) · 7.86 KB
/
index.html
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="André Malveira - @andremalveira">
<meta name="description" content="Iuricode Projects Created by André Malveira"/>
<meta name="twitter:title" content="André Malveira Dev"/>
<meta name="twitter:description " content="Iuricode Projects Created by André Malveira">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://iuricode.andev.ml/src/images/card.jpg"/>
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Iuricode Projects">
<meta property="og:url" content="https://iuricode.andev.ml" />
<meta property="og:title" content="André Malveira Dev"/>
<meta property="og:description" content="Iuricode Projects Created by André Malveira"/>
<meta property="og:image" content="https://iuricode.andev.ml/src/images/card.jpg"/>
<link rel="shortcut icon" href="https://iuricode.com/assets/image/logo-page.svg" type="image/x-icon">
<title>Iuricode Projects Created by André Malveira</title>
</head>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
body{
width: 100%;
box-sizing: border-box;
margin: 0;
font-family: 'Inter', sans-serif;
background-color: #0E091B;
color: #D9D8DB;
}
a {
text-decoration: none;
color: currentColor;
outline: none;
}
h1, h2, h3, h4, h5 {
font-weight: normal;
margin: 0;
}
hr {
width: 100%;
height: 2px;
margin: 0;
outline: none;
border: none;
background:#231e35;
display: none;
}
@media (max-width: 720px) {
hr {
display: block;
}
}
section {
display: grid;
grid-template-rows: 1fr auto;
height: 100vh;
}
.container {
max-width: 1080px;
width: 100%;
height: 100%;
margin: auto;
}
@media (max-width: 1280px) {
.container {
max-width: initial;
padding: 0 1.5rem;
width: initial;
}
}
header {
padding-top: 4rem;
padding-bottom: 3rem;
}
main {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
}
@media (max-width: 980px) {
main {
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
}
@media (max-width: 720px) {
main {
grid-template-columns: repeat(1, 1fr);
}
}
main .project {
max-width: 25rem;
grid-row: span 1;
display: flex;
flex-direction: column;
gap: 2rem;
transition: ease 0.3s;
padding: 1.5rem;
border-radius: 0.5rem;
position: relative;
}
@media (max-width: 980px) {
main .project {
max-width: initial;
transition: ease 0.1s;
}
}
main .project:hover {
background:#19142ccc;
box-shadow: 0px 0px 20px 0px #0000004d;
backdrop-filter: blur(5px);
}
main .project.preview {
transform: scale(1.5);
background:#19142ccc;
box-shadow: 0px 0px 20px 0px #0000004d;
backdrop-filter: blur(5px);
z-index: 1;
}
@media (max-width: 720px) {
main .project.preview {
transform: scale(1.1);
}
}
main .project .close {
position: absolute;
top: -0.5rem;
right: -0.5rem;
padding: 0.1rem;
border-radius: 50%;
background:#2c2350cc;
box-shadow: 0px 0px 20px 3px #0000005e;
align-items: center;
justify-content: center;
display: none;
cursor: pointer;
transition: ease 0.1s;
}
main .project.preview .close {
display: flex;
}
main .project.preview .close:hover {
background:#3f3177cc;
}
main .project .title {
display: flex;
align-items: center;
text-transform: uppercase;
}
main .project .preview {
cursor: pointer;
max-width: 25rem;
max-height: 16rem;
margin: auto;
width: 100%;
height: 100%;
border-radius: 0.5rem;
overflow: hidden;
box-shadow: 0px 0px 0px 3px #27203b;
}
@media (max-width: 720px) {
main .project .preview {
max-width: initial;
}
}
main .project .preview img {
width: 100%;
height: 100%;
object-fit: cover;
}
main .project .preview video {
width: 100%;
object-fit: cover;
height: 100%;
}
main .project .btns {
display: flex;
gap: 1rem;
}
main .project .btns .btn,
main .project .btns a {
display: flex;
width: 100%;
height: 3rem;
border-radius: 0.4rem;
background-color: #110E1B;
justify-content: center;
align-items: center;
font-size: 1.1rem;
cursor: pointer;
transition: ease 0.2s;
}
main .project:hover .btns .btn {
box-shadow: 0px 0px 0px 2px #27203b;
}
main .project .btns .btn:hover {
background-color: #27203b;
}
footer {
padding: 2rem;
opacity: 0.6;
font-weight: 200;
}
@media (max-width: 720px) {
footer {
text-align: center;
}
}
.gg-close-o {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 22px;
height: 22px;
border: 2px solid transparent;
border-radius: 40px;
color: #D9D8DB;
}
.gg-close-o::after,
.gg-close-o::before {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12px;
height: 1px;
background: currentColor;
transform: rotate(45deg);
border-radius: 5px;
top: 8px;
left: 3px
}
.gg-close-o::after {
transform: rotate(-45deg)
}
</style>
<body>
<section>
<div class="container">
<header>
<h1>
<a href="https://iuricode.com">Iuricode</a>
Projects Created by
<a href="http://github.com/andremalveira">André Malveira</a>
</h1>
</header>
<main>
<hr>
<div class="project">
<div class="close"><div class="gg-close-o"></div></div>
<div class="preview">
<img src="challenges/twenty/src/images/preview.png" video="challenges/twenty/src/images/preview.mp4" alt="">
</div>
<div class="title">Chalenge 20</div>
<div class="btns">
<a href="challenges/twenty/"><div class="btn">To View</div></a>
<a target="_blank" href="https://github.com/andremalveira/iuricode/tree/main/challenges/twenty/"><div class="btn">Repository</div></a>
</div>
</div>
<hr>
</main>
</div>
<footer>
<div class="container">
@ 2022 - André Malveira
</div>
</footer>
</section>
</body>
<script>
document.querySelectorAll('.project').forEach(project => {
let preview = project.querySelector('.preview')
let img = project.querySelector('.preview img')
let src = img.src
let videosrc = img.attributes.video.value
let id = project.querySelector('.title').textContent.replaceAll(' ', '')
const CloseVideo = (element) => {
element.classList.remove('preview')
element.querySelector('video').remove()
element.querySelector('.preview img').style.display = ''
}
preview.addEventListener('click', () => {
let videoprev = document.querySelector('.project .preview video')
if(videoprev) {
CloseVideo(videoprev.closest('.project'))
}
if(!preview.querySelector('video')){
project.classList.add('preview')
img.style.display = 'none'
let video = document.createElement('video')
video.src = videosrc
video.id = id
video.loop = true
preview.append(video)
video.play()
} else {
project.querySelector('#'+id).play()
}
})
project.querySelector('.close').addEventListener('click', () => {
CloseVideo(project)
})
})
</script>
</html>