mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 12:07:35 +01:00
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
This commit is contained in:
parent
4d82a1a8ae
commit
021360e586
@ -29,12 +29,7 @@ import static com.djrapitops.plan.delivery.rendering.html.Contributors.For.LANG;
|
|||||||
*/
|
*/
|
||||||
public class Contributors {
|
public class Contributors {
|
||||||
|
|
||||||
private Contributors() {
|
private static final Contributor[] CONTRIBUTORS = new Contributor[]{
|
||||||
// Static method class
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String generateContributorHtml() {
|
|
||||||
Contributor[] contributors = new Contributor[]{
|
|
||||||
new Contributor("aidn5", CODE),
|
new Contributor("aidn5", CODE),
|
||||||
new Contributor("Antonok", CODE),
|
new Contributor("Antonok", CODE),
|
||||||
new Contributor("Argetan", CODE),
|
new Contributor("Argetan", CODE),
|
||||||
@ -75,11 +70,16 @@ public class Contributors {
|
|||||||
new Contributor("FluxCapacitor2", CODE),
|
new Contributor("FluxCapacitor2", CODE),
|
||||||
new Contributor("galexrt", LANG),
|
new Contributor("galexrt", LANG),
|
||||||
};
|
};
|
||||||
int estimatedLength = contributors.length * 40 + 50;
|
|
||||||
StringBuilder html = new StringBuilder(estimatedLength);
|
private Contributors() {
|
||||||
for (Contributor contributor : contributors) {
|
// Static method class
|
||||||
contributor.appendHtml(html);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String generateContributorHtml() {
|
||||||
|
int estimatedLength = CONTRIBUTORS.length * 40 + 50;
|
||||||
|
StringBuilder html = new StringBuilder(estimatedLength);
|
||||||
|
Arrays.stream(CONTRIBUTORS).sorted()
|
||||||
|
.forEach(contributor -> contributor.appendHtml(html));
|
||||||
return html.toString();
|
return html.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ public class Contributors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void appendHtml(StringBuilder html) {
|
public void appendHtml(StringBuilder html) {
|
||||||
html.append("<li>")
|
html.append("<li class=\"col-4\">")
|
||||||
.append(name);
|
.append(name);
|
||||||
for (For contribution : contributed) {
|
for (For contribution : contributed) {
|
||||||
html.append(contribution.toHtml());
|
html.append(contribution.toHtml());
|
||||||
|
@ -1234,3 +1234,7 @@ body.sidebar-hidden .fc-popover {
|
|||||||
body.sidebar-hidden .navbar-nav {
|
body.sidebar-hidden .navbar-nav {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contributors li {
|
||||||
|
padding: 0;
|
||||||
|
}
|
@ -163,7 +163,7 @@
|
|||||||
<!-- Information Modal -->
|
<!-- Information Modal -->
|
||||||
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
||||||
role="dialog" tabindex="-1">
|
role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
||||||
@ -188,7 +188,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<p>Player Analytics is developed by Rsl1122.</p>
|
<p>Player Analytics is developed by Rsl1122.</p>
|
||||||
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
||||||
<ul>
|
<ul class="row contributors">
|
||||||
${contributors}
|
${contributors}
|
||||||
<li>& Bug reporters!</li>
|
<li>& Bug reporters!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -716,7 +716,7 @@
|
|||||||
<!-- Information Modal -->
|
<!-- Information Modal -->
|
||||||
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
||||||
role="dialog" tabindex="-1">
|
role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
||||||
@ -741,7 +741,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<p>Player Analytics is developed by Rsl1122.</p>
|
<p>Player Analytics is developed by Rsl1122.</p>
|
||||||
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
||||||
<ul>
|
<ul class="row contributors">
|
||||||
${contributors}
|
${contributors}
|
||||||
<li>& Bug reporters!</li>
|
<li>& Bug reporters!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -623,7 +623,7 @@
|
|||||||
<!-- Information Modal -->
|
<!-- Information Modal -->
|
||||||
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
||||||
role="dialog" tabindex="-1">
|
role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
||||||
@ -648,7 +648,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<p>Player Analytics is developed by Rsl1122.</p>
|
<p>Player Analytics is developed by Rsl1122.</p>
|
||||||
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
||||||
<ul>
|
<ul class="row contributors">
|
||||||
${contributors}
|
${contributors}
|
||||||
<li>& Bug reporters!</li>
|
<li>& Bug reporters!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -173,7 +173,7 @@
|
|||||||
<!-- Information Modal -->
|
<!-- Information Modal -->
|
||||||
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
||||||
role="dialog" tabindex="-1">
|
role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
||||||
@ -198,7 +198,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<p>Player Analytics is developed by Rsl1122.</p>
|
<p>Player Analytics is developed by Rsl1122.</p>
|
||||||
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
||||||
<ul>
|
<ul class="row contributors">
|
||||||
${contributors}
|
${contributors}
|
||||||
<li>& Bug reporters!</li>
|
<li>& Bug reporters!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1188,7 +1188,7 @@
|
|||||||
<!-- Information Modal -->
|
<!-- Information Modal -->
|
||||||
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
<div aria-hidden="true" aria-labelledby="informationModalLabel" class="modal fade" id="informationModal"
|
||||||
role="dialog" tabindex="-1">
|
role="dialog" tabindex="-1">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
<h5 class="modal-title" id="informationModalLabel"><i class="fa fa-fw fa-question-circle"></i>
|
||||||
@ -1213,7 +1213,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<p>Player Analytics is developed by Rsl1122.</p>
|
<p>Player Analytics is developed by Rsl1122.</p>
|
||||||
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
<p>In addition following <span class="col-plan">awesome people</span> have contributed:</p>
|
||||||
<ul>
|
<ul class="row contributors">
|
||||||
${contributors}
|
${contributors}
|
||||||
<li>& Bug reporters!</li>
|
<li>& Bug reporters!</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user