Skip to content

Commit 36cb246

Browse files
committed
Mobile responsive.
1 parent cd21030 commit 36cb246

File tree

2 files changed

+61
-16
lines changed

2 files changed

+61
-16
lines changed

assets/pinout.css

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
body {
2-
display: grid;
3-
place-items: top;
42
font-family: Verdana, Geneva, Tahoma, sans-serif;
53
padding: 0;
4+
margin: 0;
65
color: #222;
7-
grid-template-columns: 480px auto;
8-
grid-gap: 20px;
9-
margin: 20px;
106
}
117
footer {
128
display: grid;
@@ -20,25 +16,38 @@ footer p {
2016
text-align: center;
2117
}
2218
aside {
19+
margin-top: 20px; /* mobile, removed >= 640px */
2320
grid-template-rows: auto 1fr;
21+
grid-template-columns: auto 196px;
22+
display: grid;
2423
}
2524
aside nav {
2625
display: grid;
2726
grid-template-columns: 50% 50%;
27+
grid-column: 1 / 3;
28+
}
29+
aside section img {
30+
margin-top: 20px;
2831
}
2932
aside h2 {
3033
font-size: 120%;
3134
}
32-
aside ul, aside li {
35+
ul, li {
3336
margin: 0;
3437
padding: 0;
3538
}
3639
aside li {
37-
margin-left: 20px;
3840
font-size: 80%;
3941
}
40-
article img {
42+
section img {
4143
max-width: 100%;
44+
height: auto;
45+
}
46+
article section {
47+
margin: 0 20px 0 20px;
48+
}
49+
article section li {
50+
margin: 0 0 15px 0;
4251
}
4352
a, a:hover {
4453
color: #859900;
@@ -54,6 +63,7 @@ header, body > nav {
5463
display: grid;
5564
}
5665
header {
66+
margin-top: 20px; /* mobile, removed >= 640px */
5767
grid-template-columns: auto auto;
5868
}
5969
header h1 {
@@ -203,10 +213,42 @@ tr:hover i {color: inherit;}
203213
.labels tbody tr.uart:hover:before {background-color: #6c71c4cc;border-color: #6c71c4;}
204214
.labels tbody tr.ground:hover:before{background-color: #555555cc;border-color: #555555;}
205215

216+
section, footer {
217+
margin: 20px; /* mobile, removed >= 640px */
218+
}
219+
220+
@media (min-width: 640px) {
221+
body {
222+
display: grid;
223+
grid-template-columns: 480px auto;
224+
grid-gap: 20px;
225+
margin: 20px;
226+
}
227+
section, footer {
228+
margin: 0;
229+
}
230+
aside {
231+
margin-top: 0;
232+
grid-row: 2;
233+
}
234+
aside li {
235+
margin-left: 20px;
236+
}
237+
article p:nth-child(1) {
238+
margin-top: 0;
239+
}
240+
body > header {
241+
margin-top: 0;
242+
grid-row: 1;
243+
grid-column: 2;
244+
}
245+
}
246+
206247
@media (prefers-color-scheme: dark) {
207248
body {
208249
background-color: #000000;
209250
color: #eee;
251+
margin: 20px;
210252
}
211253
.labels .ground td {color: #eeeeee66;}
212254
header, body > nav {

template.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<li><a href="#">Pi 1</a></li>
2424
</ul>
2525
</nav>
26-
<header>
27-
<h1>Raspberry Pi 5 Pinout</h1>
28-
<ul><li title="Please donate to support continued work on these websites! Thank you.">Donate</li><li><a href="https://ko-fi.com/gadgetoid" title="Buy me a coffee on Ko-Fi">Ko-Fi</a></li><li><a href="https://github.com/sponsors/Gadgetoid" title="Sponsor me on GitHub">GitHub</a></li><li><a href="https://www.patreon.com/gadgetoid" title="Sponsor me on Patreon">Patreon</a></li></ul>
29-
</header>
3026
<aside>
3127
<nav>
3228
{pinout_table}
@@ -44,26 +40,33 @@ <h2>Legend</h2>
4440
<li class="gpclk"><i aria-label="Clock icon" class="fa-solid fa-clock"></i> GPCLK<small> - General-purpose Clock</small></li>
4541
</ul>
4642
</section>
43+
<section>
44+
<img src="//pinout.xyz/resources/pi-orientation.png" width="196" height="297">
45+
</section>
4746
</aside>
47+
<header>
48+
<h1>Raspberry Pi 5 Pinout</h1>
49+
<ul><li title="Please donate to support continued work on these websites! Thank you.">Donate</li><li><a href="https://ko-fi.com/gadgetoid" title="Buy me a coffee on Ko-Fi">Ko-Fi</a></li><li><a href="https://github.com/sponsors/Gadgetoid" title="Sponsor me on GitHub">GitHub</a></li><li><a href="https://www.patreon.com/gadgetoid" title="Sponsor me on Patreon">Patreon</a></li></ul>
50+
</header>
4851
<article>
4952
<section>
5053
<p>This GPIO Pinout is an interactive reference to the Raspberry Pi GPIO pins, and a guide to the Raspberry Pi's GPIO interfaces.</p>
51-
<h4>Support Pinout.xyz</h4>
54+
<h3>Support Pinout.xyz</h3>
5255
<p>If you love Pinout, please help me fund new features and improvements via:</p>
5356
<ul>
5457
<li>GitHub at <a href="https://github.com/sponsors/gadgetoid">GitHub.com/sponsors/gadgetoid</a></li>
5558
<li>Patreon at <a href="https://www.patreon.com/gadgetoid">Patreon.com/gadgetoid</a></li>
5659
<li>Ko-Fi at <a href="https://ko-fi.com/gadgetoid">Ko-fi.com/gadgetoid</a></li>
5760
</ul>
5861
<p>Every $1 makes all the difference! Thank you.</p>
59-
<h4>What do these numbers mean?</h4>
62+
<h3>What do these numbers mean?</h3>
6063
<ul>
6164
<li>GPIO - General Purpose Input/Output, aka "BCM" or "Broadcom". These are the big numbers, e.g. "GPIO 22". You'll use these with gpiod or GPIO Zero.</li>
6265
<li>Physical - or "Board" correspond to the pin's physical location on the header. These are the small numbers next to the header, e.g. "Physical Pin 15".</li>
6366
</ul>
64-
<h4>What's the orientation of this pinout?</h4>
67+
<h3>What's the orientation of this pinout?</h3>
6568
<p>Pinout depicts pin 1 in the top left corner. Pin 1 is the only pin with a square solder pad, which may only be visible from the underside of your Pi. If you orient your Pi such that you are looking at the top with the GPIO on the right and HDMI port(s) on the left, your orientation will match Pinout.</p>
66-
<h2>Graphical Pinout</h2>
69+
<h3>Graphical Pinout</h3>
6770
<p>We've whipped up a simple graphical Raspberry Pi GPIO Pinout. Feel free to print, embed, share or hotlink this image and don't forget to credit us!</p>
6871
<p><img alt="Graphical Raspberry Pi GPIO Pinout" src="https://raw.githubusercontent.com/pinout-xyz/Pinout.xyz/master/resources/raspberry-pi-pinout.png" /></p>
6972
</section>

0 commit comments

Comments
 (0)