forked from ethb3rlin/2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
234 lines (208 loc) · 9.37 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>ETHBerlin</title>
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="dist/paper-full.js"></script>
<script type="text/paperscript" canvas="canvas">
var bigGroup = new Group();
var smallGroup = new Group();
function createCircles(group, radius, count) {
var circle = new Shape.Circle({
center: [50, 200],
radius: radius,
strokeColor: 'black',
strokeWidth: 10
});
var symbol = new Symbol(circle);
for (var i = 0; i < count; i++) {
var position = view.size * Point.random();
var placed = symbol.place(position);
group.addChild(placed);
}
}
function createPatterns(group, pointData, sizeData) {
var shape = new Shape.Rectangle({
point: pointData,
size: sizeData,
fillColor: 'red'
})
var symbol = new Symbol(shape);
for (var i = 0; i < 2; i++) {
var position = view.size * Point.random();
var placed = symbol.place(position);
group.addChild(placed);
}
}
function createYellowPattern(group, strokeWidth, y) {
var pathYellow = new Path(new Point(2, y), new Point(250, 730));
pathYellow.style = {
strokeColor: '#ffd200',
strokeWidth: strokeWidth,
strokeCap: 'square'
};
var symbol = new Symbol(pathYellow);
for (var i = 0; i < 2; i++) {
var position = view.size * Point.random();
var placed = symbol.place(position);
group.addChild(placed);
}
}
function createBigGroup() {
createCircles(bigGroup, 200, 2);
createPatterns(bigGroup, [20,20], [150, 150]);
createYellowPattern(bigGroup, 70, 20);
}
function createSmallGroup() {
createCircles(smallGroup, 70, 1);
createPatterns(smallGroup, [10,10], [70, 70]);
createYellowPattern(smallGroup, 30, 5);
}
var x = window.matchMedia("(max-width: 600px)");
var y = window.matchMedia("(min-width: 601px)");
if (x.matches) {
createSmallGroup();
} else {
createBigGroup();
}
function toggleGroupVisibility(group, mediaMatch, create) {
if (mediaMatch) {
if (group.children.length === 0) {
create()
} else {
group.opacity = 1;
}
} else {
group.opacity = 0;
}
}
x.addListener(function(x) {
toggleGroupVisibility(smallGroup, x.matches, createSmallGroup);
});
y.addListener(function(y) {
toggleGroupVisibility(bigGroup, y.matches, createBigGroup);
});
function onMouseDrag(event) {
// The radius is the distance between the position
// where the user clicked and the current position
// of the mouse.
var path = new Path.Circle({
center: event.downPoint,
radius: (event.downPoint - event.point).length,
fillColor: 'blue',
});
// Remove this path on the next drag event:
path.removeOnDrag();
};
//stroke blue 1
var pathBlue = new Path(new Point(2, 20), new Point(250, 50));
pathBlue.style = {
strokeColor: 'blue',
strokeWidth: 10,
strokeCap: 'square'
};
// Create a symbol from the path:
var symbol = new Symbol(pathBlue);
// Place 3 instances of the symbol in the project in random
// positions in the view:
for (var i = 0; i < 3; i++) {
var position = view.size * Point.random();
var placed = symbol.place(position);
}
(function () {
var hamburger = {
navToggle: document.querySelector('.nav-toggle'),
nav: document.querySelector('nav'),
doToggle: function (e) {
e.preventDefault();
this.navToggle.classList.toggle('expanded');
this.nav.classList.toggle('expanded');
}
};
hamburger.navToggle.addEventListener('click', function (e) {
hamburger.doToggle(e);
});
hamburger.nav.addEventListener('click', function (e) {
hamburger.doToggle(e);
});
hamburger.nav.querySelector('#navList').addEventListener('click', function (e) {
e.stopPropagation();
});
}());
</script>
</head>
<body>
<img src="img/mainlogo.svg" id="mainLogo" alt="logo" />
<div class="nav-big">
<h3>
<ul id="navList">
<li><a href="about.html">about+FAQs</a></li>
<li><a href="hack.html">hack</a></li>
<li><a href="speak.html">speak</a></li>
<li><a href="team.html">join</a></li>
<li><a href="sponsor.html">sponsor</a></li>
<li><a href="https://www.dappcon.io/" target="_blank">dAppcon<img class="external-link" src="img/external.svg" alt="external link to dappcon.io"></a></li>
<li><a href="https://medium.com/ethberlin" target="_blank">blog<img class="external-link" src="img/external.svg" alt="external link to ethberlin blog"></a></li>
<hr>
</ul>
</h3>
<div class="nav-second">
<ul id="navList-small">
<li><h7><a href="http://decentralala.com" target="_blank">A Department of Decentralization Hacker Extravaganza<img class="external-link-med" src="img/external.svg" alt="external link to DoD"></a></h7></li>
//
<li><h7>Part of the <a href="https://blockchainweek.berlin/" target="_blank">Berlin Blockchain Week<img class="external-link-med" src="img/external.svg" alt="external link to ethberlin Berlin Blockchain Week"></a></h7></li>
//
<li><h7><a href="https://github.com/Department-of-Decentralization/decentralala.com/blob/master/code-of-conduct.md" target="_blank">code of conduct<img class="external-link-med" src="img/external.svg" alt="external link to code of conduct"></a></h7></li>
//
<li><h7><a href="imprint.html">imprint</a></h7></li>
//
<li><h7><a href="privacy.html">privacy policy</a></h7></li>
//
<li><h7>design inspired by Bauhaus</a></h7></li>
</ul>
</div>
</div>
<div class="nav-mobile">
<div class="nav-toggle">
<div class="nav-toggle-bar">
</div>
</div>
<nav class="nav">
<ul id="navList">
<li><a href="about.html"><h4>about+FAQs</h4></a></li>
<li><a href="hack.html"><h4>hack</h4></a></li>
<li><a href="speak.html"><h4>speak</h4></a></li>
<li><a href="team.html"><h4>join</h4></a></li>
<li><a href="sponsor.html"><h4>sponsor</h4></a></li>
<li><a href="https://www.dappcon.io/" target="_blank"><h4>dAppcon<img class="external-link-small" src="img/external.svg" alt="external link to dappcon.io"></h4></a></li>
<li><a href="https://medium.com/ethberlin" target="_blank"><h4>blog<img class="external-link-small" src="img/external.svg" alt="external link to ethberlin blog"></h4></a></li>
<hr>
<br>
<li><h7><a href="https://decentralala.com" target="_blank">A Department of Decentralization Hacker Extravaganza<img class="external-link-small" src="img/external.svg" alt="external link to DoD"></a></h7></li>
//
<li><h7>Part of the <a href="https://blockchainweek.berlin/" target="_blank">Berlin Blockchain Week<img class="external-link-small" src="img/external.svg" alt="external link to ethberlin Berlin Blockchain Week"></a></h7></li>
//
<li><h7><a href="https://github.com/Department-of-Decentralization/decentralala.com/blob/master/code-of-conduct.md" target="_blank">code of conduct<img class="external-link-small" src="img/external.svg" alt="external link to code of conduct"></a></h7></li>
//
<li><h7><a href="imprint.html">imprint</a></h7></li>
//
<li><h7>design inspired by Bauhaus</a></h7></li>
</ul>
</nav>
</div>
<div class="main-subtext">
<div class="subtext">
<h4><strong>Hackathon:</strong> 23-25.08.19, Factory Görlitzer Park</h4>
<h4><strong>Conference & Workshops:</strong> 21-22.08.19 at dAppcon (Technical University of Berlin)</h4>
</div>
<!-- <div class="instructionText">
<p>click and drag to make your own pattern <img src="img/cursor.png" class="cursor" style="width: 1rem">
</p>
</div> -->
</div>
<canvas id="canvas" style="background-color: rgb(255, 251, 239)" resize></canvas>
</body>
</html>