gollum 5.1.2 → 5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -1
  3. data/Gemfile +1 -1
  4. data/HISTORY.md +11 -0
  5. data/README.md +0 -2
  6. data/bin/gollum +1 -1
  7. data/contrib/automation/gollum-post +66 -0
  8. data/gollum.gemspec +17 -15
  9. data/lib/gollum.rb +17 -1
  10. data/lib/gollum/app.rb +10 -7
  11. data/lib/gollum/public/assets/.sprockets-manifest-e3f9b0be36ac3bccc4c006a52e352500.json +1 -0
  12. data/lib/gollum/public/assets/app-7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6.css +21 -0
  13. data/lib/gollum/public/assets/app-7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6.css.gz +0 -0
  14. data/lib/gollum/public/assets/app-7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2.js +5 -0
  15. data/lib/gollum/public/assets/app-7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2.js.gz +0 -0
  16. data/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz +0 -0
  17. data/lib/gollum/public/assets/editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js +24 -0
  18. data/lib/gollum/public/assets/editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js.gz +0 -0
  19. data/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz +0 -0
  20. data/lib/gollum/public/gollum/javascript/app.js +1 -0
  21. data/lib/gollum/public/gollum/javascript/gollum.js.erb +10 -10
  22. data/lib/gollum/public/gollum/javascript/polyfills.js +6 -0
  23. data/lib/gollum/public/gollum/stylesheets/primer.css +23 -0
  24. data/lib/gollum/public/gollum/stylesheets/template.scss.erb +132 -57
  25. data/lib/gollum/templates/editor.mustache +2 -2
  26. data/lib/gollum/templates/latest_changes.mustache +1 -1
  27. data/lib/gollum/templates/layout.mustache +1 -1
  28. data/lib/gollum/templates/mobilenav.mustache +72 -0
  29. data/lib/gollum/templates/navbar.mustache +104 -42
  30. data/lib/gollum/templates/overview.mustache +1 -1
  31. data/lib/gollum/templates/wiki_content.mustache +17 -16
  32. data/lib/gollum/views/commit.rb +11 -4
  33. data/lib/gollum/views/compare.rb +18 -7
  34. data/lib/gollum/views/helpers.rb +4 -1
  35. data/lib/gollum/views/overview.rb +5 -4
  36. data/lib/gollum/views/page.rb +11 -8
  37. metadata +28 -32
  38. data/lib/gollum/public/assets/.sprockets-manifest-459226ba5fc211b78ba9a3aa6ebde96c.json +0 -1
  39. data/lib/gollum/public/assets/app-6e925e38a12a40c4fa9e0400cc874e0f4f97b66fdeb90a144dea527dbb544fbd.js +0 -5
  40. data/lib/gollum/public/assets/app-6e925e38a12a40c4fa9e0400cc874e0f4f97b66fdeb90a144dea527dbb544fbd.js.gz +0 -0
  41. data/lib/gollum/public/assets/app-b205e593a30f1cc0054e2e9ed9fc8af3658d8ef4a62b9708c20f204560deefb7.css +0 -21
  42. data/lib/gollum/public/assets/app-b205e593a30f1cc0054e2e9ed9fc8af3658d8ef4a62b9708c20f204560deefb7.css.gz +0 -0
  43. data/lib/gollum/public/assets/editor-b2c10f22ef6ca1e120956a2d11ff4ca19ac44d7e7240f5cc43ec949184d8b708.js +0 -24
  44. data/lib/gollum/public/assets/editor-b2c10f22ef6ca1e120956a2d11ff4ca19ac44d7e7240f5cc43ec949184d8b708.js.gz +0 -0
  45. data/lib/gollum/public/gollum/stylesheets/_layout.scss +0 -83
  46. data/lib/gollum/public/gollum/stylesheets/primer.scss +0 -23
