Skip to content

Commit 2535117

Browse files
committed
reworked how the examples work"
1 parent 46a7b3f commit 2535117

File tree

7 files changed

+678
-531
lines changed

7 files changed

+678
-531
lines changed

deck/deck.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deck/deck.less

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ section {
151151
font-size: 16px;
152152
padding: 4px 4px;
153153
resize: none;
154+
outline: none;
155+
white-space: pre;
154156

155157
&.init {
156158
display: none;

deck/slide_maker.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
.replace(/\s*}\s*$/, '')
1111
.split('\n');
1212

13+
lines = lines.map(function(line) { return line.replace(/ *$/, ''); });
14+
1315
// remove common pre-space
1416
var minSpace = d3.min(lines.map(function(line) {
1517
return line ? line.match(/^\s*/)[0].length : Infinity;
@@ -18,6 +20,7 @@
1820
lines = lines.map(function(line) { return line.substr(minSpace); })
1921
}
2022

23+
console.log(lines.join('\n'))
2124
return lines.join('\n');
2225
}
2326

@@ -67,7 +70,8 @@
6770
}
6871

6972
codeText = codes.append('textarea')
70-
.attr('class', 'code')
73+
.attr('class', 'code')
74+
.attr('placeholder', 'JavaScript goes in here...')
7175
.property('value', fn_to_string(code))
7276
.on('keydown', function() {
7377
// Run if command + enter

0 commit comments

Comments
 (0)