Pinout link (#3810)

* try adding link to page

* change logic

* hide for print view

* change link color
This commit is contained in:
David Holdeman 2022-01-18 17:15:33 -06:00 committed by GitHub
parent fb5456dbaa
commit 6859c3bcbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 0 deletions

View File

@ -151,6 +151,7 @@ pins:
info: info:
title: Proteus title: Proteus
name: Black23 name: Black23
board_url: "https://wiki.rusefi.com/Hardware/Proteus/Proteus/"
id: black23 id: black23
image: image:
file: black23.jpg file: black23.jpg

View File

@ -66,5 +66,7 @@
</div> </div>
</template> </template>
<a id="board-link"></a>
</body> </body>
</html> </html>

View File

@ -194,6 +194,10 @@ window.addEventListener('load', function() {
if (document.title.length == 0 && typeof(connector.info.title) != "undefined") { if (document.title.length == 0 && typeof(connector.info.title) != "undefined") {
document.title = connector.info.title; document.title = connector.info.title;
} }
if (typeof(connector.info.board_url) != "undefined" && document.title.length > 0) {
document.getElementById("board-link").innerText = document.title;
document.getElementById("board-link").href = connector.info.board_url;
}
if (typeof(connector.info.name) != "undefined") { if (typeof(connector.info.name) != "undefined") {
sdiv.querySelector(".connector-name").innerText = connector.info.name; sdiv.querySelector(".connector-name").innerText = connector.info.name;
} }

View File

@ -100,6 +100,10 @@
border-color: sienna; border-color: sienna;
} }
#board-link {
font-size: 24px;
}
.pin-marker:hover { .pin-marker:hover {
transform: scale(2); transform: scale(2);
z-index: 2; z-index: 2;
@ -214,6 +218,14 @@ table th {
table tr:hover { table tr:hover {
background-color: #f15a24; background-color: #f15a24;
} }
a {
color: #71b7ff;
}
a:visited {
color: #71b7ff;
}
} }
@media print { @media print {
@ -271,4 +283,7 @@ table th {
table, tbody, tr { table, tbody, tr {
display: block; display: block;
} }
#board-link {
display: none;
}
} }