Skip to content

Commit 8d5dffd

Browse files
committed
HTML tag overhaul.
1 parent 08cccec commit 8d5dffd

File tree

4 files changed

+119
-225
lines changed

4 files changed

+119
-225
lines changed

assets/pinout.css

Lines changed: 59 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
body {
22
display: grid;
3-
place-items: center;
3+
place-items: top;
44
font-family: Verdana, Geneva, Tahoma, sans-serif;
5-
margin: 0;
65
padding: 0;
76
color: #222;
8-
}
9-
section {
10-
display: grid;
117
grid-template-columns: 480px auto;
12-
grid-column-gap: 20px;
8+
grid-gap: 20px;
139
margin: 20px;
1410
}
15-
article {
16-
}
17-
article p {
18-
margin-top: 0;
19-
}
2011
footer {
2112
display: grid;
13+
grid-column: 1 / 3;
2214
align-items: center;
2315
margin: 20px 0;
2416
}
@@ -27,36 +19,41 @@ footer p {
2719
margin: 0;
2820
text-align: center;
2921
}
30-
nav {
31-
text-align: center;
32-
margin-top: 20px;
33-
}
3422
aside {
23+
grid-template-rows: auto 1fr;
24+
}
25+
aside nav {
3526
display: grid;
3627
grid-template-columns: 50% 50%;
37-
grid-template-rows: auto 1fr;
3828
}
39-
aside div {
40-
grid-column: 1 / 3;
29+
aside h2 {
30+
font-size: 120%;
4131
}
42-
article div img {
43-
max-width: 100%;
32+
aside ul, aside li {
33+
margin: 0;
34+
padding: 0;
4435
}
45-
article div {
46-
padding: 20px;
36+
aside li {
37+
margin-left: 20px;
38+
font-size: 80%;
39+
}
40+
article img {
41+
max-width: 100%;
4742
}
4843
a, a:hover {
4944
color: #859900;
5045
}
5146
a:hover {
5247
text-decoration: none;
5348
}
54-
header {
49+
header, body > nav {
5550
background: #eeeeee;
5651
display: block;
5752
line-height: 22px;
5853
padding: 20px;
5954
display: grid;
55+
}
56+
header {
6057
grid-template-columns: auto auto;
6158
}
6259
header h1 {
@@ -65,21 +62,30 @@ header h1 {
6562
font-size: 20px;
6663
grid-column: 1;
6764
}
68-
header ul {
65+
header ul, nav ul {
6966
grid-column: 2;
7067
list-style: none;
7168
margin: 0;
7269
padding: 0;
7370
text-align: right;
7471
}
75-
header li {
72+
header li, nav li {
7673
display: inline-block;
7774
padding: 0 0 0 10px;
7875
white-space: pre;
7976
}
8077
header li:nth-child(2) a, header li:nth-child(2) a:visited, header li:nth-child(2) a:hover {color: #268bd2;}
8178
header li:nth-child(3) a, header li:nth-child(3) a:visited, header li:nth-child(3) a:hover {color: #d33682;}
8279
header li:nth-child(4) a, header li:nth-child(4) a:visited, header li:nth-child(4) a:hover {color: #dc322f;}
80+
81+
.labels a, .a:visited {
82+
color: inherit;
83+
text-decoration: none;
84+
}
85+
.labels a:hover {
86+
color: inherit;
87+
text-decoration: underline;
88+
}
8389
.labels.right {
8490
counter-reset: pin 0;
8591
}
@@ -104,49 +110,65 @@ header li:nth-child(4) a, header li:nth-child(4) a:visited, header li:nth-child(
104110
line-height: 20px;
105111
color: #ffffffaa;
106112
}
107-
table:nth-child(1) tr:nth-child(1):before {
113+
/* Square pin-1 designator */
114+
.labels:nth-child(1) tr:nth-child(1):before {
108115
border-radius: 0%;
109116
}
110117

111-
td {
118+
.labels td {
112119
height: 22px;
113120
line-height: 22px;
114121
text-align: left;
115122
overflow: hidden;
116123
font-size: 12px;
117-
cursor: default;
118124
white-space: nowrap;
119125
position: relative;
120126
border-bottom: 1px solid #CCCCCC;
121127
padding: 0 0 0 5px;
122128
}
123129

124-
table tr:last-child td, table tr:last-child th {
130+
.labels tr:last-child td, .labels tr:last-child th {
125131
border-bottom: 0;
126132
}
127133

128-
table {
134+
.labels {
129135
border-collapse: collapse;
130136
}
131137

132-
tbody {
138+
.labels tbody {
133139
display: grid;
134140
grid-template-columns: repeat(1, 25px auto auto);
135141
}
136-
tbody tr {
142+
143+
.labels tbody tr {
137144
display: contents;
138145
}
139146

140147

141-
142-
143148
tr.ground td {color: #22222266;}
144149
tr.ground:hover td {color: #fff;}
145150

146151
.labels tbody tr:hover, .labels tbody tr:hover:before {color: #fff;}
147152
.labels.left tr td:last-child {border-left: 5px solid transparent;}
148153
.labels.right tr td:last-child {border-right: 5px solid transparent;}
149154

155+
/* Icon colours, helps diambiguate some of the similar looking icons
156+
which don't pass the squint-test well */
157+
.gpio i {color: #859900aa;}
158+
/*.pwm i {color: #002b36ee;}*/ /* TODO: Too dark for dark mode... */
159+
.power i {color: #dc322faa;}
160+
.i2s i {color: #2aa198aa;}
161+
.gpclk i {color: #df8f8eaa;}
162+
.i2c i {color: #268bd2aa;}
163+
.spi i {color: #d33682aa;}
164+
.uart i {color: #6c71c4aa;}
165+
.ground i {color: #555555aa;}
166+
167+
.fa-solid {margin-right:5px;}
168+
169+
tr:hover i {color: inherit;}
170+
171+
/* Pin colours. Background for the pseudo element that forms the pin. */
150172
.labels tbody tr.gpio:before {background-color: #859900aa;}
151173
.labels tbody tr.pwm:before {background-color: #002b36aa;}
152174
.labels tbody tr.power:before {background-color: #dc322faa;}
@@ -182,8 +204,8 @@ tr.ground:hover td {color: #fff;}
182204
background-color: #000000;
183205
color: #eee;
184206
}
185-
tr.ground td {color: #eeeeee66;}
186-
header {
207+
.labels .ground td {color: #eeeeee66;}
208+
header, body > nav {
187209
background: #111111;
188210
}
189211
.filter label,
@@ -197,7 +219,7 @@ tr.ground:hover td {color: #fff;}
197219
footer a:hover {
198220
color: #3ba6f1;
199221
}
200-
td, th {
222+
.labels td {
201223
border-bottom-color: #333333;
202224
}
203225
.labels tbody tr:before {

build.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ def get_chip_signal(chip, signal):
9292
icon = ""
9393

9494
if row_class == "power":
95-
name = f"{icon} {name}"
95+
name = f"{icon}{name}"
9696
elif canonical_function:
97-
canonical_function = f"{icon} {canonical_function}"
97+
canonical_function = f"{icon}{canonical_function}"
9898

9999
pin_index = index * 2 + bank["pin_offset"]
100100
pins_html += f""" <tr aria-label="Physical pin {index + 1}" class="{row_class}">
101101
<th>{pin_index}</th>
102-
<td>{name}</td>
103-
<td>{canonical_function}</td>
102+
<td><a href="#">{name}</a></td>
103+
<td><a href="#">{canonical_function}</a></td>
104104
</tr>""".replace("\n", "")
105105
pins_html += "\n"
106106

index.html

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)