simditor 2.1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,266 @@
1
+ (function (root, factory) {
2
+ if (typeof define === 'function' && define.amd) {
3
+ // AMD. Register as an anonymous module.
4
+ define('simple-uploader', ["jquery",
5
+ "simple-module"], function ($, SimpleModule) {
6
+ return (root.returnExportsGlobal = factory($, SimpleModule));
7
+ });
8
+ } else if (typeof exports === 'object') {
9
+ // Node. Does not work with strict CommonJS, but
10
+ // only CommonJS-like enviroments that support module.exports,
11
+ // like Node.
12
+ module.exports = factory(require("jquery"),
13
+ require("simple-module"));
14
+ } else {
15
+ root.simple = root.simple || {};
16
+ root.simple['uploader'] = factory(jQuery,
17
+ SimpleModule);
18
+ }
19
+ }(this, function ($, SimpleModule) {
20
+
21
+ var Uploader, uploader,
22
+ __hasProp = {}.hasOwnProperty,
23
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
24
+
25
+ Uploader = (function(_super) {
26
+ __extends(Uploader, _super);
27
+
28
+ function Uploader() {
29
+ return Uploader.__super__.constructor.apply(this, arguments);
30
+ }
31
+
32
+ Uploader.count = 0;
33
+
34
+ Uploader.prototype.opts = {
35
+ url: '',
36
+ params: null,
37
+ fileKey: 'upload_file',
38
+ connectionCount: 3
39
+ };
40
+
41
+ Uploader.prototype._init = function() {
42
+ this.files = [];
43
+ this.queue = [];
44
+ this.id = ++Uploader.count;
45
+ this.on('uploadcomplete', (function(_this) {
46
+ return function(e, file) {
47
+ _this.files.splice($.inArray(file, _this.files), 1);
48
+ if (_this.queue.length > 0 && _this.files.length < _this.opts.connectionCount) {
49
+ return _this.upload(_this.queue.shift());
50
+ } else {
51
+ return _this.uploading = false;
52
+ }
53
+ };
54
+ })(this));
55
+ return $(window).on('beforeunload.uploader-' + this.id, (function(_this) {
56
+ return function(e) {
57
+ if (!_this.uploading) {
58
+ return;
59
+ }
60
+ e.originalEvent.returnValue = _this._t('leaveConfirm');
61
+ return _this._t('leaveConfirm');
62
+ };
63
+ })(this));
64
+ };
65
+
66
+ Uploader.prototype.generateId = (function() {
67
+ var id;
68
+ id = 0;
69
+ return function() {
70
+ return id += 1;
71
+ };
72
+ })();
73
+
74
+ Uploader.prototype.upload = function(file, opts) {
75
+ var f, key, _i, _len;
76
+ if (opts == null) {
77
+ opts = {};
78
+ }
79
+ if (file == null) {
80
+ return;
81
+ }
82
+ if ($.isArray(file) || file instanceof FileList) {
83
+ for (_i = 0, _len = file.length; _i < _len; _i++) {
84
+ f = file[_i];
85
+ this.upload(f, opts);
86
+ }
87
+ } else if ($(file).is('input:file')) {
88
+ key = $(file).attr('name');
89
+ if (key) {
90
+ opts.fileKey = key;
91
+ }
92
+ this.upload($.makeArray($(file)[0].files), opts);
93
+ } else if (!file.id || !file.obj) {
94
+ file = this.getFile(file);
95
+ }
96
+ if (!(file && file.obj)) {
97
+ return;
98
+ }
99
+ $.extend(file, opts);
100
+ if (this.files.length >= this.opts.connectionCount) {
101
+ this.queue.push(file);
102
+ return;
103
+ }
104
+ if (this.triggerHandler('beforeupload', [file]) === false) {
105
+ return;
106
+ }
107
+ this.files.push(file);
108
+ this._xhrUpload(file);
109
+ return this.uploading = true;
110
+ };
111
+
112
+ Uploader.prototype.getFile = function(fileObj) {
113
+ var name, _ref, _ref1;
114
+ if (fileObj instanceof window.File || fileObj instanceof window.Blob) {
115
+ name = (_ref = fileObj.fileName) != null ? _ref : fileObj.name;
116
+ } else {
117
+ return null;
118
+ }
119
+ return {
120
+ id: this.generateId(),
121
+ url: this.opts.url,
122
+ params: this.opts.params,
123
+ fileKey: this.opts.fileKey,
124
+ name: name,
125
+ size: (_ref1 = fileObj.fileSize) != null ? _ref1 : fileObj.size,
126
+ ext: name ? name.split('.').pop().toLowerCase() : '',
127
+ obj: fileObj
128
+ };
129
+ };
130
+
131
+ Uploader.prototype._xhrUpload = function(file) {
132
+ var formData, k, v, _ref;
133
+ formData = new FormData();
134
+ formData.append(file.fileKey, file.obj);
135
+ formData.append("original_filename", file.name);
136
+ if (file.params) {
137
+ _ref = file.params;
138
+ for (k in _ref) {
139
+ v = _ref[k];
140
+ formData.append(k, v);
141
+ }
142
+ }
143
+ return file.xhr = $.ajax({
144
+ url: file.url,
145
+ data: formData,
146
+ processData: false,
147
+ contentType: false,
148
+ type: 'POST',
149
+ headers: {
150
+ 'X-File-Name': encodeURIComponent(file.name)
151
+ },
152
+ xhr: function() {
153
+ var req;
154
+ req = $.ajaxSettings.xhr();
155
+ if (req) {
156
+ req.upload.onprogress = (function(_this) {
157
+ return function(e) {
158
+ return _this.progress(e);
159
+ };
160
+ })(this);
161
+ }
162
+ return req;
163
+ },
164
+ progress: (function(_this) {
165
+ return function(e) {
166
+ if (!e.lengthComputable) {
167
+ return;
168
+ }
169
+ return _this.trigger('uploadprogress', [file, e.loaded, e.total]);
170
+ };
171
+ })(this),
172
+ error: (function(_this) {
173
+ return function(xhr, status, err) {
174
+ return _this.trigger('uploaderror', [file, xhr, status]);
175
+ };
176
+ })(this),
177
+ success: (function(_this) {
178
+ return function(result) {
179
+ _this.trigger('uploadprogress', [file, file.size, file.size]);
180
+ _this.trigger('uploadsuccess', [file, result]);
181
+ return $(document).trigger('uploadsuccess', [file, result, _this]);
182
+ };
183
+ })(this),
184
+ complete: (function(_this) {
185
+ return function(xhr, status) {
186
+ return _this.trigger('uploadcomplete', [file, xhr.responseText]);
187
+ };
188
+ })(this)
189
+ });
190
+ };
191
+
192
+ Uploader.prototype.cancel = function(file) {
193
+ var f, _i, _len, _ref;
194
+ if (!file.id) {
195
+ _ref = this.files;
196
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
197
+ f = _ref[_i];
198
+ if (f.id === file * 1) {
199
+ file = f;
200
+ break;
201
+ }
202
+ }
203
+ }
204
+ this.trigger('uploadcancel', [file]);
205
+ if (file.xhr) {
206
+ file.xhr.abort();
207
+ }
208
+ return file.xhr = null;
209
+ };
210
+
211
+ Uploader.prototype.readImageFile = function(fileObj, callback) {
212
+ var fileReader, img;
213
+ if (!$.isFunction(callback)) {
214
+ return;
215
+ }
216
+ img = new Image();
217
+ img.onload = function() {
218
+ return callback(img);
219
+ };
220
+ img.onerror = function() {
221
+ return callback();
222
+ };
223
+ if (window.FileReader && FileReader.prototype.readAsDataURL && /^image/.test(fileObj.type)) {
224
+ fileReader = new FileReader();
225
+ fileReader.onload = function(e) {
226
+ return img.src = e.target.result;
227
+ };
228
+ return fileReader.readAsDataURL(fileObj);
229
+ } else {
230
+ return callback();
231
+ }
232
+ };
233
+
234
+ Uploader.prototype.destroy = function() {
235
+ var file, _i, _len, _ref;
236
+ this.queue.length = 0;
237
+ _ref = this.files;
238
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
239
+ file = _ref[_i];
240
+ this.cancel(file);
241
+ }
242
+ $(window).off('.uploader-' + this.id);
243
+ return $(document).off('.uploader-' + this.id);
244
+ };
245
+
246
+ Uploader.i18n = {
247
+ 'zh-CN': {
248
+ leaveConfirm: '正在上传文件,如果离开上传会自动取消'
249
+ }
250
+ };
251
+
252
+ Uploader.locale = 'zh-CN';
253
+
254
+ return Uploader;
255
+
256
+ })(SimpleModule);
257
+
258
+ uploader = function(opts) {
259
+ return new Uploader(opts);
260
+ };
261
+
262
+ return uploader;
263
+
264
+ }));
265
+
266
+
@@ -0,0 +1,4 @@
1
+ @charset "UTF-8";
2
+
3
+ @import 'simditor/fonticon';
4
+ @import 'simditor/editor';
@@ -0,0 +1,681 @@
1
+ @charset "UTF-8";
2
+
3
+ $simditor-button-height: 40px;
4
+
5
+ .simditor {
6
+ position: relative;
7
+ border: 1px solid #c9d8db;
8
+
9
+ textarea {
10
+ display: none !important;
11
+ width: 100%;
12
+ box-sizing: border-box;
13
+ font-family: monaco;
14
+ font-size: 16px;
15
+ line-height: 1.6;
16
+ border: none;
17
+ padding: 22px 15px 40px;
18
+ min-height: 300px;
19
+ outline: none;
20
+ background: transparent;
21
+ resize: none;
22
+ }
23
+
24
+ &.simditor-source-mode {
25
+ textarea {
26
+ display: block !important;
27
+ }
28
+
29
+ .simditor-body {
30
+ display: none;
31
+ }
32
+ }
33
+
34
+ .simditor-wrapper {
35
+ position: relative;
36
+ background: #ffffff;
37
+ overflow: hidden;
38
+
39
+ .simditor-placeholder {
40
+ display: none;
41
+ position: absolute;
42
+ left: 0;
43
+ z-index: 0;
44
+ padding: 22px 15px;
45
+ font-size: 16px;
46
+ font-family: arial, sans-serif;
47
+ line-height: 1.5;
48
+ color: #999999;
49
+ background: transparent;
50
+ }
51
+
52
+ &.toolbar-floating {
53
+ .simditor-toolbar {
54
+ position: fixed;
55
+ top: 0;
56
+ z-index: 10;
57
+ box-shadow: 0 0 6px rgba(0,0,0,0.1);
58
+ }
59
+ }
60
+
61
+ .simditor-image-loading {
62
+ width: 100%;
63
+ height: 100%;
64
+ position: absolute;
65
+ top: 0;
66
+ left: 0;
67
+ z-index: 2;
68
+
69
+ .progress {
70
+ width: 100%;
71
+ height: 100%;
72
+ background: rgba(0,0,0,0.4);
73
+ position: absolute;
74
+ bottom: 0;
75
+ left: 0;
76
+ }
77
+ }
78
+ }
79
+
80
+ .simditor-body {
81
+ padding: 22px 15px 40px;
82
+ min-height: 300px;
83
+ outline: none;
84
+ cursor: text;
85
+ position: relative;
86
+ z-index: 1;
87
+ background: transparent;
88
+
89
+ a.selected {
90
+ background: #b3d4fd;
91
+ }
92
+
93
+ a.simditor-mention {
94
+ cursor: pointer;
95
+ }
96
+
97
+ .simditor-table {
98
+ position: relative;
99
+
100
+ &.resizing {
101
+ cursor: col-resize;
102
+ }
103
+
104
+ .simditor-resize-handle {
105
+ position: absolute;
106
+ left: 0;
107
+ top: 0;
108
+ width: 10px;
109
+ height: 100%;
110
+ cursor: col-resize;
111
+ }
112
+ }
113
+
114
+ pre {
115
+ /*min-height: 28px;*/
116
+ box-sizing: border-box;
117
+ -moz-box-sizing: border-box;
118
+ word-wrap: break-word!important;
119
+ white-space: pre-wrap!important;
120
+ }
121
+
122
+ img {
123
+ cursor: pointer;
124
+
125
+ &.selected {
126
+ box-shadow: 0 0 0 4px #cccccc;
127
+ }
128
+ }
129
+ }
130
+
131
+ .simditor-paste-area,
132
+ .simditor-clean-paste-area {
133
+ background: transparent;
134
+ border: none;
135
+ outline: none;
136
+ resize: none;
137
+ padding: 0;
138
+ margin: 0;
139
+ }
140
+
141
+ .simditor-toolbar {
142
+ border-bottom: 1px solid #eeeeee;
143
+ background: #ffffff;
144
+ width: 100%;
145
+
146
+ & > ul {
147
+ margin: 0;
148
+ padding: 0 0 0 6px;
149
+ list-style: none;
150
+
151
+ &:after {
152
+ content:"";
153
+ display:table;
154
+ clear:both;
155
+ }
156
+
157
+ & > li {
158
+ position: relative;
159
+ float: left;
160
+
161
+ & > span.separator {
162
+ display: block;
163
+ float: left;
164
+ background: #cfcfcf;
165
+ width: 1px;
166
+ height: 18px;
167
+ margin: ($simditor-button-height - 18px) / 2 15px;
168
+ }
169
+
170
+ & > .toolbar-item {
171
+ display: block;
172
+ float: left;
173
+ width: 46px;
174
+ height: $simditor-button-height;
175
+ outline: none;
176
+ color: #333333;
177
+ font-size: 15px;
178
+ line-height: $simditor-button-height;
179
+ text-align: center;
180
+ text-decoration: none;
181
+
182
+ span {
183
+ opacity: 0.6;
184
+
185
+ &.simditor-icon {
186
+ display: inline;
187
+ line-height: normal;
188
+ }
189
+ }
190
+
191
+ &:hover span {
192
+ opacity: 1;
193
+ }
194
+
195
+ &.active {
196
+ background: #eeeeee;
197
+
198
+ span {
199
+ opacity: 1;
200
+ }
201
+ }
202
+
203
+ &.disabled {
204
+ cursor: default;
205
+
206
+ span {
207
+ opacity: 0.3;
208
+ }
209
+ }
210
+
211
+ &.toolbar-item-title {
212
+ span:before {
213
+ content: "H";
214
+ font-size: 19px;
215
+ font-weight: bold;
216
+ font-family: 'Times New Roman';
217
+ }
218
+
219
+ &.active-h1 span:before {
220
+ content: 'H1';
221
+ font-size: 18px;
222
+ }
223
+
224
+ &.active-h2 span:before {
225
+ content: 'H2';
226
+ font-size: 18px;
227
+ }
228
+
229
+ &.active-h3 span:before {
230
+ content: 'H3';
231
+ font-size: 18px;
232
+ }
233
+ }
234
+
235
+ &.toolbar-item-image {
236
+ position: relative;
237
+ overflow: hidden;
238
+
239
+ & > input[type=file] {
240
+ position: absolute;
241
+ right: 0px;
242
+ top: 0px;
243
+ opacity: 0;
244
+ font-size: 100px;
245
+ cursor: pointer;
246
+ }
247
+ }
248
+ }
249
+
250
+ &.menu-on {
251
+ .toolbar-item {
252
+ position: relative;
253
+ z-index: 21;
254
+ background: #ffffff;
255
+ box-shadow: 0 -3px 3px rgba(0,0,0,0.2);
256
+
257
+ span {
258
+ opacity: 1;
259
+ }
260
+ }
261
+
262
+ .toolbar-menu {
263
+ display: block;
264
+ }
265
+ }
266
+ }
267
+ }
268
+
269
+ .toolbar-menu {
270
+ display: none;
271
+ position: absolute;
272
+ top: $simditor-button-height;
273
+ left: 0;
274
+ z-index: 20;
275
+ background: #ffffff;
276
+ text-align: left;
277
+ box-shadow: 0 0 3px rgba(0,0,0,0.2);
278
+
279
+ ul {
280
+ min-width: 160px;
281
+ list-style: none;
282
+ margin: 0;
283
+ padding: 10px 1px;
284
+
285
+ & > li {
286
+
287
+ .menu-item {
288
+ display: block;
289
+ font-size:16px;
290
+ line-height: 2em;
291
+ padding: 0 10px;
292
+ text-decoration: none;
293
+ color: #666666;
294
+
295
+ &:hover {
296
+ background: #f6f6f6;
297
+ }
298
+
299
+ &.menu-item-h1 {
300
+ font-size: 24px;
301
+ color: #333333;
302
+ }
303
+
304
+ &.menu-item-h2 {
305
+ font-size: 22px;
306
+ color: #333333;
307
+ }
308
+
309
+ &.menu-item-h3 {
310
+ font-size: 20px;
311
+ color: #333333;
312
+ }
313
+
314
+ &.menu-item-h4 {
315
+ font-size: 18px;
316
+ color: #333333;
317
+ }
318
+
319
+ &.menu-item-h5 {
320
+ font-size: 16px;
321
+ color: #333333;
322
+ }
323
+ }
324
+
325
+ .separator {
326
+ display: block;
327
+ border-top: 1px solid #cccccc;
328
+ height: 0;
329
+ line-height: 0;
330
+ font-size: 0;
331
+ margin: 6px 0;
332
+ }
333
+ }
334
+
335
+ }
336
+
337
+ &.toolbar-menu-color {
338
+ width: 96px;
339
+
340
+ .color-list {
341
+ height: 40px;
342
+ margin: 10px 6px 6px 10px;
343
+ padding: 0;
344
+
345
+ min-width: 0;
346
+
347
+ li {
348
+ float: left;
349
+ margin: 0 4px 4px 0;
350
+
351
+ .font-color {
352
+ display: block;
353
+ width: 16px;
354
+ height: 16px;
355
+ background: #dfdfdf;
356
+ border-radius: 2px;
357
+
358
+ &:hover {
359
+ opacity: 0.8;
360
+ }
361
+
362
+ &.font-color-default {
363
+ background: #333333;
364
+ }
365
+ }
366
+
367
+ $font-colors: #E33737 #e28b41 #c8a732 #209361 #418caf #aa8773 #999999;
368
+ $i: 1;
369
+ @each $color in $font-colors {
370
+ .font-color-#{$i} {
371
+ background: $color;
372
+ }
373
+ $i: $i + 1;
374
+ }
375
+ }
376
+ }
377
+ }
378
+
379
+ &.toolbar-menu-table {
380
+ .menu-create-table {
381
+ background: #ffffff;
382
+
383
+ table {
384
+ border: none;
385
+ border-collapse: collapse;
386
+ border-spacing: 0;
387
+ table-layout: fixed;
388
+
389
+ td {
390
+ height: 16px;
391
+ padding: 0;
392
+ border: 2px solid #ffffff;
393
+ background: #f3f3f3;
394
+ cursor: pointer;
395
+
396
+ &:before {
397
+ width: 16px;
398
+ display: block;
399
+ content: ''
400
+ }
401
+
402
+ &.selected {
403
+ background: #cfcfcf;
404
+ }
405
+ }
406
+ }
407
+ }
408
+
409
+ .menu-edit-table {
410
+ display: none;
411
+
412
+ ul {
413
+ min-width: 240px;
414
+ }
415
+ }
416
+ }
417
+
418
+ &.toolbar-menu-image {
419
+ .menu-item-upload-image {
420
+ position: relative;
421
+ overflow: hidden;
422
+
423
+ input[type=file] {
424
+ position: absolute;
425
+ right: 0px;
426
+ top: 0px;
427
+ opacity: 0;
428
+ font-size: 100px;
429
+ cursor: pointer;
430
+ }
431
+ }
432
+ }
433
+ }
434
+ }
435
+
436
+ .simditor-popover {
437
+ display: none;
438
+ padding: 5px 8px 0;
439
+ background: #ffffff;
440
+ box-shadow: 0 1px 4px rgba(0,0,0,0.4);
441
+ border-radius: 2px;
442
+ position: absolute;
443
+ z-index: 2;
444
+
445
+ .settings-field {
446
+ margin: 0 0 5px 0;
447
+ font-size: 12px;
448
+ height: 25px;
449
+ line-height: 25px;
450
+
451
+ label {
452
+ margin: 0 8px 0 0;
453
+ float: left;
454
+ }
455
+
456
+ input[type=text] {
457
+ float: left;
458
+ width: 200px;
459
+ box-sizing: border-box;
460
+ font-size: 12px;
461
+
462
+ &.image-size {
463
+ width: 87px;
464
+ }
465
+ }
466
+
467
+ .times {
468
+ float: left;
469
+ width: 26px;
470
+ font-size: 12px;
471
+ text-align: center;
472
+ }
473
+ }
474
+
475
+ &.link-popover .btn-unlink,
476
+ &.image-popover .btn-upload,
477
+ &.image-popover .btn-restore {
478
+ float: left;
479
+ margin: 0 0 0 8px;
480
+ color: #333333;
481
+ font-size: 14px;
482
+ outline: 0;
483
+
484
+ span {
485
+ opacity: 0.6;
486
+ }
487
+
488
+ &:hover span {
489
+ opacity: 1;
490
+ }
491
+ }
492
+
493
+ &.image-popover .btn-upload {
494
+ position: relative;
495
+ display: inline-block;
496
+ overflow: hidden;
497
+
498
+ input[type=file] {
499
+ position: absolute;
500
+ right: 0px;
501
+ top: 0px;
502
+ opacity: 0;
503
+ height: 100%;
504
+ width: 28px;
505
+ }
506
+ }
507
+ }
508
+
509
+ &.simditor-mobile {
510
+ .simditor-toolbar > ul > li > .toolbar-item {
511
+ width: 46px;
512
+ }
513
+
514
+ .simditor-wrapper.toolbar-floating .simditor-toolbar {
515
+ position: absolute;
516
+ top: 0;
517
+ z-index: 10;
518
+ box-shadow: 0 0 6px rgba(0,0,0,0.1);
519
+ }
520
+ }
521
+ }
522
+
523
+
524
+
525
+ .simditor .simditor-body, .editor-style {
526
+ font-size: 16px;
527
+ font-family: arial, sans-serif;
528
+ line-height: 1.6;
529
+ color: #333;
530
+ outline: none;
531
+ word-wrap: break-word;
532
+
533
+ & > :first-child {
534
+ margin-top: 0!important;
535
+ }
536
+
537
+ a{ color: #4298BA; text-decoration: none; word-break: break-all;}
538
+ a:visited{ color: #4298BA; }
539
+ a:hover{ color: #0F769F; }
540
+ a:active{ color:#9E792E; }
541
+ a:hover, a:active{ outline: 0; }
542
+
543
+ h1,h2,h3,h4,h5,h6 {
544
+ font-weight: normal;
545
+ margin: 40px 0 20px;
546
+ color: #000000;
547
+ }
548
+
549
+ h1 { font-size: 24px; }
550
+ h2 { font-size: 22px; }
551
+ h3 { font-size: 20px; }
552
+ h4 { font-size: 18px; }
553
+ h5 { font-size: 16px; }
554
+ h6 { font-size: 16px; }
555
+
556
+ p, div {
557
+ word-wrap: break-word;
558
+ margin: 0 0 15px 0;
559
+ color: #333;
560
+ word-wrap: break-word;
561
+ }
562
+
563
+ b, strong {
564
+ font-weight: bold;
565
+ }
566
+
567
+ i, em {
568
+ font-style: italic;
569
+ }
570
+
571
+ u {
572
+ text-decoration: underline;
573
+ }
574
+
575
+ strike, del {
576
+ text-decoration: line-through;
577
+ }
578
+
579
+ ul, ol {
580
+ list-style:disc outside none;
581
+ margin: 15px 0;
582
+ padding: 0 0 0 40px;
583
+ line-height: 1.6;
584
+
585
+ ul, ol {
586
+ padding-left: 30px;
587
+ }
588
+
589
+ ul {
590
+ list-style: circle outside none;
591
+
592
+ ul {
593
+ list-style: square outside none;
594
+ }
595
+ }
596
+ }
597
+
598
+ ol {
599
+ list-style:decimal;
600
+ }
601
+
602
+ blockquote {
603
+ border-left: 6px solid #ddd;
604
+ padding: 5px 0 5px 10px;
605
+ margin: 15px 0 15px 15px;
606
+
607
+ & > :first-child {
608
+ margin-top: 0;
609
+ }
610
+ }
611
+
612
+ pre {
613
+ padding: 10px 5px 10px 10px;
614
+ margin: 15px 0;
615
+ display: block;
616
+ line-height: 18px;
617
+ background: #F0F0F0;
618
+ border-radius: 3px;
619
+ font-size:13px;
620
+ font-family: 'monaco', 'Consolas', "Liberation Mono", Courier, monospace;
621
+ white-space: pre;
622
+ word-wrap: normal;
623
+ }
624
+
625
+ code {
626
+ display: inline-block;
627
+ padding: 0 4px;
628
+ margin: 0 5px;
629
+ background: #eeeeee;
630
+ border-radius: 3px;
631
+ font-size:13px;
632
+ font-family: 'monaco', 'Consolas', "Liberation Mono", Courier, monospace;
633
+ }
634
+
635
+ hr {
636
+ display: block;
637
+ height: 0px;
638
+ border: 0;
639
+ border-top: 1px solid #ccc;
640
+ margin: 15px 0;
641
+ padding: 0;
642
+ }
643
+
644
+ table {
645
+ width: 100%;
646
+ table-layout: fixed;
647
+ border-collapse: collapse;
648
+ border-spacing: 0;
649
+ margin: 15px 0;
650
+
651
+ thead {
652
+ background-color: #f9f9f9;
653
+ }
654
+
655
+ td {
656
+ min-width: 40px;
657
+ height: 30px;
658
+ border: 1px solid #ccc;
659
+ vertical-align: top;
660
+ padding: 2px 4px;
661
+ box-sizing: border-box;
662
+
663
+ &.active {
664
+ background-color: #ffffee;
665
+ }
666
+ }
667
+ }
668
+
669
+
670
+ img {
671
+ margin: 0 5px;
672
+ vertical-align: middle;
673
+ }
674
+
675
+ @for $i from 0 through 10 {
676
+ *[data-indent="#{$i}"] {
677
+ margin-left: 40px * $i;
678
+ }
679
+ }
680
+ }
681
+