-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds support for generating an interactive catalog of all the supported boards that can be included in the documentation using the `.. zephyr:board-catalog::` directive. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
- Loading branch information
Showing
8 changed files
with
599 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
214 changes: 214 additions & 0 deletions
214
doc/_extensions/zephyr/domain/static/css/board-catalog.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
/** | ||
* Copyright (c) 2024, The Linux Foundation. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
.hidden { | ||
display: none !important; | ||
} | ||
|
||
.filter-form { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 10px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.filter-form input, | ||
.filter-form select { | ||
appearance: none; | ||
font-family: var(--system-font-family); | ||
font-size: 14px; | ||
border-radius: 50px; | ||
padding: 10px 18px; | ||
flex: 1 1 200px; | ||
background-color: var(--input-background-color); | ||
color: var(--body-color); | ||
transition: all 0.3s ease; | ||
box-shadow: none; | ||
} | ||
|
||
.filter-form input:focus .filter-form select:focus { | ||
border-color: var(--input-focus-border-color); | ||
} | ||
.select-container { | ||
flex: 1 1 200px; | ||
position: relative; | ||
} | ||
|
||
.select-container::after { | ||
content: "\25BC"; | ||
position: absolute; | ||
right: 20px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
pointer-events: none; | ||
font-size: 14px; | ||
color: var(--body-color); | ||
} | ||
|
||
.filter-form select { | ||
padding-right: 40px; | ||
width: 100%; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
} | ||
|
||
#catalog { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
justify-content: center; | ||
margin-top: 20px; | ||
margin-bottom: 40px; | ||
} | ||
|
||
.board-card { | ||
flex: 1 1 calc(33.3% - 20px); | ||
/* Three cards per row */ | ||
max-width: calc(33.3% - 20px); | ||
border-radius: 8px; | ||
padding: 15px 20px; | ||
background-color: var(--admonition-note-background-color); | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
transition: transform 0.3s ease; | ||
} | ||
|
||
.board-card:hover, | ||
.board-card:focus { | ||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); | ||
transform: translateY(-5px); | ||
text-decoration: none; | ||
} | ||
|
||
.board-card .picture { | ||
width: auto; | ||
height: auto; | ||
min-height: 100px; | ||
max-height: 180px; | ||
border-radius: 4px; | ||
margin: 0 auto; | ||
display: flex; | ||
align-items: center; | ||
flex-grow: 1; | ||
padding: 10px 0px; | ||
} | ||
|
||
.board-card .no-picture { | ||
font-size: 5em; | ||
color: var(--admonition-note-title-background-color); | ||
justify-content: center; | ||
} | ||
|
||
.board-card .vendor { | ||
font-size: 12px; | ||
color: var(--admonition-note-color); | ||
font-weight: 900; | ||
margin-bottom: 18px; | ||
opacity: 0.5; | ||
} | ||
|
||
.board-card img { | ||
max-height: 100%; | ||
max-width: 100%; | ||
object-fit: contain; | ||
} | ||
|
||
.board-card .board-name { | ||
font-family: var(--header-font-family); | ||
margin: auto 0 5px; | ||
text-align: center; | ||
font-size: 18px; | ||
font-weight: 500; | ||
color: var(--body-color); | ||
padding-top: 10px; | ||
} | ||
|
||
.board-card .arch { | ||
margin: 5px 0; | ||
text-align: center; | ||
font-size: 12px; | ||
font-weight: 100; | ||
color: var(--body-color); | ||
} | ||
|
||
@media (max-width: 1024px) { | ||
.board-card { | ||
flex: 1 1 calc(50% - 20px); | ||
max-width: calc(50% - 20px); | ||
} | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.board-card { | ||
flex: 1 1 calc(100% - 20px); | ||
max-width: calc(100% - 20px); | ||
} | ||
|
||
.board-card .picture { | ||
min-height: 60px; | ||
max-height: 120px; | ||
} | ||
} | ||
|
||
#form-options .btn { | ||
font-size: 14px; | ||
} | ||
|
||
#form-options .btn:focus { | ||
outline-color: var(--body-color) !important; | ||
} | ||
|
||
#catalog.compact { | ||
display: block; | ||
list-style-type: disc; | ||
margin: 20px; | ||
} | ||
|
||
#catalog.compact .board-card { | ||
display: list-item; | ||
padding: 4px 0; | ||
border: none; | ||
background-color: transparent; | ||
box-shadow: none; | ||
list-style-position: outside; | ||
max-width: none; | ||
} | ||
|
||
#catalog.compact .board-card .vendor, | ||
#catalog.compact .board-card .picture { | ||
display: none; | ||
} | ||
|
||
#catalog.compact .board-card .board-name { | ||
display: inline; | ||
font-family: var(--system-font-family); | ||
text-align: left; | ||
font-size: 16px; | ||
font-weight: normal; | ||
color: var(--body-color); | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#catalog.compact .board-card .arch { | ||
display: inline; | ||
} | ||
|
||
#catalog.compact .board-card .arch::before { | ||
content: " ("; | ||
} | ||
|
||
#catalog.compact .board-card .arch::after { | ||
content: ")"; | ||
} | ||
|
||
#catalog.compact .board-card:hover { | ||
box-shadow: none; | ||
transform: none; | ||
text-decoration: underline; | ||
} |
Oops, something went wrong.