simditor_aliyun_rails 0.1.0 → 2.3.6

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