Skip to content

Commit e366f57

Browse files
author
Martin Spielmann
committed
fix octicons
1 parent 82a77de commit e366f57

File tree

10 files changed

+917
-19
lines changed

10 files changed

+917
-19
lines changed

src/main/java/com/gitblit/wicket/GitBlitWebApp.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,20 @@
1515
*/
1616
package com.gitblit.wicket;
1717

18-
import java.io.File;
19-
import java.io.IOException;
20-
import java.net.URL;
2118
import java.time.Instant;
2219
import java.util.Date;
2320
import java.util.HashMap;
24-
import java.util.List;
2521
import java.util.Locale;
2622
import java.util.Map;
2723
import java.util.TimeZone;
28-
import java.util.stream.Collectors;
2924

30-
import org.apache.commons.io.IOUtils;
31-
import org.apache.sshd.server.ServerBuilder;
3225
import org.apache.wicket.RuntimeConfigurationType;
3326
import org.apache.wicket.Session;
3427
import org.apache.wicket.application.IClassResolver;
35-
import org.apache.wicket.core.util.file.WebApplicationPath;
36-
import org.apache.wicket.core.util.resource.ClassPathResourceFinder;
37-
import org.apache.wicket.core.util.resource.UrlResourceStream;
3828
import org.apache.wicket.markup.html.WebPage;
3929
import org.apache.wicket.protocol.http.WebApplication;
4030
import org.apache.wicket.request.Request;
4131
import org.apache.wicket.request.Response;
42-
import org.apache.wicket.request.mapper.parameter.PageParameters;
43-
import org.apache.wicket.request.resource.IResource;
44-
import org.apache.wicket.request.resource.ResourceReference;
45-
import org.apache.wicket.request.resource.SharedResourceReference;
46-
import org.apache.wicket.request.resource.IResource.Attributes;
47-
import org.apache.wicket.request.resource.PackageResourceReference;
48-
import org.apache.wicket.util.file.IResourceFinder;
49-
import org.apache.wicket.util.resource.IResourceStream;
50-
import org.apache.wicket.util.string.StringValue;
5132
import org.apache.wicket.util.time.Duration;
5233

