Skip to content

Commit c1747a3

Browse files
committed
Tidy up interfaces.
1 parent 153a35b commit c1747a3

6 files changed

Lines changed: 63 additions & 55 deletions

File tree

common/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="description" content="{{description}}" />
77
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>
88
<link href='{{resource_url}}prettify/prettify.css' rel='stylesheet' />
9-
<link href="{{resource_url}}pinout.scss.css?v=20251207v1" rel="stylesheet">
9+
<link href="{{resource_url}}pinout.scss.css?v=20251207v2" rel="stylesheet">
1010
<link href="{{resource_url}}print.css" rel="stylesheet" media="print">
1111
<link rel="shortcut icon" href="{{resource_url}}pinout-logo.png" type="image/png">
1212
<meta name="generator" content="Pinout.xyz @ https://github.com/pinout-xyz/pinout.xyz, timestamp: {{v}}"/>

generate-html.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,18 @@ def sanitize_type(t):
707707
})
708708

709709

710+
def interfaces_sort(iface):
711+
name = iface['name'].lower()
712+
if name == "ground":
713+
return "6" # Put after 5v5
714+
if name == "1-wire":
715+
return "7" # Put after the moved "Ground"
716+
return iface['name']
717+
718+
710719
def interfaces_menu(current):
711720
interfaces = [overlay for overlay in overlays if overlay['class'] == 'interface']
721+
interfaces.sort(key=interfaces_sort)
712722

713723
html = ''
714724

