Skip to content

Commit 21e5498

Browse files
committed
Update files in jar
1 parent 7318078 commit 21e5498

File tree

2 files changed

+42
-32
lines changed

2 files changed

+42
-32
lines changed

src/main/resources/web/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343
<input type="checkbox" name="hide-offline" id="hide-offline" class="webstats-option">
4444
<label for="hide-offline">Hide offline players</label>
4545
</span>
46+
<span>
47+
<!-- toggle scrolling playernames (optional) -->
48+
<input type="checkbox" name="scroll-playernames" id="scroll-playernames" class="webstats-option">
49+
<label for="scroll-playernames">Scroll playernames</label>
50+
</span>
4651
<span class="webstats-status">
4752
<!-- show loading status and any error messages (optional) -->
4853
<span class="webstats-loading-indicator">Loading...</span>

src/main/resources/web/style.css

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
--status-online: #4F4;
88
--status-afk: #F84;
99
--error: #F44;
10+
--compact-transition-duration: 0.2s;
1011
}
1112

1213
a {
@@ -34,7 +35,13 @@ a {
3435
}
3536

3637
table {
37-
border-spacing: 2px;
38+
--row-height: 50px;
39+
--gap: 2px;
40+
border-spacing: var(--gap);
41+
}
42+
43+
html.compact table {
44+
--row-height: 32px;
3845
}
3946

4047
html.hide-offline tr.offline {
@@ -48,13 +55,12 @@ tr.current-player td:not(.empty) {
4855

4956
td:not(.empty) {
5057
position: relative;
51-
height: 50px;
58+
height: var(--row-height);
5259
padding: 0px 20px;
5360
background: var(--bg1);
5461
text-align: right;
5562
white-space: nowrap;
56-
-webkit-transition: height 0.2s, padding 0.2s;
57-
transition: height 0.2s, padding 0.2s;
63+
transition: height var(--compact-transition-duration), padding var(--compact-transition-duration);
5864
}
5965

6066
td:not(.empty)[data-objective=Player] {
@@ -78,27 +84,40 @@ td:not(.empty)::after {
7884
z-index: -1;
7985
}
8086

87+
td.skin, html.scroll-playernames td[data-objective=Player], html.scroll-playernames th[data-objective=Player] {
88+
position: sticky !important;
89+
z-index: 10;
90+
}
91+
92+
html.scroll-playernames th[data-objective=Player] {
93+
left: 0;
94+
backdrop-filter: blur(5px);
95+
}
96+
97+
html.scroll-playernames td[data-objective=Player] {
98+
left: calc(var(--row-height) + var(--gap));
99+
backdrop-filter: blur(5px);
100+
transition:
101+
height var(--compact-transition-duration),
102+
padding var(--compact-transition-duration),
103+
left var(--compact-transition-duration);
104+
}
105+
81106
td.skin {
107+
left: 0;
82108
padding: 0px !important;
83109
background: transparent;
84-
z-index: 10;
85110
}
86111

87112
td.skin img {
88-
width: 50px;
89-
height: 100%;
113+
width: var(--row-height);
90114
-ms-interpolation-mode: nearest-neighbor;
91115
image-rendering: -webkit-optimize-contrast;
92116
image-rendering: -moz-crisp-edges;
93117
image-rendering: -o-pixelated;
94118
image-rendering: pixelated;
95119
display: block;
96-
transition: width 0.2s;
97-
}
98-
99-
td.skin img[title="#server"] {
100-
/* Disable pixelated rendering for server icon (probably better most of the time) */
101-
image-rendering: auto;
120+
transition: width var(--compact-transition-duration);
102121
}
103122

104123
td.skin[title="#server"] {
@@ -109,34 +128,22 @@ td.skin[title="#server"] {
109128
}
110129

111130
html.compact td:not(.empty){
112-
height: 32px;
113131
padding: 0px 10px;
114132
}
115133

116134
html.compact td:not(.empty)[data-objective=Player]{
117-
padding-left: 32px;
135+
padding-left: var(--row-height);
118136
}
119137

120138
html.compact td:not(.empty)[data-objective=Player][title="#server"] {
121139
padding-left: 10px;
122140
}
123141

124-
html.compact td.skin img {
125-
width: 32px;
126-
}
127-
128-
.sticky {
129-
position: -webkit-sticky !important;
130-
position: sticky !important;
131-
left: 0;
132-
}
133-
134142
th {
135143
padding: 10px 20px;
136144
background: var(--bg2);
137145
cursor: pointer;
138-
-webkit-transition: padding 0.2s;
139-
transition: padding 0.2s;
146+
transition: padding var(--compact-transition-duration);
140147
}
141148

142149
html.compact th{
@@ -151,7 +158,7 @@ th.webstats-sort-column::after {
151158
position: absolute;
152159
top: 10px;
153160
right: 10px;
154-
transition: top 0.2s, right 0.2s;
161+
transition: top var(--compact-transition-duration), right var(--compact-transition-duration);
155162
}
156163

157164
th.webstats-sort-column.ascending::after {
@@ -175,8 +182,7 @@ html.compact th.webstats-sort-column::after {
175182
height: 10px;
176183
border-radius: 10px;
177184
background: var(--status-offline);
178-
-webkit-transition: top 0.2s, left 0.2s;
179-
transition: top 0.2s, left 0.2s;
185+
transition: top var(--compact-transition-duration), left var(--compact-transition-duration);
180186
}
181187

182188
html.compact .status {
@@ -230,8 +236,7 @@ body {
230236
main {
231237
margin: 100px auto;
232238
width: 60%;
233-
-webkit-transition: width 0.2s;
234-
transition: width 0.2s;
239+
transition: width var(--compact-transition-duration);
235240
}
236241

237242
main > span {

0 commit comments

Comments
 (0)