Skip to content

Commit 3675048

Browse files
committed
add doctype to index page and set sans-serif font family
1 parent 3175495 commit 3675048

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

maven-nodejs-proxy/src/main/java/io/wcm/devops/maven/nodejsproxy/resource/IndexPageBuilder.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@
1919
*/
2020
package io.wcm.devops.maven.nodejsproxy.resource;
2121

22-
import io.wcm.devops.maven.nodejsproxy.MavenProxyConfiguration;
23-
2422
import org.apache.commons.lang3.StringUtils;
2523

24+
import io.wcm.devops.maven.nodejsproxy.MavenProxyConfiguration;
25+
2626
/**
2727
* Builds HTML index page
2828
*/
2929
public final class IndexPageBuilder {
3030

3131
private static final String[] EXAMPLE_URLS = new String[] {
32-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0.pom",
33-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-windows-x86.exe",
34-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-windows-x64.exe",
35-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-linux-x86.tar.gz",
36-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-linux-x64.tar.gz",
37-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-darwin-x86.tar.gz",
38-
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-darwin-x64.tar.gz",
39-
"${groupIdPath}/${npmArtifactId}/1.4.9/${npmArtifactId}-1.4.9.pom",
40-
"${groupIdPath}/${npmArtifactId}/1.4.9/${npmArtifactId}-1.4.9.tgz"
32+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0.pom",
33+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-windows-x86.exe",
34+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-windows-x64.exe",
35+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-linux-x86.tar.gz",
36+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-linux-x64.tar.gz",
37+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-darwin-x86.tar.gz",
38+
"${groupIdPath}/${nodeJsArtifactId}/0.12.0/${nodeJsArtifactId}-0.12.0-darwin-x64.tar.gz",
39+
"${groupIdPath}/${npmArtifactId}/1.4.9/${npmArtifactId}-1.4.9.pom",
40+
"${groupIdPath}/${npmArtifactId}/1.4.9/${npmArtifactId}-1.4.9.tgz"
4141
};
4242

4343
private IndexPageBuilder() {
@@ -60,8 +60,11 @@ public static String build(MavenProxyConfiguration config) {
6060

6161
String serviceVersion = IndexPageBuilder.class.getPackage().getImplementationVersion();
6262

63-
return "<html>"
64-
+ "<head><title>Maven NodeJS Proxy</title></head>"
63+
return "<!DOCTYPE html>\n<html>"
64+
+ "<head>"
65+
+ "<title>Maven NodeJS Proxy</title>"
66+
+ "<style>body { font-family: sans-serif; }</style>"
67+
+ "</head>"
6568
+ "<body>"
6669
+ "<h1>Maven NodeJS Proxy</h1>"
6770
+ "<p>This is a Maven Artifact Proxy for NodeJS binaries located at: "
@@ -79,7 +82,7 @@ public static String build(MavenProxyConfiguration config) {
7982
+ "<p>For all files SHA1 checksums are supported (.sha1 suffix). MD5 checksums are not supported.</p>"
8083
+ (serviceVersion != null ? "<hr/><p>Version " + IndexPageBuilder.class.getPackage().getImplementationVersion() + ".</p>" : "")
8184
+ "</body>"
82-
+ "</html>";
85+
+ "</html>";
8386
}
8487

8588
}

0 commit comments

Comments
 (0)