phatstack/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>pHAT Stack Configurator</title>
55
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
66
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab" rel="stylesheet">
7-
<link href="https://pinout.xyz/resources/pinout.scss.css?v=20251207v1" rel="stylesheet">
7+
<link href="https://pinout.xyz/resources/pinout.scss.css?v=20251207v2" rel="stylesheet">
88
<style type="text/css">
99
body {
1010
font-family: 'Roboto Slab', sans-serif;

resources/pinout.scss

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -357,20 +357,17 @@ Left Column
357357

358358
#interfaces {
359359
grid-area: interfaces;
360-
background: $color-purple;
361-
padding: 0px 0px 2px 2px;
362-
line-height: 2px;
360+
padding: 0;
363361
text-align: center;
364-
font-size: .7em;
365362

366363
div {
367364
background: darken($color-purple,5%);
368365
line-height: 1.45em;
369366
grid-column: 1;
370367
color: #FFF;
371368
align-content: center;
372-
padding: 6px;
373-
margin-top: 2px;
369+
padding: 8px;
370+
margin-bottom: 2px;
374371

375372
a, a:hover, a:visited, a:active {
376373
color: #FFF;
@@ -382,30 +379,34 @@ Left Column
382379

383380
ul {
384381
grid-column: 2;
385-
}
386-
387-
ul, li {
388382
list-style:none;
389-
margin:0;
390-
padding:0;
383+
margin: 0;
384+
padding: 0;
385+
386+
display: flex;
387+
flex-wrap: wrap;
388+
justify-content: right;
389+
gap: 2px;
391390
}
392391

393392
li {
394393
display: contents;
395394
a {
396-
display: inline-block;
397-
padding: 6px 7px 6px 7px;
398-
margin-top: 2px;
399-
margin-right: 2px;
400-
background: darken($color-purple,5%);
395+
padding: 8px;
396+
background: darken($color-purple, 5%);
401397
color: #FFF;
402398
line-height: 1.45em;
399+
flex: 1;
400+
white-space: pre;
401+
font-size: .7em;
403402

404-
&:hover {color: darken($color-purple,5%);background:mix($color-purple,#FFF,20%);}
403+
&:hover {
404+
color: darken($color-purple,5%);
405+
background: mix($color-purple,#FFF,20%);}
405406
}
406407

407408
&.selected a {
408-
background:darken($color-purple,10%);
409+
background: darken($color-purple,10%);
409410
color: #FFF;
410411
text-decoration: underline;
411412
}
@@ -557,11 +558,12 @@ GPIO nav
557558
.bottom .overlay-ground a:hover {
558559
background: linear-gradient(270deg, #268BD2 28px, $overlay-pin-bg-hover 28px);
559560
}
561+
560562
.top .overlay-ground a:hover {
561563
background: linear-gradient(90deg, #268BD2 28px, $overlay-pin-bg-hover 28px);
562564
}
563565

564-
.overlay-ground:hover .pin:after {
566+
.overlay-ground a:hover .pin:after {
565567
background: #268BD2;
566568
}
567569

@@ -673,10 +675,6 @@ code {
673675
}
674676

675677
@media screen and (min-width: 540px) {
676-
#interfaces {
677-
font-size: .8em;
678-
}
679-
680678
#gpio {
681679
a {
682680
font-size:.8em;
@@ -694,7 +692,7 @@ code {
694692
display: grid;
695693
}
696694

697-
.facets .facet li, #interfaces ul a {
695+
.facets .facet li {
698696
font-size: .8em;
699697
}
700698
section {
@@ -744,15 +742,18 @@ code {
744742
#interfaces {
745743
grid-column: 2;
746744
display: grid;
747-
grid-template-columns: 200px auto;
748-
text-align: right;
749745
div {
750-
padding: 6px 6px 6px 13px;
746+
padding: 8px 25px 8px 15px;
747+
margin-bottom: 0;
748+
margin-right: 2px;
751749
text-align: left;
752750
a {
753751
display: block;
754752
}
755753
}
754+
li a {
755+
font-size: .8em;
756+
}
756757
}
757758

758759
#interfaces {
@@ -802,7 +803,6 @@ code {
802803
}
803804
}
804805
#interfaces {
805-
background: #175853;
806806
div, li a {
807807
background: #1a6a64;
808808
}

resources/pinout.scss.css

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -324,20 +324,17 @@ Left Column
324324

325325
#interfaces {
326326
grid-area: interfaces;
327-
background: #6c71c4;
328-
padding: 0px 0px 2px 2px;
329-
line-height: 2px;
327+
padding: 0;
330328
text-align: center;
331-
font-size: 0.7em;
332329
}
333330
#interfaces div {
334331
background: rgb(89.8033980583, 95.4223300971, 188.6966019417);
335332
line-height: 1.45em;
336333
grid-column: 1;
337334
color: #FFF;
338335
align-content: center;
339-
padding: 6px;
340-
margin-top: 2px;
336+
padding: 8px;
337+
margin-bottom: 2px;
341338
}
342339
#interfaces div a, #interfaces div a:hover, #interfaces div a:visited, #interfaces div a:active {
343340
color: #FFF;
@@ -347,23 +344,25 @@ Left Column
347344
}
348345
#interfaces ul {
349346
grid-column: 2;
350-
}
351-
#interfaces ul, #interfaces li {
352347
list-style: none;
353348
margin: 0;
354349
padding: 0;
350+
display: flex;
351+
flex-wrap: wrap;
352+
justify-content: right;
353+
gap: 2px;
355354
}
356355
#interfaces li {
357356
display: contents;
358357
}
359358
#interfaces li a {
360-
display: inline-block;
361-
padding: 6px 7px 6px 7px;
362-
margin-top: 2px;
363-
margin-right: 2px;
359+
padding: 8px;
364360
background: rgb(89.8033980583, 95.4223300971, 188.6966019417);
365361
color: #FFF;
366362
line-height: 1.45em;
363+
flex: 1;
364+
white-space: pre;
365+
font-size: 0.7em;
367366
}
368367
#interfaces li a:hover {
369368
color: rgb(89.8033980583, 95.4223300971, 188.6966019417);
@@ -495,7 +494,7 @@ GPIO nav
495494
#gpio .top .overlay-ground a:hover {
496495
background: linear-gradient(90deg, #268BD2 28px, rgb(245, 243, 237) 28px);
497496
}
498-
#gpio .overlay-ground:hover .pin:after {
497+
#gpio .overlay-ground a:hover .pin:after {
499498
background: #268BD2;
500499
}
501500
#gpio .bottom .overlay-ground .pin:after {
@@ -630,9 +629,6 @@ code {
630629
}
631630

632631
@media screen and (min-width: 540px) {
633-
#interfaces {
634-
font-size: 0.8em;
635-
}
636632
#gpio a {
637633
font-size: 0.8em;
638634
}
@@ -645,7 +641,7 @@ code {
645641
.board #interfaces {
646642
display: grid;
647643
}
648-
.facets .facet li, #interfaces ul a {
644+
.facets .facet li {
649645
font-size: 0.8em;
650646
}
651647
section {
@@ -689,20 +685,25 @@ code {
689685
#interfaces {
690686
grid-column: 2;
691687
display: grid;
692-
grid-template-columns: 200px auto;
693-
text-align: right;
694688
}
695689
.boards-page #interfaces div,
696690
.board #interfaces div,
697691
#interfaces div {
698-
padding: 6px 6px 6px 13px;
692+
padding: 8px 25px 8px 15px;
693+
margin-bottom: 0;
694+
margin-right: 2px;
699695
text-align: left;
700696
}
701697
.boards-page #interfaces div a,
702698
.board #interfaces div a,
703699
#interfaces div a {
704700
display: block;
705701
}
702+
.boards-page #interfaces li a,
703+
.board #interfaces li a,
704+
#interfaces li a {
705+
font-size: 0.8em;
706+
}
706707
#interfaces {
707708
font-size: 1em;
708709
}
@@ -746,9 +747,6 @@ code {
746747
#crumbtrail p, #crumbtrail a, #crumbtrail a:hover, #crumbtrail a:active {
747748
color: #fff;
748749
}
749-
#interfaces {
750-
background: #175853;
751-
}
752750
#interfaces div, #interfaces li a {
753751
background: #1a6a64;
754752
}

src/en/template/localised.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ strings:
2727
- github_repository: 'GitHub Repository'
2828
- board_schematic : 'Schematic'
2929
- buy_now: 'Buy Now'
30-
- browse_addons: 'Browse pinouts for HATs, pHATs and add-ons'
31-
- return_home: 'Return to the Raspberry Pi GPIO Pinout'
30+
- browse_addons: 'Click here to browse pinouts for HATs & pHATs'
31+
- return_home: 'Click here to return to the Raspberry Pi GPIO Pinout'
3232
- boards_title: 'Raspberry Pi HATs, pHATs &amp; Add-ons'
3333
- boards_subtitle: 'Click on a HAT, pHAT or add-on for more details and to see which pins it uses!'

0 commit comments

Comments
 (0)