gollum 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- checksums.yaml +13 -5
- data/HISTORY.md +14 -0
- data/README.md +15 -11
- data/bin/gollum +17 -4
- data/{openrc → contrib/openrc}/conf.d/gollum +0 -0
- data/{openrc → contrib/openrc}/init.d/gollum +0 -0
- data/contrib/systemd/gollum@.service +12 -0
- data/gollum.gemspec +9 -5
- data/lib/gollum.rb +1 -1
- data/lib/gollum/app.rb +44 -12
- data/lib/gollum/editing_auth.rb +34 -0
- data/lib/gollum/helpers.rb +12 -0
- data/lib/gollum/public/gollum/css/dialog.css +117 -15
- data/lib/gollum/public/gollum/css/editor.css +220 -62
- data/lib/gollum/public/gollum/css/gollum.css +139 -22
- data/lib/gollum/public/gollum/css/ie7.css +6 -0
- data/lib/gollum/public/gollum/css/template.css +56 -2
- data/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +60 -0
- data/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js +26 -11
- data/lib/gollum/public/gollum/javascript/gollum.dialog.js +26 -4
- data/lib/gollum/templates/compare.mustache +16 -10
- data/lib/gollum/templates/editor.mustache +6 -2
- data/lib/gollum/templates/history.mustache +4 -2
- data/lib/gollum/templates/latest_changes.mustache +39 -0
- data/lib/gollum/templates/layout.mustache +14 -5
- data/lib/gollum/templates/page.mustache +30 -15
- data/lib/gollum/templates/pages.mustache +4 -3
- data/lib/gollum/views/compare.rb +1 -1
- data/lib/gollum/views/create.rb +8 -0
- data/lib/gollum/views/edit.rb +8 -0
- data/lib/gollum/views/history.rb +1 -1
- data/lib/gollum/views/latest_changes.rb +90 -0
- data/lib/gollum/views/page.rb +33 -11
- data/lib/gollum/views/pages.rb +6 -2
- metadata +38 -34
@@ -21,9 +21,15 @@ body, html {
|
|
21
21
|
#wiki-wrapper {
|
22
22
|
margin: 0 auto;
|
23
23
|
overflow: visible;
|
24
|
-
width:
|
25
|
-
|
26
|
-
|
24
|
+
width: 100%;
|
25
|
+
}
|
26
|
+
|
27
|
+
@media all and (min-width: 940px) {
|
28
|
+
#wiki-wrapper {
|
29
|
+
max-width: 920px;
|
30
|
+
padding-left:20px;
|
31
|
+
padding-right:20px;
|
32
|
+
}
|
27
33
|
}
|
28
34
|
|
29
35
|
a:link {
|
@@ -39,22 +45,41 @@ a:hover, a:visited {
|
|
39
45
|
|
40
46
|
/* @section head */
|
41
47
|
#head {
|
42
|
-
|
43
|
-
|
44
|
-
padding-bottom: 0.3em;
|
48
|
+
margin: 1em 0 0;
|
49
|
+
padding: 0;
|
45
50
|
overflow: hidden;
|
46
51
|
}
|
47
52
|
|
48
53
|
#head h1 {
|
49
|
-
font-size:
|
54
|
+
font-size: 1.5em;
|
50
55
|
float: left;
|
51
56
|
line-height: normal;
|
52
57
|
margin: 0;
|
53
|
-
padding:
|
58
|
+
padding: 0 0 0 0.667em;
|
54
59
|
}
|
55
60
|
|
56
61
|
#head ul.actions {
|
57
|
-
|
62
|
+
clear: both;
|
63
|
+
margin: 0 1em;
|
64
|
+
}
|
65
|
+
|
66
|
+
@media all and (min-width: 940px) {
|
67
|
+
#head {
|
68
|
+
border-bottom: 1px solid #ddd;
|
69
|
+
padding-bottom: 0.3em;
|
70
|
+
margin: 4em 0 1.5em;
|
71
|
+
}
|
72
|
+
|
73
|
+
#head h1 {
|
74
|
+
font-size: 2.5em;
|
75
|
+
padding: 2px 0 0 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
#head ul.actions {
|
79
|
+
clear: none;
|
80
|
+
float: right;
|
81
|
+
margin: 0;
|
82
|
+
}
|
58
83
|
}
|
59
84
|
|
60
85
|
/* @section content */
|
@@ -89,6 +114,12 @@ a:hover, a:visited {
|
|
89
114
|
width: 100%;
|
90
115
|
}
|
91
116
|
|
117
|
+
#wiki-body table {
|
118
|
+
display: block;
|
119
|
+
overflow: auto;
|
120
|
+
border: 0;
|
121
|
+
}
|
122
|
+
|
92
123
|
.has-sidebar #wiki-body {
|
93
124
|
width: 68%;
|
94
125
|
}
|
@@ -244,6 +275,16 @@ a:hover, a:visited {
|
|
244
275
|
font-weight: bold;
|
245
276
|
}
|
246
277
|
|
278
|
+
#footer .actions {
|
279
|
+
margin-left: 1em;
|
280
|
+
}
|
281
|
+
|
282
|
+
@media all and (min-width: 940px) {
|
283
|
+
#footer .actions {
|
284
|
+
margin: 0;
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
247
288
|
|
248
289
|
/* @section history */
|
249
290
|
.history h1 {
|
@@ -257,7 +298,7 @@ a:hover, a:visited {
|
|
257
298
|
}
|
258
299
|
|
259
300
|
#wiki-history {
|
260
|
-
margin
|
301
|
+
margin: 2em 1em 0 1em;
|
261
302
|
}
|
262
303
|
|
263
304
|
#wiki-history fieldset {
|
@@ -283,7 +324,8 @@ a:hover, a:visited {
|
|
283
324
|
}
|
284
325
|
|
285
326
|
#wiki-history table tr td {
|
286
|
-
border: 1px solid #c0dce9;
|
327
|
+
border-top: 1px solid #c0dce9;
|
328
|
+
border-bottom: 1px solid #c0dce9;
|
287
329
|
font-size: 1em;
|
288
330
|
line-height: 1.6em;
|
289
331
|
margin: 0;
|
@@ -291,8 +333,8 @@ a:hover, a:visited {
|
|
291
333
|
}
|
292
334
|
|
293
335
|
#wiki-history table tr td.checkbox {
|
294
|
-
width:
|
295
|
-
padding: 0.
|
336
|
+
width: auto;
|
337
|
+
padding: 0 0.2em 0 0;
|
296
338
|
}
|
297
339
|
|
298
340
|
#wiki-history table tr td.checkbox input {
|
@@ -364,6 +406,25 @@ a:hover, a:visited {
|
|
364
406
|
margin: 0 0.6em 0 0;
|
365
407
|
}
|
366
408
|
|
409
|
+
@media all and (min-width: 940px) {
|
410
|
+
#wiki-history {
|
411
|
+
margin: 2em 0 0 0;
|
412
|
+
}
|
413
|
+
|
414
|
+
#wiki-history table tr td {
|
415
|
+
border: 1px solid #c0dce9;
|
416
|
+
font-size: 1em;
|
417
|
+
line-height: 1.6em;
|
418
|
+
margin: 0;
|
419
|
+
padding: 0.3em 0.7em;
|
420
|
+
}
|
421
|
+
|
422
|
+
#wiki-history table tr td.checkbox {
|
423
|
+
width: 4em;
|
424
|
+
padding: 0.3em;
|
425
|
+
}
|
426
|
+
}
|
427
|
+
|
367
428
|
|
368
429
|
/* @section edit */
|
369
430
|
.edit h1 {
|
@@ -378,6 +439,7 @@ a:hover, a:visited {
|
|
378
439
|
|
379
440
|
|
380
441
|
/* @section search */
|
442
|
+
|
381
443
|
.results h1 {
|
382
444
|
color: #999;
|
383
445
|
font-weight: normal;
|
@@ -390,6 +452,8 @@ a:hover, a:visited {
|
|
390
452
|
|
391
453
|
.results #results {
|
392
454
|
border-bottom: 1px solid #ccc;
|
455
|
+
margin-left: 1em;
|
456
|
+
margin-right: 1em;
|
393
457
|
margin-bottom: 2em;
|
394
458
|
padding-bottom: 2em;
|
395
459
|
}
|
@@ -400,12 +464,33 @@ a:hover, a:visited {
|
|
400
464
|
}
|
401
465
|
|
402
466
|
.results #results ul li {
|
403
|
-
|
404
|
-
line-height: 1.6em;
|
405
|
-
list-style-position: outside;
|
467
|
+
list-style: none;
|
406
468
|
padding: 0.2em 0;
|
407
469
|
}
|
408
470
|
|
471
|
+
.results #results ul li a {
|
472
|
+
word-wrap: break-word;
|
473
|
+
}
|
474
|
+
|
475
|
+
@media all and (min-width: 640px) {
|
476
|
+
.results #results ul li {
|
477
|
+
font-size: 1.2em;
|
478
|
+
}
|
479
|
+
}
|
480
|
+
|
481
|
+
@media all and (min-width: 940px) {
|
482
|
+
.results #results {
|
483
|
+
margin-left: 0;
|
484
|
+
margin-right: 0;
|
485
|
+
}
|
486
|
+
|
487
|
+
.results #results ul li {
|
488
|
+
list-style: disc;
|
489
|
+
list-style-position: outside;
|
490
|
+
line-height: 1.6em;
|
491
|
+
}
|
492
|
+
}
|
493
|
+
|
409
494
|
.results #results ul li span.count {
|
410
495
|
color: #999;
|
411
496
|
}
|
@@ -522,8 +607,8 @@ ul.actions {
|
|
522
607
|
ul.actions li {
|
523
608
|
float: left;
|
524
609
|
font-size: 0.9em;
|
525
|
-
margin-left:
|
526
|
-
margin-bottom:
|
610
|
+
margin-left: 1px;
|
611
|
+
margin-bottom: 1px;
|
527
612
|
}
|
528
613
|
|
529
614
|
.minibutton a {
|
@@ -533,7 +618,7 @@ ul.actions {
|
|
533
618
|
display: block;
|
534
619
|
font-weight: bold;
|
535
620
|
margin: 0;
|
536
|
-
padding: 0.
|
621
|
+
padding: 0.6em 1em;
|
537
622
|
height: 1.4em;
|
538
623
|
|
539
624
|
text-shadow: 0 1px 0 #fff;
|
@@ -547,6 +632,18 @@ ul.actions {
|
|
547
632
|
-webkit-border-radius: 3px;
|
548
633
|
}
|
549
634
|
|
635
|
+
@media all and (min-width: 940px) {
|
636
|
+
ul.actions li {
|
637
|
+
margin-left: 0.6em;
|
638
|
+
margin-bottom: 0.6em;
|
639
|
+
}
|
640
|
+
|
641
|
+
.minibutton a {
|
642
|
+
padding: 0.4em 1em;
|
643
|
+
height: 1.4em;
|
644
|
+
}
|
645
|
+
}
|
646
|
+
|
550
647
|
#search-submit {
|
551
648
|
background-color: #f7f7f7;
|
552
649
|
border: 1px solid #d4d4d4;
|
@@ -627,7 +724,7 @@ ul.actions {
|
|
627
724
|
/* @control searchbar */
|
628
725
|
#head #searchbar {
|
629
726
|
float: right;
|
630
|
-
padding: 0;
|
727
|
+
padding: 2px 0 0 0;
|
631
728
|
overflow: hidden;
|
632
729
|
}
|
633
730
|
|
@@ -684,7 +781,7 @@ ul.actions {
|
|
684
781
|
height: inherit;
|
685
782
|
overflow: hidden;
|
686
783
|
text-indent: -5000px;
|
687
|
-
width:
|
784
|
+
width: 32px;
|
688
785
|
}
|
689
786
|
|
690
787
|
.ff #head #searchbar #searchbar-fauxtext #search-submit span,
|
@@ -697,11 +794,31 @@ ul.actions {
|
|
697
794
|
padding: 0;
|
698
795
|
}
|
699
796
|
|
797
|
+
@media all and (min-width: 940px) {
|
798
|
+
#head #searchbar {
|
799
|
+
padding: 0;
|
800
|
+
}
|
801
|
+
|
802
|
+
#head #searchbar #searchbar-fauxtext #search-submit span {
|
803
|
+
width: 28px;
|
804
|
+
}
|
805
|
+
|
806
|
+
#head #searchbar #searchbar-fauxtext #search-submit:hover span {
|
807
|
+
background-position: -431px -28px;
|
808
|
+
}
|
809
|
+
}
|
810
|
+
|
700
811
|
/* @section pages */
|
701
812
|
|
702
813
|
#pages {
|
703
814
|
font-size: 1.2em;
|
704
|
-
margin
|
815
|
+
margin: 0 1em 20px 1em;
|
816
|
+
}
|
817
|
+
|
818
|
+
@media all and (min-width: 940px) {
|
819
|
+
#pages {
|
820
|
+
margin: 0 0 20px 0;
|
821
|
+
}
|
705
822
|
}
|
706
823
|
|
707
824
|
#pages ul {
|
@@ -2,6 +2,10 @@
|
|
2
2
|
Gollum v3 Template
|
3
3
|
*/
|
4
4
|
|
5
|
+
/*!
|
6
|
+
* Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
|
7
|
+
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
8
|
+
*/
|
5
9
|
@font-face {
|
6
10
|
font-family: 'FontAwesome';
|
7
11
|
src: url('../fonts/fontawesome-webfont.eot?v=4.0.3');
|
@@ -23,6 +27,51 @@
|
|
23
27
|
content: "\f0c1";
|
24
28
|
}
|
25
29
|
|
30
|
+
.fa-spinner:before {
|
31
|
+
content: "\f110";
|
32
|
+
}
|
33
|
+
|
34
|
+
.fa-spin {
|
35
|
+
-webkit-animation: spin 2s infinite linear;
|
36
|
+
-moz-animation: spin 2s infinite linear;
|
37
|
+
-o-animation: spin 2s infinite linear;
|
38
|
+
animation: spin 2s infinite linear;
|
39
|
+
}
|
40
|
+
@-moz-keyframes spin {
|
41
|
+
0% {
|
42
|
+
-moz-transform: rotate(0deg);
|
43
|
+
}
|
44
|
+
100% {
|
45
|
+
-moz-transform: rotate(359deg);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
@-webkit-keyframes spin {
|
49
|
+
0% {
|
50
|
+
-webkit-transform: rotate(0deg);
|
51
|
+
}
|
52
|
+
100% {
|
53
|
+
-webkit-transform: rotate(359deg);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
@-o-keyframes spin {
|
57
|
+
0% {
|
58
|
+
-o-transform: rotate(0deg);
|
59
|
+
}
|
60
|
+
100% {
|
61
|
+
-o-transform: rotate(359deg);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
@keyframes spin {
|
65
|
+
0% {
|
66
|
+
-webkit-transform: rotate(0deg);
|
67
|
+
transform: rotate(0deg);
|
68
|
+
}
|
69
|
+
100% {
|
70
|
+
-webkit-transform: rotate(359deg);
|
71
|
+
transform: rotate(359deg);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
26
75
|
/* margin & padding reset*/
|
27
76
|
* {
|
28
77
|
margin: 0;
|
@@ -48,7 +97,6 @@ body {
|
|
48
97
|
font: 13.34px Helvetica, arial, freesans, clean, sans-serif;
|
49
98
|
font-size: small;
|
50
99
|
line-height: 1.4;
|
51
|
-
min-width: 980px;
|
52
100
|
}
|
53
101
|
|
54
102
|
img {
|
@@ -82,13 +130,19 @@ a:active, a:hover {
|
|
82
130
|
}
|
83
131
|
|
84
132
|
.markdown-body {
|
85
|
-
padding:
|
133
|
+
padding: 1em;
|
86
134
|
font-size: 15px;
|
87
135
|
line-height: 1.7;
|
88
136
|
overflow: hidden;
|
89
137
|
word-wrap: break-word;
|
90
138
|
}
|
91
139
|
|
140
|
+
@media all and (min-width: 940px) {
|
141
|
+
.markdown-body {
|
142
|
+
padding: 30px;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
92
146
|
.markdown-body > *:first-child {
|
93
147
|
margin-top: 0 !important;
|
94
148
|
}
|
@@ -98,6 +98,52 @@
|
|
98
98
|
$('#gollum-editor-help').removeClass('jaws');
|
99
99
|
}
|
100
100
|
} // EditorHas.functionBar
|
101
|
+
|
102
|
+
if ( EditorHas.dragDropUpload() ) {
|
103
|
+
var $editorBody = $('#gollum-editor-body');
|
104
|
+
var editorBody = $('#gollum-editor-body')[0];
|
105
|
+
editorBody.ondragover = function(e) {
|
106
|
+
$editorBody.addClass('dragging');
|
107
|
+
return false;
|
108
|
+
};
|
109
|
+
editorBody.ondragleave = function() {
|
110
|
+
$editorBody.removeClass('dragging');
|
111
|
+
return false;
|
112
|
+
};
|
113
|
+
editorBody.ondrop = function(e) {
|
114
|
+
debug("dropped file");
|
115
|
+
e.preventDefault();
|
116
|
+
$editorBody.removeClass('dragging').addClass('uploading');
|
117
|
+
|
118
|
+
var file = e.dataTransfer.files[0],
|
119
|
+
formData = new FormData();
|
120
|
+
formData.append('upload_dest', uploadDest);
|
121
|
+
formData.append('file', file);
|
122
|
+
|
123
|
+
$.ajax({
|
124
|
+
url: '/uploadFile',
|
125
|
+
data: formData,
|
126
|
+
cache: false,
|
127
|
+
contentType: false,
|
128
|
+
processData: false,
|
129
|
+
type: 'POST',
|
130
|
+
success: function(){
|
131
|
+
$editorBody.removeClass('uploading');
|
132
|
+
var text = '[[' + uploadDest + '/' + file.name + ']]';
|
133
|
+
var pos = editorBody.selectionStart || 0;
|
134
|
+
editorBody.value = editorBody.value.substring(0, pos) + text + editorBody.value.substring(pos);
|
135
|
+
editorBody.selectionStart = pos + text.length;
|
136
|
+
editorBody.selectionEnd = pos + text.length;
|
137
|
+
},
|
138
|
+
error: function(r, textStatus) {
|
139
|
+
alert('Error uploading file: ' + textStatus);
|
140
|
+
$editorBody.removeClass('uploading');
|
141
|
+
}
|
142
|
+
});
|
143
|
+
|
144
|
+
return false;
|
145
|
+
};
|
146
|
+
} // EditorHas.dragDropUpload
|
101
147
|
} // EditorHas.baseEditorMarkup
|
102
148
|
};
|
103
149
|
|
@@ -444,6 +490,17 @@
|
|
444
490
|
*/
|
445
491
|
titleDisplayed: function() {
|
446
492
|
return ( ActiveOptions.NewFile );
|
493
|
+
},
|
494
|
+
|
495
|
+
|
496
|
+
/**
|
497
|
+
* EditorHas.dragDropUpload
|
498
|
+
* True if the editor is supports drag and drop file uploads, false otherwise.
|
499
|
+
*
|
500
|
+
* @return boolean
|
501
|
+
*/
|
502
|
+
dragDropUpload: function() {
|
503
|
+
return $('#gollum-editor.uploads-allowed').length;
|
447
504
|
}
|
448
505
|
|
449
506
|
};
|
@@ -546,9 +603,12 @@
|
|
546
603
|
typeof definitionObject.replace == 'string' ) {
|
547
604
|
debug('Running replacement - using ' + definitionObject.replace);
|
548
605
|
var rt = definitionObject.replace;
|
606
|
+
|
607
|
+
repText = escape( repText );
|
549
608
|
repText = repText.replace( searchExp, rt );
|
550
609
|
// remove backreferences
|
551
610
|
repText = repText.replace( /\$[\d]/g, '' );
|
611
|
+
repText = unescape( repText );
|
552
612
|
|
553
613
|
if ( repText === '' ) {
|
554
614
|
debug('Search string is empty');
|