Skip to content

Commit dd346df

Browse files
committed
Misc CSS fixes
1 parent 6231951 commit dd346df

File tree

4 files changed

+46
-23
lines changed

4 files changed

+46
-23
lines changed

public/style.css

+35-14
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
--font-family: monospace;
1212
}
1313

14+
* {
15+
box-sizing: border-box;
16+
}
17+
1418
html,
1519
body {
1620
margin: 0;
@@ -39,16 +43,20 @@ table {
3943
border-collapse: collapse;
4044
}
4145

42-
td:not(:first-child) {
43-
padding-left: 0.5rem;
46+
thead {
47+
font-weight: bold;
4448
}
4549

46-
td:last-child {
47-
text-align: right;
50+
td:not(:last-child) {
51+
padding-right: 0.5rem;
4852
}
4953

50-
thead {
51-
font-weight: bold;
54+
thead tr > td, tbody tr:not(:last-child) > td {
55+
padding-bottom: 0.5rem;
56+
}
57+
58+
td:last-child {
59+
text-align: right;
5260
}
5361

5462
a {
@@ -135,19 +143,29 @@ input[type="password"] {
135143
border: var(--input-border-width) solid var(--accent);
136144
}
137145

146+
input.long {
147+
width: 22em;
148+
}
149+
150+
@media (max-width: 600px) {
151+
input[type="text"]:not([hidden]),
152+
input[type="number"]:not([hidden]),
153+
input[type="password"]:not([hidden]),
154+
input.long:not([hidden]) {
155+
display: block;
156+
width: 100%;
157+
}
158+
}
159+
138160
input[type="number"] {
139-
width: 3rem;
161+
width: 5rem;
140162
}
141163

142164
input[type="checkbox"]:not(:disabled),
143165
input[type="radio"]:not(:disabled) {
144166
cursor: pointer;
145167
}
146168

147-
input.long {
148-
width: 22em;
149-
}
150-
151169
input[type="text"]::placeholder,
152170
input[type="password"]::placeholder {
153171
color: white;
@@ -157,9 +175,8 @@ input[type="password"]::placeholder {
157175
button,
158176
input[type="submit"],
159177
input[type="file"]::file-selector-button {
178+
margin: 0.5em 0;
160179
font-family: var(--font-family);
161-
margin: 0.3em var(--button-shadow-size);
162-
margin-left: var(--button-shadow-size);
163180
background-color: var(--accent);
164181
display: inline-block;
165182
color: white;
@@ -173,6 +190,10 @@ input[type="file"]::file-selector-button {
173190
0 0 0 var(--button-highlight-size) black;
174191
}
175192

193+
input[type="file"]::file-selector-button {
194+
margin-right: 0.5em;
195+
}
196+
176197
button:hover:not(:disabled),
177198
input[type="submit"]:hover:not(:disabled),
178199
input[type="file"]::file-selector-button:hover:not(:disabled) {
@@ -233,8 +254,8 @@ fieldset {
233254

234255
#content {
235256
max-width: 800px;
257+
padding: 1em;
236258
margin: auto;
237-
padding: 1rem;
238259
}
239260

240261
pre {

view/admin.tmpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<thead>
2424
<tr>
2525
<td style="width: 50%">Link</td>
26-
<td>Date Generated</td>
26+
<td>Date&nbsp;Generated</td>
2727
<td></td>
2828
</tr>
2929
</thead>
@@ -36,7 +36,7 @@
3636
>
3737
</td>
3838
<td>
39-
{{ $invite.CreatedAt.Format "Mon Jan _2 15:04:05 MST 2006" }}
39+
{{ $invite.CreatedAt.Format "Jan _2 15:04:05 MST 2006" }}
4040
</td>
4141
<td>
4242
<form
@@ -91,10 +91,10 @@
9191
<tr>
9292
<td colspan="2">User</td>
9393
<td>Players</td>
94-
<td>Max # players*</td>
94+
<td>Max&nbsp;#&nbsp;players*</td>
9595
<td>Admin</td>
9696
<td>Locked</td>
97-
<td>Delete Account</td>
97+
<td>Delete&nbsp;Account</td>
9898
</tr>
9999
</thead>
100100
<tbody>
@@ -122,7 +122,7 @@
122122
<a href="{{ $.App.FrontEndURL }}/web/player/{{ $player.UUID }}">{{ $player.Name }}</a>
123123
{{ end }}
124124
{{ else if gt (len $user.Players) 1 }}
125-
{{ len $user.Players }} players
125+
{{ len $user.Players }}&nbsp;players
126126
{{ end }}
127127
</td>
128128
<td>

view/layout.tmpl

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
</head>
2323
<body>
2424
<div id="background"></div>
25-
<main id="content">{{ block "content" . }}{{ end }}</main>
25+
<main id="content">
26+
{{ block "content" . }}{{ end }}
27+
</main>
2628
<script type="module">
2729
for (const el of document.querySelectorAll(".noscript-hidden")) {
2830
el.classList.remove("noscript-hidden");

view/user.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<td colspan="2">Player</td>
4646
<td>UUID</td>
4747
{{ if or .App.Config.AllowAddingDeletingPlayers .User.IsAdmin }}
48-
<td>Delete Player</td>
48+
<td>Delete&nbsp;Player</td>
4949
{{ end }}
5050
</tr>
5151
</thead>
@@ -563,7 +563,7 @@
563563
</form>
564564
<p>
565565
<details>
566-
<summary>Delete account</summary>
566+
<summary>Delete Account</summary>
567567
<form
568568
action="{{ .App.FrontEndURL }}/web/delete-user"
569569
method="post"
@@ -579,7 +579,7 @@
579579
{{ .App.FrontEndURL }}
580580
{{ end }}"
581581
/>
582-
<input type="submit" value="Delete account" />
582+
<input type="submit" value="Delete Account" />
583583
</form>
584584
</details>
585585
</p>

0 commit comments

Comments
 (0)