@@ -53,19 +53,85 @@ a {
53
53
  /* Markdown body */
54
54
 
55
55
  .header-enum {
56
- h2 {counter-reset: h3}
57
- h3 {counter-reset: h4}
58
- h4 {counter-reset: h5}
59
- h5 {counter-reset: h6}
60
-
61
56
  --header-enum-style: decimal;
62
-
63
- h1:before {counter-increment: h1; content: counter(h1, var(--header-enum-style)) ". ";}
64
- h2:before {counter-increment: h2; content: counter(h1, var(--header-enum-style)) "." counter(h2, var(--header-enum-style)) ". ";}
65
- h3:before {counter-increment: h3; content: counter(h1, var(--header-enum-style)) "." counter(h2, var(--header-enum-style)) "." counter(h3, var(--header-enum-style)) ". ";}
66
- h4:before {counter-increment: h4; content: counter(h1, var(--header-enum-style)) "." counter(h2, var(--header-enum-style)) "." counter(h3, var(--header-enum-style)) "." counter(h4, var(--header-enum-style)) ". ";}
67
- h5:before {counter-increment: h5; content: counter(h1, var(--header-enum-style)) "." counter(h2, var(--header-enum-style)) "." counter(h3, var(--header-enum-style)) "." counter(h4, var(--header-enum-style)) "." counter(h5, var(--header-enum-style)) ". ";}
68
- h6:before {counter-increment: h6; content: counter(h1, var(--header-enum-style)) "." counter(h2, var(--header-enum-style)) "." counter(h3, var(--header-enum-style)) "." counter(h4, var(--header-enum-style)) "." counter(h5, var(--header-enum-style)) "." counter(h6, var(--header-enum-style)) ". ";}
57
+
58
+ h1 {
59
+ counter-increment: h1;
60
+ counter-reset: h2;
61
+
62
+ &:before {
63
+ content: counter(h1, var(--header-enum-style)) ". ";
64
+ }
65
+ }
66
+
67
+ h2 {
68
+ counter-increment: h2;
69
+ counter-reset: h3;
70
+
71
+ &:before {
72
+ content:
73
+ counter(h1, var(--header-enum-style))
74
+ "." counter(h2, var(--header-enum-style))
75
+ ". ";
76
+ }
77
+ }
78
+
79
+ h3 {
80
+ counter-reset: h4;
81
+ counter-increment: h3;
82
+
83
+ &:before {
84
+ content:
85
+ counter(h1, var(--header-enum-style))
86
+ "." counter(h2, var(--header-enum-style))
87
+ "." counter(h3, var(--header-enum-style))
88
+ ". ";
89
+ }
90
+ }
91
+
92
+ h4 {
93
+ counter-increment: h4;
94
+ counter-reset: h5;
95
+
96
+ &:before {
97
+ content:
98
+ counter(h1, var(--header-enum-style))
99
+ "." counter(h2, var(--header-enum-style))
100
+ "." counter(h3, var(--header-enum-style))
101
+ "." counter(h4, var(--header-enum-style))
102
+ ". ";
103
+ }
104
+ }
105
+
106
+ h5 {
107
+ counter-increment: h5;
108
+ counter-reset: h6;
109
+
110
+ &:before {
111
+ content:
112
+ counter(h1, var(--header-enum-style))
113
+ "." counter(h2, var(--header-enum-style))
114
+ "." counter(h3, var(--header-enum-style))
115
+ "." counter(h4, var(--header-enum-style))
116
+ "." counter(h5, var(--header-enum-style))
117
+ ". ";
118
+ }
119
+ }
120
+
121
+ h6 {
122
+ counter-increment: h6;
123
+
124
+ &:before {
125
+ content:
126
+ counter(h1, var(--header-enum-style))
127
+ "." counter(h2, var(--header-enum-style))
128
+ "." counter(h3, var(--header-enum-style))
129
+ "." counter(h4, var(--header-enum-style))
130
+ "." counter(h5, var(--header-enum-style))
131
+ "." counter(h6, var(--header-enum-style))
132
+ ". ";
133
+ }
134
+ }
69
135
  }
70
136
 
71
137
  #footer {
@@ -77,43 +143,58 @@ a {
77
143
  padding: 1em 1em 1em 0;
78
144
  font-size: 15px;
79
145
  line-height: 1.7;
80
- overflow: hidden;
81
146
  word-wrap: break-word;
82
147
 
83
148
  /* MediaWiki's TOC table -- this does not pertain to gollum's own TOC functionality */
84
149
  table.toc {
85
150
  width: auto;
86
151
  display: inline-table;
152
+
87
153
  .anchor {
88
154
  display: none;
89
155
  }
90
156
  }
91
157
 
92
- .anchor {
93
- display: inline-block;
94
- position: absolute;
95
- opacity: 0;
96
- background: url('data:image/svg+xml;utf8,<%= rocticon_css(:link) %>') no-repeat;
97
- background-size: 0.6em 1.35em;
98
- padding-right: 0.5em;
99
- padding-top: 0.4em;
100
- margin-left: -0.8em;
101
- width: 1em;
102
- height: 1em;
103
- text-decoration: none;
104
- transition-property: opacity;
105
- transition: 0.1s;
106
- }
158
+ h1,
159
+ h2,
160
+ h3,
161
+ h4,
162
+ h5,
163
+ h6 {
164
+ $anchor-icon-size: 20px;
107
165
 
108
- *:hover > .anchor, .anchor:focus{
109
- opacity: 1;
110
- }
166
+ position: relative;
167
+
168
+ .anchor {
169
+ display: inline-block;
170
+ position: absolute;
171
+ margin-top: 0.1em;
172
+ width: $anchor-icon-size;
173
+ text-decoration: none;
174
+ opacity: 0;
175
+ transition: opacity 0.1s ease-in-out;
111
176
 
112
- .anchor.edit {
113
- margin-left: 2em !important;
114
- margin-top: 0.5em;
115
- height: 0.5em;
116
- background: url('data:image/svg+xml;utf8,<%= rocticon_css(:pencil) %>') no-repeat;
177
+ &:before {
178
+ content: url('data:image/svg+xml;utf8,<%= rocticon_css(:link) %>');
179
+ }
180
+
181
+ &:not(.edit) {
182
+ left: -($anchor-icon-size/2);
183
+ }
184
+
185
+ &.edit {
186
+ margin-left: ($anchor-icon-size/2);
187
+
188
+ &:before {
189
+ content: url('data:image/svg+xml;utf8,<%= rocticon_css(:pencil) %>');
190
+ }
191
+ }
192
+ }
193
+
194
+ &:hover > .anchor,
195
+ .anchor:focus {
196
+ opacity: 1;
197
+ }
117
198
  }
118
199
 
119
200
  a {
@@ -125,13 +206,6 @@ a {
125
206
  color: inherit;
126
207
  text-decoration: none;
127
208
  }
128
-
129
- &:first-child {
130
- h1, h2, h3, h4, h5, h6 {
131
- margin-top: 0;
132
- padding-top: 0;
133
- }
134
- }
135
209
  }
136
210
 
137
211
  > *:first-child {
@@ -166,18 +240,6 @@ a {
166
240
  border-bottom: 1px solid #eee;
167
241
  }
168
242
 
169
- h3 {
170
- }
171
-
172
- h4 {
173
- }
174
-
175
- h5 {
176
- }
177
-
178
- h6 {
179
- }
180
-
181
243
  p, blockquote, ul, ol, dl, table, pre {
182
244
  margin: 15px 0;
183
245
  }
@@ -615,6 +677,10 @@ a {
615
677
  color: #999;
616
678
  background-color: #EAF2F5;
617
679
  }
680
+
681
+ .gg {
682
+ color: #000000a0;
683
+ }
618
684
  }
619
685
 
620
686
  .type-csharp {
@@ -639,15 +705,24 @@ a {
639
705
  .s, .sc {
640
706
  color: #A31515;
641
707
  }
642
- }
708
+ }
643
709
  }
644
710
 
645
711
  div.pagination a.disabled {
646
712
  pointer-events: none;
647
713
  }
648
714
 
715
+ nav.actions {
716
+ scrollbar-width: none;
717
+ -ms-overflow-style: -ms-autohiding-scrollbar;
718
+
719
+ ::webkit-scrollbar {
720
+ display: none;
721
+ }
722
+ }
723
+
649
724
  .search-results {
650
725
  .search-context li:nth-child(n+4) {
651
726
  display: none;
652
727
  }
653
- }
728
+ }
@@ -50,13 +50,13 @@
50
50
 
51
51
  <div id="gollum-editor-format-selector">
52
52
  <label for="format">Keybinding</label>
53
- <select id="keybinding" name="keybinding" class="form-select">
53
+ <select id="keybinding" name="keybinding" class="form-select input-sm">
54
54
  <option selected="selected">default</option>
55
55
  <option>vim</option>
56
56
  <option>emacs</option>
57
57
  </select>
58
58
  <label for="format">Markup</label>
59
- <select id="wiki_format" name="format" class="form-select">
59
+ <select id="wiki_format" name="format" class="form-select input-sm">
60
60
  {{#formats}}
61
61
  {{#enabled}}
62
62
  <option {{#selected}}selected="selected" {{/selected}}value="{{id}}" data-ext="{{ext}}">
@@ -13,7 +13,7 @@
13
13
  <li class="Box-row Box-row--hover-gray border-top d-flex flex-items-center">
14
14
  <span class="float-left col-2" id="user-icons">{{>author_template}}</span>
15
15
  <span class="flex-auto col-1 text-gray-light">{{date}}</span>
16
- <span class="flex-auto col-7">{{message}}<br/>
16
+ <span class="flex-auto col-5">{{message}}<br/>
17
17
  {{#files}}
18
18
  <span class="flex-auto col-2">{{#renamed}}{{renamed}} -> {{/renamed}}<a href="{{link}}">{{file}}</a></span><br/>
19
19
  {{/files}}
@@ -5,13 +5,13 @@
5
5
  <meta name="MobileOptimized" content="width">
6
6
  <meta name="HandheldFriendly" content="true">
7
7
  <meta name="viewport" content="width=device-width">
8
+ {{#sprockets_stylesheet_tag}}primer{{/sprockets_stylesheet_tag}}
8
9
  {{#sprockets_stylesheet_tag}}app{{/sprockets_stylesheet_tag}}
9
10
  {{#sprockets_stylesheet_tag}}print print{{/sprockets_stylesheet_tag}}
10
11
 
11
12
  {{#css}}<link rel="stylesheet" type="text/css" href="{{custom_css}}" media="all">{{/css}}
12
13
  {{#noindex}}<meta name="robots" content="noindex, nofollow" />{{/noindex}}
13
14
 
14
-
15
15
  <script>
16
16
  var criticMarkup = '{{critic_markup}}';
17
17
  var baseUrl = '{{base_url}}';
@@ -0,0 +1,72 @@
1
+ <details class="details-reset details-overlay">
2
+ <summary class="btn btn-invisible" aria-haspopup="true">
3
+ <span aria-label="Open menu">☰</span>
4
+ </summary>
5
+
6
+ <div class="SelectMenu mx-sm-2">
7
+ <div class="SelectMenu-modal">
8
+ <div class="SelectMenu-divider py-3">
9
+ <h2 class="h6">Current Page</h2>
10
+ <div>{{page_header}}</div>
11
+ </div>
12
+
13
+ {{#history}}
14
+ <a
15
+ class="SelectMenu-item"
16
+ href="{{history_path}}/{{escaped_url_path}}"
17
+ role="menuitem"
18
+ >
19
+ <span>History</span>
20
+ </a>
21
+ {{/history}}
22
+
23
+ {{#allow_editing}}
24
+ {{#allow_uploads}}
25
+ <a class="SelectMenu-item minibutton-upload-page" role="menuitem">
26
+ <span>Upload</span>
27
+ </a>
28
+ {{/allow_uploads}}
29
+
30
+ {{#editable}}
31
+ <a class="SelectMenu-item minibutton-rename-page" role="menuitem">
32
+ <span>Rename</span>
33
+ </a>
34
+
35
+ <a
36
+ class="SelectMenu-item minibutton-edit-page"
37
+ href="{{edit_path}}/{{escaped_url_path}}"
38
+ role="menuitem"
39
+ >
40
+ <span>Edit</span>
41
+ </a>
42
+ {{/editable}}
43
+ {{/allow_editing}}
44
+
45
+ <div class="SelectMenu-divider py-3">
46
+ <h2 class="h6">Main Menu</h2>
47
+ </div>
48
+
49
+ <div class="SelectMenu-list">
50
+ <a class="SelectMenu-item" role="menuitem" href="{{page_route}}">
51
+ Home
52
+ </a>
53
+
54
+ {{#overview}}
55
+ <a class="SelectMenu-item" role="menuitem" href="{{overview_path}}">
56
+ Overview
57
+ </a>
58
+ {{/overview}}
59
+
60
+ {{#latest_changes}}
61
+ <a
62
+ class="SelectMenu-item"
63
+ href="{{latest_changes_path}}"
64
+ role="menuitem"
65
+ >
66
+ Latest Changes
67
+ </a>
68
+ {{/latest_changes}}
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </details>
@@ -1,43 +1,105 @@
1
- <nav class="actions pt-4">
2
-
3
- <div class="TableObject">
4
- <div class="TableObject-item">
5
- <a class="btn" id="minibutton-home" href="{{page_route}}">Home</a>
6
- </div>
7
-
8
-
9
- <div class="TableObject-item TableObject-item--primary px-2" {{^search}}style="visibility:hidden"{{/search}}>
10
- {{>searchbar}}
11
- </div>
12
-
13
- <div class="TableObject-item">
14
- {{#overview}}<a class="btn" id="minibutton-overview" href="{{overview_path}}">Overview</a>{{/overview}}
15
- {{#latest_changes}}<a class="btn" id="minibutton-latest-changes" href="{{latest_changes_path}}">Latest Changes</a>{{/latest_changes}}
16
- </div>
17
-
18
- {{#history}}
19
- <div class="TableObject-item pl-1">
20
- <a class="btn" id="minibutton-history" href="{{history_path}}/{{escaped_url_path}}">Page History</a>
21
- </div>
22
- {{/history}}
23
-
1
+ <nav class="actions pt-4 px-2 px-lg-0 overflow-x-scroll">
2
+ <div class="TableObject">
3
+ <div class="TableObject-item hide-lg hide-xl">
4
+ {{>mobilenav}}
5
+ </div>
6
+
7
+ <div class="TableObject-item hide-sm hide-md">
8
+ <a class="btn btn-sm" id="minibutton-home" href="{{page_route}}">
9
+ Home
10
+ </a>
11
+ </div>
12
+
13
+ <div
14
+ class="TableObject-item TableObject-item--primary px-2"
15
+ {{^search}}style="visibility:hidden"{{/search}}
16
+ >
17
+ {{>searchbar}}
18
+ </div>
19
+
20
+ <div class="TableObject-item hide-sm hide-md">
21
+ <div class="BtnGroup" style="display: flex;">
22
+ {{#overview}}
23
+ <a
24
+ class="btn BtnGroup-item btn-sm"
25
+ href="{{overview_path}}"
26
+ id="minibutton-overview"
27
+ >
28
+ Overview
29
+ </a>
30
+ {{/overview}}
31
+
32
+ {{#latest_changes}}
33
+ <a
34
+ class="btn BtnGroup-item btn-sm"
35
+ href="{{latest_changes_path}}"
36
+ id="minibutton-latest-changes"
37
+ >
38
+ Latest Changes
39
+ </a>
40
+ {{/latest_changes}}
41
+ </div>
42
+ </div>
43
+
44
+ {{#history}}
45
+ <div class="TableObject-item pl-2 hide-sm hide-md">
46
+ <a
47
+ class="btn btn-sm"
48
+ href="{{history_path}}/{{escaped_url_path}}"
49
+ id="minibutton-history"
50
+ >
51
+ Page History
52
+ </a>
53
+ </div>
54
+ {{/history}}
55
+
24
56
  {{#allow_editing}}
25
- <div class="TableObject-item pl-1">
26
- {{#allow_uploads}}
27
- <a class="btn" id="minibutton-upload-page" href="#">Upload</a>
28
- {{/allow_uploads}}
29
- {{#editable}}
30
- <a class="btn" id="minibutton-rename-page" href="#">Rename</a>
31
- <a class="btn" id="minibutton-edit-page" href="{{edit_path}}/{{escaped_url_path}}">Edit</a>
32
- <a class="btn btn-primary" id="minibutton-new-page" href="#">New</a>
33
- {{/editable}}
34
- {{^editable}}
35
- {{#newable}}
36
- <a class="btn btn-primary" id="minibutton-new-page" href="#">New</a>
37
- {{/newable}}
38
- {{/editable}}
39
- </div>
40
- {{/allow_editing}}
41
-
42
- </div>
43
- </nav>
57
+ <div class="TableObject-item px-2">
58
+ <div class="BtnGroup" style="display: flex;">
59
+ {{#allow_uploads}}
60
+ <a
61
+ class="btn BtnGroup-item btn-sm hide-sm hide-md
62
+ minibutton-upload-page"
63
+ >
64
+ Upload
65
+ </a>
66
+ {{/allow_uploads}}
67
+
68
+ {{#editable}}
69
+ <a
70
+ class="btn BtnGroup-item btn-sm hide-sm hide-md
71
+ minibutton-rename-page"
72
+ >
73
+ Rename
74
+ </a>
75
+ <a
76
+ class="btn BtnGroup-item btn-sm hide-sm hide-md"
77
+ href="{{edit_path}}/{{escaped_url_path}}"
78
+ id="minibutton-edit-page"
79
+ >
80
+ Edit
81
+ </a>
82
+ {{/editable}}
83
+ </div>
84
+ </div>
85
+
86
+ {{#editable}}
87
+ <div class="TableObject-item">
88
+ <a class="btn btn-primary btn-sm minibutton-new-page" href="#">
89
+ New
90
+ </a>
91
+ </div>
92
+ {{/editable}}
93
+
94
+ {{^editable}}
95
+ {{#newable}}
96
+ <div class="TableObject-item">
97
+ <a class="btn btn-primary btn-sm minibutton-new-page" href="#">
98
+ New
99
+ </a>
100
+ </div>
101
+ {{/newable}}
102
+ {{/editable}}
103
+ {{/allow_editing}}
104
+ </div>
105
+ </nav>