-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
319 lines (285 loc) · 11.1 KB
/
Copy pathindex.html
File metadata and controls
319 lines (285 loc) · 11.1 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Processing for C++</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.0/p5.min.js"></script>
<style>
@font-face {
font-family: "ProcessingSans";
src: url("/assets/ProcessingSansPro-Regular.ttf") format("truetype");
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #111; background: #fff; }
a { color: #111; text-decoration: none; }
/* Nav: matches all other pages via nav.js injection */
#site-nav {
border-bottom: 1px solid #e0e0e0;
padding: 0 2rem;
display: flex; align-items: center; justify-content: space-between;
height: 60px; position: sticky; top: 0; background: #fff; z-index: 100;
}
.layout { display: flex; min-height: calc(100vh - 60px); }
/* Sidebar: matches other pages exactly */
.sidebar {
width: 220px;
min-width: 220px;
border-right: 1px solid #e0e0e0;
padding: 1.5rem 1.5rem 1rem;
display: flex;
flex-direction: column;
position: sticky;
top: 60px;
height: calc(100vh - 60px);
background: #fff;
}
.sidebar a {
font-size: 14px;
color: #555;
padding: 0.4rem 0;
display: block;
}
.sidebar a:hover { color: #111; }
.sidebar a.active { color: #111; font-weight: 500; }
.page-body { flex: 1; overflow-x: hidden; }
/* Hero */
.main {
height: calc(100vh - 60px);
display: flex;
align-items: center;
padding: 0 5rem;
gap: 4rem;
position: relative;
}
.left { flex: 1; }
.left h1 {
font-size: 2.6rem;
font-weight: 600;
letter-spacing: -0.02em;
line-height: 1.2;
margin-bottom: 1.5rem;
}
.left h1 .proc {
font-family: "ProcessingSans", sans-serif;
color: #003f6b;
font-weight: 400;
}
.left p { font-size: 1rem; color: #555; }
.left p a { color: #111; border-bottom: 1px solid #111; font-weight: 500; }
.right { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.right img { width: 340px; height: 340px; object-fit: contain; }
/* Arrow: positioned inside .main so it's always visible above the fold */
.scroll-hint {
position: absolute;
bottom: 1.5rem;
left: 50%;
transform: translateX(-50%);
color: #bbb;
font-size: 22px;
animation: bounce 1.8s infinite;
}
@keyframes bounce {
0%, 100% { transform: translateX(-50%) translateY(0); }
50% { transform: translateX(-50%) translateY(6px); }
}
/* Examples section */
.examples-section {
max-width: 960px;
margin: 0 auto;
padding: 5rem 3rem;
border-top: 1px solid #e0e0e0;
}
.examples-section h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 2.5rem; }
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1px;
border: 1px solid #e0e0e0;
border-radius: 8px;
overflow: hidden;
}
.example-card { background: #fff; overflow: hidden; }
.example-canvas { width: 100%; aspect-ratio: 1; background: #000; display: block; }
.example-info { padding: 1rem 1.25rem; border-top: 1px solid #e0e0e0; }
.example-info h3 { font-size: 14px; font-weight: 500; margin-bottom: 0.2rem; }
.example-info p { font-size: 12px; color: #888; }
.examples-footer { padding: 3rem; text-align: center; }
.examples-footer a { font-size: 14px; color: #555; border-bottom: 1px solid #ddd; padding-bottom: 2px; }
.examples-footer a:hover { color: #111; border-color: #111; }
.getting-started-section {
max-width: 960px;
margin: 0 auto;
padding: 1rem 3rem 5rem;
}
.getting-started-section h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; }
.gs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.gs-card { border: 1px solid #e0e0e0; border-radius: 10px; padding: 1.5rem; }
.gs-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.gs-card p { font-size: 13px; color: #777; line-height: 1.6; margin-bottom: 1rem; }
.gs-card-link { font-size: 13px; font-weight: 600; color: #111; }
.gs-card-link:hover { color: #e8b400; }
/* Hero actions: Reference link + single Download button */
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.hero-link { font-size: 14px; font-weight: 600; border-bottom: 1px solid #ccc; padding-bottom: 2px; }
.hero-link:hover { border-bottom-color: #111; }
.hero-btn-download {
display: inline-block;
background: #e8b400;
color: #111;
font-size: 14px;
font-weight: 700;
padding: 0.65rem 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 0 rgba(0,0,0,0.08);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-btn-download:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(232,180,0,0.35); }
@media (max-width: 768px) {
.hero-actions { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
}
footer { border-top: 1px solid #e0e0e0; padding: 2rem; text-align: center; font-size: 13px; color: #888; }
@media (max-width: 768px) {
.sidebar {
position: fixed; top: 60px; left: -240px;
width: 240px; height: calc(100vh - 60px);
z-index: 200; transition: left 0.25s ease;
box-shadow: 2px 0 12px rgba(0,0,0,0.08);
}
.sidebar.open { left: 0; }
.main { flex-direction: column; padding: 3rem 2rem; height: auto; gap: 2rem; }
.right img { width: 180px; height: 180px; }
.scroll-hint { position: static; transform: none; display: block; text-align: center; padding: 1rem 0; animation: none; }
}
</style>
</head>
<body>
<nav id="site-nav"></nav>
<div class="layout">
<div class="sidebar" id="sidebar"></div>
<div class="page-body">
<div class="main">
<div class="left">
<h1>C++ Mode for<br><span class="proc">Processing</span></h1>
<div class="hero-actions">
<a class="hero-link" href="/reference">Reference</a>
<a class="hero-btn-download" href="/downloads">Download</a>
</div>
<p style="margin-top:10rem;font-size:0.85rem;color:#aaa;">Independently developed by Jose Llamas</p>
</div>
<div class="right">
<img src="assets/cpp-logo.png" alt="Processing for C++">
</div>
<div class="scroll-hint">↓</div>
</div>
<div class="examples-section">
<h2>Examples</h2>
<div class="examples-grid">
<div class="example-card">
<iframe class="example-canvas" id="c1" width="300" height="300" style="width:100%;aspect-ratio:1;border:none;display:block;background:#000;" scrolling="no"></iframe><script>(function(){const iframe=document.getElementById('c1');const doc=iframe.contentDocument||iframe.contentWindow.document;doc.open();doc.write(`<!DOCTYPE html><html><head><style>*{margin:0;padding:0;}body{overflow:hidden;}</style><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.0/p5.min.js"><\/script></head><body><script>let y = 180;
function setup() {
createCanvas(300,300);
stroke(255);
noLoop();
}
function draw() {
background(0);
line(0, y, width, y);
y = y - 1;
if (y < 0) {
y = height;
}
}<\/script></body></html>`);doc.close();})();</script>
<div class="example-info"><h3>No Loop</h3><p>Structure example</p></div>
</div>
<div class="example-card">
<iframe class="example-canvas" id="c2" width="300" height="300" style="width:100%;aspect-ratio:1;border:none;display:block;background:#000;" scrolling="no"></iframe><script>(function(){const iframe=document.getElementById('c2');const doc=iframe.contentDocument||iframe.contentWindow.document;doc.open();doc.write(`<!DOCTYPE html><html><head><style>*{margin:0;padding:0;}body{overflow:hidden;}</style><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.0/p5.min.js"><\/script></head><body><script>function setup() {
createCanvas(300,300, WEBGL);
noStroke();
}
function draw() {
defineLights();
background(0);
for (let x = 0; x <= width; x += 60) {
for (let y = 0; y <= height; y += 60) {
push();
translate(
x - width / 2,
y - height / 2,
0
);
rotateY(map(mouseX, 0, width, 0, PI));
rotateX(map(mouseY, 0, height, 0, PI));
box(90);
pop();
}
}
}
function defineLights() {
pointLight(150, 100, 0, 200, -150, 0);
directionalLight(0, 102, 255, 1, 0, 0);
spotLight(
255,
255,
109,
0,
40,
200,
0,
-0.5,
-0.5,
PI / 2,
2
);
}<\/script></body></html>`);doc.close();})();</script>
<div class="example-info"><h3>Mixture Grid</h3><p>Lights example</p></div>
</div>
<div class="example-card">
<iframe class="example-canvas" id="c3" width="300" height="300" style="width:100%;aspect-ratio:1;border:none;display:block;background:#000;" scrolling="no"></iframe><script>(function(){const iframe=document.getElementById('c3');const doc=iframe.contentDocument||iframe.contentWindow.document;doc.open();doc.write(`<!DOCTYPE html><html><head><style>*{margin:0;padding:0;}body{overflow:hidden;}</style><script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.0/p5.min.js"><\/script></head><body><script>function setup() {
createCanvas(300,300);
background(0);
strokeWeight(20);
frameRate(2);
}
function draw() {
for (let i = 0; i < width; i++) {
let r = random(255);
stroke(r);
line(i, 0, i, height);
}
}<\/script></body></html>`);doc.close();})();</script>
<div class="example-info"><h3>Random</h3><p>Math example</p></div>
</div>
</div>
<div class="examples-footer">
<a href="/examples">View all examples →</a>
</div>
</div>
<div class="getting-started-section">
<h2>Getting Started</h2>
<div class="gs-cards">
<div class="gs-card">
<h3>Looking for the C++ Mode?</h3>
<p>Install C++ Mode straight from the Processing IDE's Contribution Manager. No separate download needed.</p>
<a class="gs-card-link" href="/downloads#cpp-mode">See how →</a>
</div>
<div class="gs-card">
<h3>Download the headers</h3>
<p>Using your own editor and build system? Drop the engine into your project as a drag-and-drop folder or a CMake target.</p>
<a class="gs-card-link" href="/downloads">Go to downloads →</a>
</div>
<div class="gs-card">
<h3>New to C++ Mode?</h3>
<p>Walk through creating your first sketch, from opening Processing to seeing something on screen.</p>
<a class="gs-card-link" href="/gettingstarted">Getting started tutorial →</a>
</div>
</div>
</div>
</div>
</div>
<footer>
<p>Processing for C++</p>
</footer>
<script src="./assets/nav.js"></script>
</body>
</html>