-
Notifications
You must be signed in to change notification settings - Fork 0
/
filter.html
79 lines (79 loc) · 2.31 KB
/
filter.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
<!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" />
<title>sht4 filter</title>
<link
href="https://unpkg.com/[email protected]/dist/tailwind.min.css"
rel="stylesheet"
/>
<style>
body {
font-family: inter, sans-serif;
--block-transform: translate(0, 0);
}
.difference {
mix-blend-mode: difference;
}
.our-shadow {
color: white;
text-shadow: -4px -4px 0 #000, -2px -2px 0 #000, 1px -1px 0 #000,
1px 1px 0 #000, -1px 1px 0 #000;
}
</style>
</head>
<body class="bg-black">
<div id="app">
<div
style="background-image: url(diskod.png);"
class="fixed top-0 left-0 w-screen h-screen z-10 bg-cover bg-bottom"
></div>
<div
class="fixed top-0 left-0 w-screen h-screen z-20 difference"
:style="bgStyle"
></div>
<div
class="absolute z-30 difference"
style="top: 50%; left: 50%; width: 10vw; height: 10vw;"
v-for="rect of rects"
:key="rect.key"
:style="rect.style"
></div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js"
integrity="sha256-ngFW3UnAN0Tnm76mDuu7uUtYEcG3G5H1+zioJw3t+68="
crossorigin="anonymous"
></script>
<script>
const rand = () => Math.random() * 2 - 1
const mkdeg = () => ~~(Math.random() * 360)
const mkc = () => `hsl(${mkdeg()}deg, 100%, 50%)`
const mkg = () => `linear-gradient(${mkdeg()}deg, ${mkc()}, ${mkc()})`
const vm = new Vue({
el: '#app',
data: {
bgStyle: { background: mkg() },
rects: Array(7)
.fill(null)
.map((_, i) => {
return {
key: i,
style: {
background: mkg(),
transform: [
`translate(-50%, -50%)`,
`translate(${rand() * 50}vw, ${rand() * 50}vh)`,
`rotate(${mkdeg()}deg)`,
`scale(${1 + Math.random() * 5})`,
].join(' '),
},
}
}),
},
})
</script>
</body>
</html>