From 021360e586caa2a62fce459bc75dbd9a5774a495 Mon Sep 17 00:00:00 2001 From: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com> Date: Fri, 29 Jan 2021 09:50:07 +0200 Subject: [PATCH] Contributors now displayed in 3 columns The modal was getting really long so it was widened and contributors now use 3 columns instead of 1 Contributors were also alphabetically sorted --- .../delivery/rendering/html/Contributors.java | 92 +++++++++---------- .../resources/assets/plan/web/css/style.css | 4 + .../main/resources/assets/plan/web/error.html | 4 +- .../resources/assets/plan/web/network.html | 4 +- .../resources/assets/plan/web/player.html | 4 +- .../resources/assets/plan/web/players.html | 4 +- .../resources/assets/plan/web/server.html | 4 +- 7 files changed, 60 insertions(+), 56 deletions(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/Contributors.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/Contributors.java index 0a85b9ea3..1830ad3b4 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/Contributors.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/Contributors.java @@ -29,57 +29,57 @@ import static com.djrapitops.plan.delivery.rendering.html.Contributors.For.LANG; */ public class Contributors { + private static final Contributor[] CONTRIBUTORS = new Contributor[]{ + new Contributor("aidn5", CODE), + new Contributor("Antonok", CODE), + new Contributor("Argetan", CODE), + new Contributor("Aurelien", CODE, LANG), + new Contributor("BrainStone", CODE), + new Contributor("Catalina", LANG), + new Contributor("Elguerrero", LANG), + new Contributor("Combustible", CODE), + new Contributor("Creeperface01", CODE), + new Contributor("CyanTech", LANG), + new Contributor("DarkPyves", CODE), + new Contributor("DaveDevil", LANG), + new Contributor("developStorm", CODE), + new Contributor("enterih", LANG), + new Contributor("Eyremba", LANG), + new Contributor("f0rb1d (\u4f5b\u58c1\u706f)", LANG), + new Contributor("Fur_xia", LANG), + new Contributor("fuzzlemann", CODE, LANG), + new Contributor("Guinness_Akihiko", LANG), + new Contributor("hallo1142", LANG), + new Contributor("itaquito", LANG), + new Contributor("jyhsu2000", CODE), + new Contributor("jvmuller", LANG), + new Contributor("Malachiel", LANG), + new Contributor("Miclebrick", CODE), + new Contributor("Morsmorse", LANG), + new Contributor("Nogapra", LANG), + new Contributor("Saph1s", LANG), + new Contributor("Shadowhackercz", LANG), + new Contributor("shaokeyibb", LANG), + new Contributor("skmedix", CODE), + new Contributor("TDJisvan", LANG), + new Contributor("Vankka", CODE), + new Contributor("yukieji", LANG), + new Contributor("qsefthuopq", LANG), + new Contributor("Karlatemp", CODE, LANG), + new Contributor("Mastory_Md5", LANG), + new Contributor("FluxCapacitor2", CODE), + new Contributor("galexrt", LANG), + }; + private Contributors() { // Static method class } public static String generateContributorHtml() { - Contributor[] contributors = new Contributor[]{ - new Contributor("aidn5", CODE), - new Contributor("Antonok", CODE), - new Contributor("Argetan", CODE), - new Contributor("Aurelien", CODE, LANG), - new Contributor("BrainStone", CODE), - new Contributor("Catalina", LANG), - new Contributor("Elguerrero", LANG), - new Contributor("Combustible", CODE), - new Contributor("Creeperface01", CODE), - new Contributor("CyanTech", LANG), - new Contributor("DarkPyves", CODE), - new Contributor("DaveDevil", LANG), - new Contributor("developStorm", CODE), - new Contributor("enterih", LANG), - new Contributor("Eyremba", LANG), - new Contributor("f0rb1d (\u4f5b\u58c1\u706f)", LANG), - new Contributor("Fur_xia", LANG), - new Contributor("fuzzlemann", CODE, LANG), - new Contributor("Guinness_Akihiko", LANG), - new Contributor("hallo1142", LANG), - new Contributor("itaquito", LANG), - new Contributor("jyhsu2000", CODE), - new Contributor("jvmuller", LANG), - new Contributor("Malachiel", LANG), - new Contributor("Miclebrick", CODE), - new Contributor("Morsmorse", LANG), - new Contributor("Nogapra", LANG), - new Contributor("Saph1s", LANG), - new Contributor("Shadowhackercz", LANG), - new Contributor("shaokeyibb", LANG), - new Contributor("skmedix", CODE), - new Contributor("TDJisvan", LANG), - new Contributor("Vankka", CODE), - new Contributor("yukieji", LANG), - new Contributor("qsefthuopq", LANG), - new Contributor("Karlatemp", CODE, LANG), - new Contributor("Mastory_Md5", LANG), - new Contributor("FluxCapacitor2", CODE), - new Contributor("galexrt", LANG), - }; - int estimatedLength = contributors.length * 40 + 50; + int estimatedLength = CONTRIBUTORS.length * 40 + 50; StringBuilder html = new StringBuilder(estimatedLength); - for (Contributor contributor : contributors) { - contributor.appendHtml(html); - } + Arrays.stream(CONTRIBUTORS).sorted() + .forEach(contributor -> contributor.appendHtml(html)); return html.toString(); } @@ -108,7 +108,7 @@ public class Contributors { } public void appendHtml(StringBuilder html) { - html.append("
  • ") + html.append("
  • ") .append(name); for (For contribution : contributed) { html.append(contribution.toHtml()); diff --git a/Plan/common/src/main/resources/assets/plan/web/css/style.css b/Plan/common/src/main/resources/assets/plan/web/css/style.css index c39c23c87..1ebc11682 100644 --- a/Plan/common/src/main/resources/assets/plan/web/css/style.css +++ b/Plan/common/src/main/resources/assets/plan/web/css/style.css @@ -1234,3 +1234,7 @@ body.sidebar-hidden .fc-popover { body.sidebar-hidden .navbar-nav { display: none; } + +.contributors li { + padding: 0; +} \ No newline at end of file diff --git a/Plan/common/src/main/resources/assets/plan/web/error.html b/Plan/common/src/main/resources/assets/plan/web/error.html index 5aeef2dc2..f15e4894f 100644 --- a/Plan/common/src/main/resources/assets/plan/web/error.html +++ b/Plan/common/src/main/resources/assets/plan/web/error.html @@ -163,7 +163,7 @@