-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreativeCode.html
More file actions
174 lines (151 loc) · 4.33 KB
/
creativeCode.html
File metadata and controls
174 lines (151 loc) · 4.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Creative Coding Gallery</title>
<style>
body {
font-family: monaco, Consolas, "Lucida Console", monospace;
margin: 0;
padding: 0;
background-color: #141414;
}
.title {
color: white;
/* mix-blend-mode: hard-light; */
}
.container {
max-width: 800px;
margin: 20px auto;
padding: 20px;
/* background-color: #000; */
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.image-link {
display: inline-block;
margin: 10px;
overflow: hidden;
transition: transform 0.3s ease;
position: relative;
z-index: 2;
}
.image-link:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"%3E%3Cpath fill="%2300ff00" d="M0 0h8v8H0z" /%3E%3C/svg%3E');
opacity: 0.2; /* Cyberpunk green pixel effect */
z-index: 1;
}
.image-link:after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8"%3E%3Cpath fill="%23ff0000" d="M0 0h8v8H0z" /%3E%3C/svg%3E');
opacity: 0.2; /* Cyberpunk red pixel effect */
z-index: 1;
}
@keyframes glitch {
0% {
transform: translate(0, 0);
}
25% {
transform: translate(5px, -5px);
}
50% {
transform: translate(-5px, 5px);
}
75% {
transform: translate(-5px, -5px);
}
100% {
transform: translate(5px, 5px);
}
}
.image-link img {
width: auto;
height: 200px;
transition: transform 0.3s ease;
position: relative;
z-index: 2;
}
.image-link:hover {
transform: scale(1.2);
mix-blend-mode: normal;
}
.image-link:hover img {
transform: scale(1.2);
}
h1 {
font-size: 36px;
text-align: center;
margin-bottom: 30px;
}
h2 {
font-size: 24px;
text-align: center;
margin-bottom: 20px;
}
p {
font-size: 18px;
text-align: center;
margin-bottom: 20px;
}
</style>
</head>
<body>
<di class="title">
<h1>Creative coding</h1>
</div>
<!-- <h2>Interaction</h2>
<p>Explore our collection of immersive digital artworks.</p> -->
<div class="container">
<a href="assets/portfolio_attempt/portfolio webversion /Astart.html" class="image-link">
<img src="assets/img/portfolio_me/space.png" alt="Image 1">
</a>
<a href="saturation.html" class="image-link">
<img src="assets/img/saturation/install1.png" alt="Image 2">
</a>
<a href="set/index.html" class="image-link">
<img src="assets/img/set.png" alt="Image 3">
</a>
<a href="page3.html" class="image-link">
<img src="assets/img/codingPlay.png" alt="Image 3">
</a>
</div>
<!-- <script>
window.addEventListener('mousemove', function(event) {
const mouseY = event.clientY;
const windowHeight = window.innerHeight;
const percentage = mouseY / windowHeight;
const color = interpolateColor('#554499', '#994455', percentage); // Interpolate between blue and red
document.body.style.backgroundColor = color;
});
function interpolateColor(color1, color2, percentage) {
const hex = function(x) {
x = Math.round(x).toString(16);
return (x.length === 1) ? '0' + x : x;
};
const r1 = parseInt(color1.substring(1, 3), 16);
const g1 = parseInt(color1.substring(3, 5), 16);
const b1 = parseInt(color1.substring(5, 7), 16);
const r2 = parseInt(color2.substring(1, 3), 16);
const g2 = parseInt(color2.substring(3, 5), 16);
const b2 = parseInt(color2.substring(5, 7), 16);
const r = Math.min(255, Math.max(0, Math.ceil(r1 * (1 - percentage) + r2 * percentage)));
const g = Math.min(255, Math.max(0, Math.ceil(g1 * (1 - percentage) + g2 * percentage)));
const b = Math.min(255, Math.max(0, Math.ceil(b1 * (1 - percentage) + b2 * percentage)));
return '#' + hex(r) + hex(g) + hex(b);
}
</script> -->
</body>
</html>