Skip to content

Commit 6706e7d

Browse files
authored
CSS Color Palette
# Changes * Centralized CSS color definitions to top of css file in var()'s to make an easily adjusted palette. * Moved table css out of individual files and into global css.
1 parent 1a691a9 commit 6706e7d

File tree

3 files changed

+57
-63
lines changed

3 files changed

+57
-63
lines changed

_datafiles/html/public/online.html

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
11
{{template "header" .}}
22

33
<style>
4-
.online td {
5-
font-size: 1.5em;
6-
}
7-
table.online {
8-
width: 100%;
9-
}
10-
table.online th {
11-
background-color:#ccc;
12-
color:#000;
13-
}
14-
table.online tr {
15-
border-bottom: 1px solid #ddd;
16-
background-color: #ffffff;
17-
}
18-
table.online tr:nth-child(even) {
19-
background-color: #D6EEEE;
20-
}
21-
table.online td {
22-
font-family: monospace;
23-
color:#000;
24-
}
4+
255
</style>
266

277
<div class="overlay">
288
<h3>Users Online: </h3>
299

3010
{{if gt (len .OnlineUsers) 0 }}
31-
<table class="online" border="1" cellspacing="0" cellpadding="3">
11+
<table>
3212
<tr>
3313
<th>#</th>
3414
<th>Character</th>

_datafiles/html/public/viewconfig.html

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,9 @@
11
{{template "header" .}}
22

3-
<style>
4-
.config td {
5-
font-size: 1.5em;
6-
}
7-
table.config {
8-
width: 100%;
9-
}
10-
table.config th {
11-
background-color:#ccc;
12-
color:#000;
13-
}
14-
table.config tr {
15-
border-bottom: 1px solid #ddd;
16-
background-color: #ffffff;
17-
}
18-
table.config tr:nth-child(even) {
19-
background-color: #D6EEEE;
20-
}
21-
table.config td {
22-
font-family: monospace;
23-
color:#000;
24-
}
25-
26-
</style>
27-
283
<div class="overlay">
294
<h3>Server Config: </h3>
305

31-
<table class="config" border="1" cellspacing="0" cellpadding="3">
6+
<table>
327
<tr>
338
<th>Name</th>
349
<th>Value</th>

_datafiles/html/static/public/css/gomud.css

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1+
:root {
2+
--header-background: #495659;
3+
--nav-background: #6c7682;
4+
--footer-background: #495659;
5+
--button-background: #6c7682;;
6+
--button-background-hover: #80a5a9;
7+
--button-shadow: #80a5a9;
8+
--text-primary-color: #c9e2db;
9+
--text-secondary-color: #6c869f;
10+
/* Table Specific Colors */
11+
--table-border-color: #000;
12+
--table-header-color: var(--header-background);
13+
--table-text-color: #000;
14+
--table-cell-color: #c9e2db;
15+
--table-cell-alt-color: #80a5a9;
16+
}
17+
118
body {
219
margin: 0;
320
padding: 0;
421
background: url('/static/public/images/gomud_bg.webp') center center / cover no-repeat fixed;
5-
color: #c9e2db;
22+
color: var(--text-primary-color);
623
font-family: 'Press Start 2P', monospace;
724
display: flex;
825
flex-direction: column;
@@ -15,7 +32,7 @@ a {
1532
}
1633

1734
header {
18-
background-color: #495659;
35+
background-color: var(--header-background);
1936
display: flex;
2037
justify-content: space-between;
2138
align-items: center;
@@ -25,21 +42,21 @@ header {
2542
.gomud-btn {
2643
font-size: 1.5rem;
2744
padding: 6px 10px;
28-
color: #c9e2db;
29-
background-color: #6c7682;
30-
border: 2px solid #c9e2db;
45+
color: var(--text-primary-color);
46+
background-color: var(--button-background);
47+
border: 2px solid var(--text-primary-color);
3148
text-transform: uppercase;
3249
letter-spacing: 2px;
3350
transition: all 0.2s ease;
3451
}
3552

3653
.gomud-btn:hover {
37-
box-shadow: 6px 6px 0px 0px #80a5a9;
38-
color: #80a5a9;
54+
box-shadow: 6px 6px 0px 0px var(--button-shadow);
55+
color: var(--button-background-hover);
3956
}
4057

4158
nav {
42-
background-color: #6c7682;
59+
background-color: var(--nav-background);
4360
padding: 12px 0;
4461
}
4562

@@ -54,16 +71,16 @@ nav {
5471
}
5572

5673
.nav-container a {
57-
color: #c9e2db;
74+
color: var(--text-primary-color);
5875
text-decoration: none;
5976
padding: 8px 16px;
6077
border-radius: 4px;
6178
background-color: rgba(255, 255, 255, 0.1);
62-
box-shadow: 2px 2px 0px 0px #80a5a9;
79+
box-shadow: 2px 2px 0px 0px var(--button-shadow);
6380
}
6481

6582
.nav-container a:hover {
66-
color: #80a5a9;
83+
color: var(--button-background-hover);
6784
background-color: rgba(255, 255, 255, 0.2);
6885
}
6986

@@ -77,7 +94,7 @@ nav {
7794
.nav-toggle div {
7895
width: 30px;
7996
height: 4px;
80-
background: #c9e2db;
97+
background: var(--text-primary-color);
8198
margin: 5px;
8299
}
83100

@@ -135,18 +152,40 @@ nav {
135152
}
136153

137154
footer {
138-
background-color: #495659;
155+
background-color: var(--header-background);
139156
text-align: center;
140-
color: #c9e2db;
157+
color: var(--text-primary-color);
141158
padding: 16px 0;
142159
font-size: 0.875rem;
143160
}
144161

145162
footer a {
146-
color: #6c869f;
163+
color: var(--text-secondary-color);
147164
text-decoration: none;
148165
}
149166

150167
footer a:hover {
151168
text-decoration: underline;
152169
}
170+
171+
172+
table {
173+
width: 100%;
174+
color:var(--table-text-color)
175+
}
176+
table th {
177+
background-color:var(--header-background);
178+
padding:1em;
179+
}
180+
table tr {
181+
background-color: var(--table-cell-color);
182+
}
183+
table tr:nth-child(even) {
184+
background-color: var(--table-cell-alt-color);
185+
}
186+
table td {
187+
font-size: 1.5em;
188+
padding:.1em;
189+
font-family: monospace;
190+
text-align:left;
191+
}

0 commit comments

Comments
 (0)