mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Resolve https://projekte.kosit.org/kosit/validator/-/issues/97 "Replace docsify from UI"
This commit is contained in:
parent
a10cc14d06
commit
219aeaa1b7
100 changed files with 27369 additions and 1072 deletions
|
|
@ -30,7 +30,7 @@ import lombok.RequiredArgsConstructor;
|
|||
|
||||
public class GuiHandler extends BaseHandler {
|
||||
|
||||
private static final URL INDEX_HTML = GuiHandler.class.getClassLoader().getResource("gui/index.html");
|
||||
private static final URL INDEX_HTML = GuiHandler.class.getClassLoader().getResource("ui/index.html");
|
||||
|
||||
public GuiHandler() {
|
||||
if (INDEX_HTML == null) {
|
||||
|
|
@ -45,7 +45,7 @@ public class GuiHandler extends BaseHandler {
|
|||
if (path.equals("/")) {
|
||||
write(exchange, IOUtils.toString(INDEX_HTML, Charset.defaultCharset()).getBytes(), "text/html");
|
||||
} else {
|
||||
final URL resource = GuiHandler.class.getClassLoader().getResource("gui" + path);
|
||||
final URL resource = GuiHandler.class.getClassLoader().getResource("ui" + path);
|
||||
if (resource != null) {
|
||||
write(exchange, IOUtils.toString(resource, Charset.defaultCharset()).getBytes(),
|
||||
Mediatype.resolveBySuffix(resource.getPath()).getMimeType());
|
||||
|
|
@ -59,7 +59,7 @@ public class GuiHandler extends BaseHandler {
|
|||
@Getter
|
||||
protected enum Mediatype {
|
||||
|
||||
JS("application/javascript"), MD("text/markdown"), CSS("text/css");
|
||||
JS("application/javascript"), MD("text/markdown"), CSS("text/css"), SVG("image/svg+xml"), HTML("text/html"), PNG("image/png");
|
||||
|
||||
private final String mimeType;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue