Skip to content

Commit 18a74f2

Browse files
committed
minor
1 parent 5401678 commit 18a74f2

11 files changed

Lines changed: 32 additions & 6 deletions

File tree

assets/clipart/ball.gif

-1.08 KB
Binary file not shown.

assets/clipart/ball.png

-2.18 KB
Binary file not shown.

assets/clipart/ball.svg

Lines changed: 12 additions & 0 deletions
Loading

assets/drag-heroes/heroes.png

30.2 KB
Loading

assets/drag-heroes/winnie.png

-5.26 KB
Binary file not shown.

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ gulp.task('build', function(callback) {
139139

140140
gulp.task('server', lazyRequireTask('./tasks/server'));
141141

142-
gulp.task('edit', ['build', 'tutorial:import:watch', 'client:livereload', 'server']);
142+
gulp.task('edit', ['build', 'tutorial:import:watch', "client:sync-resources", 'client:livereload', 'server']);
143143

144144
gulp.task('dev', function(callback) {
145145
runSequence("client:sync-resources", 'client:compile-css', 'client:sync-css-images', ['nodemon', 'client:livereload', 'client:webpack', 'watch'], callback);

modules/serverHtmlTransformer/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ ServerHtmlTransformer.prototype.transformImgTag = function*(node) {
171171
throw new ParseError("div", "Неподдерживамое расширение, должно оканчиваться на png/jpg/gif/jpeg/svg: " + node.attrs.src);
172172
}
173173

174-
if (~node.attrs.src.indexOf('://')) {
174+
// external srcs go "as is"
175+
if (~node.attrs.src.indexOf('://') || node.attrs.src.startsWith('//')) {
175176
return HtmlTransformer.prototype.transformImgTag.call(this, node);
176177
}
177178

@@ -232,11 +233,14 @@ ServerHtmlTransformer.prototype.transformCodeTabsTag = function* (node) {
232233
throw new ParseError('div', 'No such plunk');
233234
}
234235

236+
if (this.isEbook) {
237+
return '<p><a href="http://plnkr.co/edit/' + plunk.plunkId + '?p=preview">Открыть пример в интернете</a></p>';
238+
}
239+
235240
var files = plunk.files;
236241

237242
var tabs = [];
238243

239-
240244
var prismLanguageMap = {
241245
html: 'markup',
242246
js: 'javascript',

modules/serverHtmlTransformer/templates/codeTabs.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ include /bem
1717
// not implemented yet (think again when node.js)
1818
+e('a').button._download(target="_blank", href=zip.url)
1919
if edit
20-
+e('a').button._open(target="_blank", href=edit.href)
20+
+e('a').button._edit(target="_blank", href=edit.href)
2121
+e.content(data-code-tabs-content style=('height:' + height + 'px'))
2222
+e.section._current
2323
//- assigning an attribute to false removes the attribute

modules/simpledownParser/transformer/htmlTransformer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ HtmlTransformer.prototype.transformLinkTag = function(node) {
219219

220220
// on this stage the tag either contains this.src OR the resolved text
221221
HtmlTransformer.prototype.transformCodeTabsTag = function(node) {
222+
222223
var text = 'Пример ' + node.attrs.src;
223224

224225
return this.wrapTagAround('div', {}, text);

scripts/updateRemoteTutorial.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
rm -rf dump &&
3+
mongodump -d js -c tasks &&
4+
mongodump -d js -c plunks &&
5+
mongodump -d js -c articles &&
6+
ssh nightly 'rm -rf dump' &&
7+
scp -r -C dump nightly: &&
8+
ssh nightly 'mongorestore --drop' &&
9+
echo "Tutorial updated"

0 commit comments

Comments
 (0)