5334
import ro.fortsoft.pf4j.PluginState;
@@ -119,6 +100,7 @@
119100
import com.gitblit.wicket.resources.StaticResources;
120101
import com.gitblit.wicket.resources.bootstrap.Bootstrap;
121102
import com.gitblit.wicket.resources.fontawesome.FontAwesome;
103+
import com.gitblit.wicket.resources.octicons.Octicons;
122104
import com.google.inject.Inject;
123105
import com.google.inject.Provider;
124106
import com.google.inject.Singleton;
@@ -270,6 +252,7 @@ public void init() {
270252
mount("/filestore", FilestorePage.class);
271253
Bootstrap.install(this);
272254
FontAwesome.install(this);
255+
Octicons.install(this);
273256
StaticResources.install(this);
274257

275258
// allow started Wicket plugins to initialize
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.gitblit.wicket.resources.octicons;
2+
3+
import org.apache.wicket.protocol.http.WebApplication;
4+
import org.apache.wicket.request.resource.PackageResourceReference;
5+
6+
7+
public class Octicons {
8+
public static void install(WebApplication app) {
9+
app.mountResource("/octicons/octicons.css", new PackageResourceReference(Octicons.class, "octicons.css"));
10+
app.mountResource("/octicons/octicons-local.ttf", new PackageResourceReference(Octicons.class, "octicons-local.ttf"));
11+
app.mountResource("/octicons/octicons.eot", new PackageResourceReference(Octicons.class, "octicons.eot"));
12+
app.mountResource("/octicons/octicons.less", new PackageResourceReference(Octicons.class, "octicons.less"));
13+
app.mountResource("/octicons/octicons.svg", new PackageResourceReference(Octicons.class, "octicons.svg"));
14+
app.mountResource("/octicons/octicons.ttf", new PackageResourceReference(Octicons.class, "octicons.ttf"));
15+
app.mountResource("/octicons/octicons.woff", new PackageResourceReference(Octicons.class, "octicons.woff"));
16+
app.mountResource("/octicons/sprockets-octicons.scss", new PackageResourceReference(Octicons.class, "sprockets-octicons.scss"));
17+
18+
}
19+
}
Binary file not shown.
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
@font-face {
2+
font-family: 'octicons';
3+
src: url('octicons.eot?#iefix') format('embedded-opentype'),
4+
url('octicons.woff') format('woff'),
5+
url('octicons.ttf') format('truetype'),
6+
url('octicons.svg#octicons') format('svg');
7+
font-weight: normal;
8+
font-style: normal;
9+
}
10+
11+
/*
12+
13+
.octicon is optimized for 16px.
14+
.mega-octicon is optimized for 32px but can be used larger.
15+
16+
*/
17+
.octicon, .mega-octicon {
18+
font: normal normal normal 16px/1 octicons;
19+
display: inline-block;
20+
text-decoration: none;
21+
text-rendering: auto;
22+
-webkit-font-smoothing: antialiased;
23+
-moz-osx-font-smoothing: grayscale;
24+
-webkit-user-select: none;
25+
-moz-user-select: none;
26+
-ms-user-select: none;
27+
user-select: none;
28+
}
29+
.mega-octicon { font-size: 32px; }
30+
31+
32+
.octicon-alert:before { content: '\f02d'} /*  */
33+
.octicon-alignment-align:before { content: '\f08a'} /*  */
34+
.octicon-alignment-aligned-to:before { content: '\f08e'} /*  */
35+
.octicon-alignment-unalign:before { content: '\f08b'} /*  */
36+
.octicon-arrow-down:before { content: '\f03f'} /*  */
37+
.octicon-arrow-left:before { content: '\f040'} /*  */
38+
.octicon-arrow-right:before { content: '\f03e'} /*  */
39+
.octicon-arrow-small-down:before { content: '\f0a0'} /*  */
40+
.octicon-arrow-small-left:before { content: '\f0a1'} /*  */
41+
.octicon-arrow-small-right:before { content: '\f071'} /*  */
42+
.octicon-arrow-small-up:before { content: '\f09f'} /*  */
43+
.octicon-arrow-up:before { content: '\f03d'} /*  */
44+
.octicon-beer:before { content: '\f069'} /*  */
45+
.octicon-book:before { content: '\f007'} /*  */
46+
.octicon-bookmark:before { content: '\f07b'} /*  */
47+
.octicon-briefcase:before { content: '\f0d3'} /*  */
48+
.octicon-broadcast:before { content: '\f048'} /*  */
49+
.octicon-browser:before { content: '\f0c5'} /*  */
50+
.octicon-bug:before { content: '\f091'} /*  */
51+
.octicon-calendar:before { content: '\f068'} /*  */
52+
.octicon-check:before { content: '\f03a'} /*  */
53+
.octicon-checklist:before { content: '\f076'} /*  */
54+
.octicon-chevron-down:before { content: '\f0a3'} /*  */
55+
.octicon-chevron-left:before { content: '\f0a4'} /*  */
56+
.octicon-chevron-right:before { content: '\f078'} /*  */
57+
.octicon-chevron-up:before { content: '\f0a2'} /*  */
58+
.octicon-circle-slash:before { content: '\f084'} /*  */
59+
.octicon-circuit-board:before { content: '\f0d6'} /*  */
60+
.octicon-clippy:before { content: '\f035'} /*  */
61+
.octicon-clock:before { content: '\f046'} /*  */
62+
.octicon-cloud-download:before { content: '\f00b'} /*  */
63+
.octicon-cloud-upload:before { content: '\f00c'} /*  */
64+
.octicon-code:before { content: '\f05f'} /*  */
65+
.octicon-color-mode:before { content: '\f065'} /*  */
66+
.octicon-comment-add:before,
67+
.octicon-comment:before { content: '\f02b'} /*  */
68+
.octicon-comment-discussion:before { content: '\f04f'} /*  */
69+
.octicon-credit-card:before { content: '\f045'} /*  */
70+
.octicon-dash:before { content: '\f0ca'} /*  */
71+
.octicon-dashboard:before { content: '\f07d'} /*  */
72+
.octicon-database:before { content: '\f096'} /*  */
73+
.octicon-device-camera:before { content: '\f056'} /*  */
74+
.octicon-device-camera-video:before { content: '\f057'} /*  */
75+
.octicon-device-desktop:before { content: '\f27c'} /*  */
76+
.octicon-device-mobile:before { content: '\f038'} /*  */
77+
.octicon-diff:before { content: '\f04d'} /*  */
78+
.octicon-diff-added:before { content: '\f06b'} /*  */
79+
.octicon-diff-ignored:before { content: '\f099'} /*  */
80+
.octicon-diff-modified:before { content: '\f06d'} /*  */
81+
.octicon-diff-removed:before { content: '\f06c'} /*  */
82+
.octicon-diff-renamed:before { content: '\f06e'} /*  */
83+
.octicon-ellipsis:before { content: '\f09a'} /*  */
84+
.octicon-eye-unwatch:before,
85+
.octicon-eye-watch:before,
86+
.octicon-eye:before { content: '\f04e'} /*  */
87+
.octicon-file-binary:before { content: '\f094'} /*  */
88+
.octicon-file-code:before { content: '\f010'} /*  */
89+
.octicon-file-directory:before { content: '\f016'} /*  */
90+
.octicon-file-media:before { content: '\f012'} /*  */
91+
.octicon-file-pdf:before { content: '\f014'} /*  */
92+
.octicon-file-submodule:before { content: '\f017'} /*  */
93+
.octicon-file-symlink-directory:before { content: '\f0b1'} /*  */
94+
.octicon-file-symlink-file:before { content: '\f0b0'} /*  */
95+
.octicon-file-text:before { content: '\f011'} /*  */
96+
.octicon-file-zip:before { content: '\f013'} /*  */
97+
.octicon-flame:before { content: '\f0d2'} /*  */
98+
.octicon-fold:before { content: '\f0cc'} /*  */
99+
.octicon-gear:before { content: '\f02f'} /*  */
100+
.octicon-gift:before { content: '\f042'} /*  */
101+
.octicon-gist:before { content: '\f00e'} /*  */
102+
.octicon-gist-secret:before { content: '\f08c'} /*  */
103+
.octicon-git-branch-create:before,
104+
.octicon-git-branch-delete:before,
105+
.octicon-git-branch:before { content: '\f020'} /*  */
106+
.octicon-git-commit:before { content: '\f01f'} /*  */
107+
.octicon-git-compare:before { content: '\f0ac'} /*  */
108+
.octicon-git-merge:before { content: '\f023'} /*  */
109+
.octicon-git-pull-request-abandoned:before,
110+
.octicon-git-pull-request:before { content: '\f009'} /*  */
111+
.octicon-globe:before { content: '\f0b6'} /*  */
112+
.octicon-graph:before { content: '\f043'} /*  */
113+
.octicon-heart:before { content: '\2665'} /* ♥ */
114+
.octicon-history:before { content: '\f07e'} /*  */
115+
.octicon-home:before { content: '\f08d'} /*  */
116+
.octicon-horizontal-rule:before { content: '\f070'} /*  */
117+
.octicon-hourglass:before { content: '\f09e'} /*  */
118+
.octicon-hubot:before { content: '\f09d'} /*  */
119+
.octicon-inbox:before { content: '\f0cf'} /*  */
120+
.octicon-info:before { content: '\f059'} /*  */
121+
.octicon-issue-closed:before { content: '\f028'} /*  */
122+
.octicon-issue-opened:before { content: '\f026'} /*  */
123+
.octicon-issue-reopened:before { content: '\f027'} /*  */
124+
.octicon-jersey:before { content: '\f019'} /*  */
125+
.octicon-jump-down:before { content: '\f072'} /*  */
126+
.octicon-jump-left:before { content: '\f0a5'} /*  */
127+
.octicon-jump-right:before { content: '\f0a6'} /*  */
128+
.octicon-jump-up:before { content: '\f073'} /*  */
129+
.octicon-key:before { content: '\f049'} /*  */
130+
.octicon-keyboard:before { content: '\f00d'} /*  */
131+
.octicon-law:before { content: '\f0d8'} /* */
132+
.octicon-light-bulb:before { content: '\f000'} /*  */
133+
.octicon-link:before { content: '\f05c'} /*  */
134+
.octicon-link-external:before { content: '\f07f'} /*  */
135+
.octicon-list-ordered:before { content: '\f062'} /*  */
136+
.octicon-list-unordered:before { content: '\f061'} /*  */
137+
.octicon-location:before { content: '\f060'} /*  */
138+
.octicon-gist-private:before,
139+
.octicon-mirror-private:before,
140+
.octicon-git-fork-private:before,
141+
.octicon-lock:before { content: '\f06a'} /*  */
142+
.octicon-logo-github:before { content: '\f092'} /*  */
143+
.octicon-mail:before { content: '\f03b'} /*  */
144+
.octicon-mail-read:before { content: '\f03c'} /*  */
145+
.octicon-mail-reply:before { content: '\f051'} /*  */
146+
.octicon-mark-github:before { content: '\f00a'} /*  */
147+
.octicon-markdown:before { content: '\f0c9'} /*  */
148+
.octicon-megaphone:before { content: '\f077'} /*  */
149+
.octicon-mention:before { content: '\f0be'} /*  */
150+
.octicon-microscope:before { content: '\f089'} /*  */
151+
.octicon-milestone:before { content: '\f075'} /*  */
152+
.octicon-mirror-public:before,
153+
.octicon-mirror:before { content: '\f024'} /*  */
154+
.octicon-mortar-board:before { content: '\f0d7'} /* */
155+
.octicon-move-down:before { content: '\f0a8'} /*  */
156+
.octicon-move-left:before { content: '\f074'} /*  */
157+
.octicon-move-right:before { content: '\f0a9'} /*  */
158+
.octicon-move-up:before { content: '\f0a7'} /*  */
159+
.octicon-mute:before { content: '\f080'} /*  */
160+
.octicon-no-newline:before { content: '\f09c'} /*  */
161+
.octicon-octoface:before { content: '\f008'} /*  */
162+
.octicon-organization:before { content: '\f037'} /*  */
163+
.octicon-package:before { content: '\f0c4'} /*  */
164+
.octicon-paintcan:before { content: '\f0d1'} /*  */
165+
.octicon-pencil:before { content: '\f058'} /*  */
166+
.octicon-person-add:before,
167+
.octicon-person-follow:before,
168+
.octicon-person:before { content: '\f018'} /*  */
169+
.octicon-pin:before { content: '\f041'} /*  */
170+
.octicon-playback-fast-forward:before { content: '\f0bd'} /*  */
171+
.octicon-playback-pause:before { content: '\f0bb'} /*  */
172+
.octicon-playback-play:before { content: '\f0bf'} /*  */
173+
.octicon-playback-rewind:before { content: '\f0bc'} /*  */
174+
.octicon-plug:before { content: '\f0d4'} /*  */
175+
.octicon-repo-create:before,
176+
.octicon-gist-new:before,
177+
.octicon-file-directory-create:before,
178+
.octicon-file-add:before,
179+
.octicon-plus:before { content: '\f05d'} /*  */
180+
.octicon-podium:before { content: '\f0af'} /*  */
181+
.octicon-primitive-dot:before { content: '\f052'} /*  */
182+
.octicon-primitive-square:before { content: '\f053'} /*  */
183+
.octicon-pulse:before { content: '\f085'} /*  */
184+
.octicon-puzzle:before { content: '\f0c0'} /*  */
185+
.octicon-question:before { content: '\f02c'} /*  */
186+
.octicon-quote:before { content: '\f063'} /*  */
187+
.octicon-radio-tower:before { content: '\f030'} /*  */
188+
.octicon-repo-delete:before,
189+
.octicon-repo:before { content: '\f001'} /*  */
190+
.octicon-repo-clone:before { content: '\f04c'} /*  */
191+
.octicon-repo-force-push:before { content: '\f04a'} /*  */
192+
.octicon-gist-fork:before,
193+
.octicon-repo-forked:before { content: '\f002'} /*  */
194+
.octicon-repo-pull:before { content: '\f006'} /*  */
195+
.octicon-repo-push:before { content: '\f005'} /*  */
196+
.octicon-rocket:before { content: '\f033'} /*  */
197+
.octicon-rss:before { content: '\f034'} /*  */
198+
.octicon-ruby:before { content: '\f047'} /*  */
199+
.octicon-screen-full:before { content: '\f066'} /*  */
200+
.octicon-screen-normal:before { content: '\f067'} /*  */
201+
.octicon-search-save:before,
202+
.octicon-search:before { content: '\f02e'} /*  */
203+
.octicon-server:before { content: '\f097'} /*  */
204+
.octicon-settings:before { content: '\f07c'} /*  */
205+
.octicon-log-in:before,
206+
.octicon-sign-in:before { content: '\f036'} /*  */
207+
.octicon-log-out:before,
208+
.octicon-sign-out:before { content: '\f032'} /*  */
209+
.octicon-split:before { content: '\f0c6'} /*  */
210+
.octicon-squirrel:before { content: '\f0b2'} /*  */
211+
.octicon-star-add:before,
212+
.octicon-star-delete:before,
213+
.octicon-star:before { content: '\f02a'} /*  */
214+
.octicon-steps:before { content: '\f0c7'} /*  */
215+
.octicon-stop:before { content: '\f08f'} /*  */
216+
.octicon-repo-sync:before,
217+
.octicon-sync:before { content: '\f087'} /*  */
218+
.octicon-tag-remove:before,
219+
.octicon-tag-add:before,
220+
.octicon-tag:before { content: '\f015'} /*  */
221+
.octicon-telescope:before { content: '\f088'} /*  */
222+
.octicon-terminal:before { content: '\f0c8'} /*  */
223+
.octicon-three-bars:before { content: '\f05e'} /*  */
224+
.octicon-tools:before { content: '\f031'} /*  */
225+
.octicon-trashcan:before { content: '\f0d0'} /*  */
226+
.octicon-triangle-down:before { content: '\f05b'} /*  */
227+
.octicon-triangle-left:before { content: '\f044'} /*  */
228+
.octicon-triangle-right:before { content: '\f05a'} /*  */
229+
.octicon-triangle-up:before { content: '\f0aa'} /*  */
230+
.octicon-unfold:before { content: '\f039'} /*  */
231+
.octicon-unmute:before { content: '\f0ba'} /*  */
232+
.octicon-versions:before { content: '\f064'} /*  */
233+
.octicon-remove-close:before,
234+
.octicon-x:before { content: '\f081'} /*  */
235+
.octicon-zap:before { content: '\26A1'} /* ⚡ */
30.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)