Skip to content

Commit 4ffdf40

Browse files
committed
revert examples to plain pre block, no codemirror
1 parent 1fadc48 commit 4ffdf40

162 files changed

Lines changed: 323 additions & 3077 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/acceleration-with-vectors.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h1>Acceleration With Vectors</h1>
122122
<span>acceleration-with-vectors.pde</span>
123123
<button class="copy-btn" onclick="copyCode()">Copy</button>
124124
</div>
125-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
125+
<pre id="code-pre">/**
126126
* Acceleration with Vectors
127127
* by Daniel Shiffman.
128128
*
@@ -147,24 +147,7 @@ <h1>Acceleration With Vectors</h1>
147147
// Display the Mover
148148
mover-&gt;display();
149149
}
150-
</textarea>
151-
</div>
152-
<script>
153-
(function(){
154-
var ta = document.getElementById('code-pre');
155-
var cm = CodeMirror.fromTextArea(ta, {
156-
mode: 'cppmode',
157-
theme: 'cppmode',
158-
readOnly: true,
159-
lineNumbers: false,
160-
lineWrapping: false,
161-
viewportMargin: Infinity,
162-
});
163-
cm.getWrapperElement().style.fontSize = '13px';
164-
cm.getWrapperElement().style.lineHeight = '1.6';
165-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
166-
})();
167-
</script>
150+
</pre>
168151
</div>
169152
</div>
170153
<footer>

examples/additive-wave.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h1>Additive Wave</h1>
150150
<span>additive-wave.pde</span>
151151
<button class="copy-btn" onclick="copyCode()">Copy</button>
152152
</div>
153-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
153+
<pre id="code-pre">/**
154154
* Additive Wave
155155
* by Daniel Shiffman.
156156
*
@@ -208,24 +208,7 @@ <h1>Additive Wave</h1>
208208
calcWave();
209209
renderWave();
210210
}
211-
</textarea>
212-
</div>
213-
<script>
214-
(function(){
215-
var ta = document.getElementById('code-pre');
216-
var cm = CodeMirror.fromTextArea(ta, {
217-
mode: 'cppmode',
218-
theme: 'cppmode',
219-
readOnly: true,
220-
lineNumbers: false,
221-
lineWrapping: false,
222-
viewportMargin: Infinity,
223-
});
224-
cm.getWrapperElement().style.fontSize = '13px';
225-
cm.getWrapperElement().style.lineHeight = '1.6';
226-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
227-
})();
228-
</script>
211+
</pre>
229212
</div>
230213
</div>
231214
<footer>

examples/alpha-mask.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h1>Alpha Mask</h1>
9797
<span>alpha-mask.pde</span>
9898
<button class="copy-btn" onclick="copyCode()">Copy</button>
9999
</div>
100-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
100+
<pre id="code-pre">/**
101101
* Alpha Mask.
102102
*
103103
* Loads a "mask" for an image to specify the transparency
@@ -125,24 +125,7 @@ <h1>Alpha Mask</h1>
125125
image(img, width / 2, height / 2);
126126
image(img, mouseX, mouseY);
127127
}
128-
</textarea>
129-
</div>
130-
<script>
131-
(function(){
132-
var ta = document.getElementById('code-pre');
133-
var cm = CodeMirror.fromTextArea(ta, {
134-
mode: 'cppmode',
135-
theme: 'cppmode',
136-
readOnly: true,
137-
lineNumbers: false,
138-
lineWrapping: false,
139-
viewportMargin: Infinity,
140-
});
141-
cm.getWrapperElement().style.fontSize = '13px';
142-
cm.getWrapperElement().style.lineHeight = '1.6';
143-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
144-
})();
145-
</script>
128+
</pre>
146129
</div>
147130
</div>
148131
<footer>

examples/animated-sprite.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h1>Animated Sprite</h1>
125125
<span>animated-sprite.pde</span>
126126
<button class="copy-btn" onclick="copyCode()">Copy</button>
127127
</div>
128-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
128+
<pre id="code-pre">/**
129129
* Animated Sprite (Shifty + Teddy)
130130
* by James Paterson.
131131
* Translated to C++ Mode.
@@ -179,24 +179,7 @@ <h1>Animated Sprite</h1>
179179
animation2-&gt;display(xpos - animation2-&gt;getWidth() / 2, ypos);
180180
}
181181
}
182-
</textarea>
183-
</div>
184-
<script>
185-
(function(){
186-
var ta = document.getElementById('code-pre');
187-
var cm = CodeMirror.fromTextArea(ta, {
188-
mode: 'cppmode',
189-
theme: 'cppmode',
190-
readOnly: true,
191-
lineNumbers: false,
192-
lineWrapping: false,
193-
viewportMargin: Infinity,
194-
});
195-
cm.getWrapperElement().style.fontSize = '13px';
196-
cm.getWrapperElement().style.lineHeight = '1.6';
197-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
198-
})();
199-
</script>
182+
</pre>
200183
</div>
201184
</div>
202185
<footer>

examples/arctangent.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1>Arctangent</h1>
130130
<span>arctangent.pde</span>
131131
<button class="copy-btn" onclick="copyCode()">Copy</button>
132132
</div>
133-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
133+
<pre id="code-pre">/**
134134
* Arctangent.
135135
*
136136
* Move the mouse to change the direction of the eyes.
@@ -174,24 +174,7 @@ <h1>Arctangent</h1>
174174
e2.update(mouseX, mouseY); e2.display();
175175
e3.update(mouseX, mouseY); e3.display();
176176
}
177-
</textarea>
178-
</div>
179-
<script>
180-
(function(){
181-
var ta = document.getElementById('code-pre');
182-
var cm = CodeMirror.fromTextArea(ta, {
183-
mode: 'cppmode',
184-
theme: 'cppmode',
185-
readOnly: true,
186-
lineNumbers: false,
187-
lineWrapping: false,
188-
viewportMargin: Infinity,
189-
});
190-
cm.getWrapperElement().style.fontSize = '13px';
191-
cm.getWrapperElement().style.lineHeight = '1.6';
192-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
193-
})();
194-
</script>
177+
</pre>
195178
</div>
196179
</div>
197180
<footer>

examples/arm.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ <h1>Arm</h1>
107107
<span>arm.pde</span>
108108
<button class="copy-btn" onclick="copyCode()">Copy</button>
109109
</div>
110-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
110+
<pre id="code-pre">/**
111111
* Arm.
112112
*
113113
* The angle of each segment is controlled with the mouseX and
@@ -148,24 +148,7 @@ <h1>Arm</h1>
148148
rotate(a);
149149
line(0, 0, segLength, 0);
150150
}
151-
</textarea>
152-
</div>
153-
<script>
154-
(function(){
155-
var ta = document.getElementById('code-pre');
156-
var cm = CodeMirror.fromTextArea(ta, {
157-
mode: 'cppmode',
158-
theme: 'cppmode',
159-
readOnly: true,
160-
lineNumbers: false,
161-
lineWrapping: false,
162-
viewportMargin: Infinity,
163-
});
164-
cm.getWrapperElement().style.fontSize = '13px';
165-
cm.getWrapperElement().style.lineHeight = '1.6';
166-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
167-
})();
168-
</script>
151+
</pre>
169152
</div>
170153
</div>
171154
<footer>

examples/array-2d.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ <h1>Array 2D</h1>
106106
<span>array-2d.pde</span>
107107
<button class="copy-btn" onclick="copyCode()">Copy</button>
108108
</div>
109-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
109+
<pre id="code-pre">/**
110110
* Array 2D.
111111
*
112112
* Demonstrates the syntax for creating a two-dimensional (2D) array.
@@ -143,24 +143,7 @@ <h1>Array 2D</h1>
143143
}
144144
}
145145
}
146-
</textarea>
147-
</div>
148-
<script>
149-
(function(){
150-
var ta = document.getElementById('code-pre');
151-
var cm = CodeMirror.fromTextArea(ta, {
152-
mode: 'cppmode',
153-
theme: 'cppmode',
154-
readOnly: true,
155-
lineNumbers: false,
156-
lineWrapping: false,
157-
viewportMargin: Infinity,
158-
});
159-
cm.getWrapperElement().style.fontSize = '13px';
160-
cm.getWrapperElement().style.lineHeight = '1.6';
161-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
162-
})();
163-
</script>
146+
</pre>
164147
</div>
165148
</div>
166149
<footer>

examples/array-objects.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ <h1>Array Objects</h1>
146146
<span>array-objects.pde</span>
147147
<button class="copy-btn" onclick="copyCode()">Copy</button>
148148
</div>
149-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
149+
<pre id="code-pre">/**
150150
* Array Objects.
151151
*
152152
* Demonstrates the syntax for creating an array of custom objects.
@@ -210,24 +210,7 @@ <h1>Array Objects</h1>
210210
mods[i].display();
211211
}
212212
}
213-
</textarea>
214-
</div>
215-
<script>
216-
(function(){
217-
var ta = document.getElementById('code-pre');
218-
var cm = CodeMirror.fromTextArea(ta, {
219-
mode: 'cppmode',
220-
theme: 'cppmode',
221-
readOnly: true,
222-
lineNumbers: false,
223-
lineWrapping: false,
224-
viewportMargin: Infinity,
225-
});
226-
cm.getWrapperElement().style.fontSize = '13px';
227-
cm.getWrapperElement().style.lineHeight = '1.6';
228-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
229-
})();
230-
</script>
213+
</pre>
231214
</div>
232215
</div>
233216
<footer>

examples/array.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h1>Array</h1>
114114
<span>array.pde</span>
115115
<button class="copy-btn" onclick="copyCode()">Copy</button>
116116
</div>
117-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">/**
117+
<pre id="code-pre">/**
118118
* Array.
119119
*
120120
* An array is a list of data. Each piece of data in an array
@@ -159,24 +159,7 @@ <h1>Array</h1>
159159
line(i, y1, i, y2);
160160
}
161161
}
162-
</textarea>
163-
</div>
164-
<script>
165-
(function(){
166-
var ta = document.getElementById('code-pre');
167-
var cm = CodeMirror.fromTextArea(ta, {
168-
mode: 'cppmode',
169-
theme: 'cppmode',
170-
readOnly: true,
171-
lineNumbers: false,
172-
lineWrapping: false,
173-
viewportMargin: Infinity,
174-
});
175-
cm.getWrapperElement().style.fontSize = '13px';
176-
cm.getWrapperElement().style.lineHeight = '1.6';
177-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
178-
})();
179-
</script>
162+
</pre>
180163
</div>
181164
</div>
182165
<footer>

examples/arraylist-of-objects.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h1>ArrayList of objects</h1>
126126
<span>arraylist-of-objects.pde</span>
127127
<button class="copy-btn" onclick="copyCode()">Copy</button>
128128
</div>
129-
<textarea id="code-pre" style="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;">class Ball {
129+
<pre id="code-pre">class Ball {
130130
public:
131131
float x;
132132
float y;
@@ -181,24 +181,7 @@ <h1>ArrayList of objects</h1>
181181
void mousePressed() {
182182
balls.add(new Ball(mouseX, mouseY, ballWidth));
183183
}
184-
</textarea>
185-
</div>
186-
<script>
187-
(function(){
188-
var ta = document.getElementById('code-pre');
189-
var cm = CodeMirror.fromTextArea(ta, {
190-
mode: 'cppmode',
191-
theme: 'cppmode',
192-
readOnly: true,
193-
lineNumbers: false,
194-
lineWrapping: false,
195-
viewportMargin: Infinity,
196-
});
197-
cm.getWrapperElement().style.fontSize = '13px';
198-
cm.getWrapperElement().style.lineHeight = '1.6';
199-
cm.getWrapperElement().style.borderRadius = '0 0 8px 8px';
200-
})();
201-
</script>
184+
</pre>
202185
</div>
203186
</div>
204187
<footer>

0 commit comments

Comments
 (0)