Skip to content

Commit

Permalink
doc: boards: exensions: add board name to side box
Browse files Browse the repository at this point in the history
This adds the board name (displayed as a code literal) to the "Wikipedia
card" for quick reference.

Fixes #81652.

Signed-off-by: Benjamin Cabé <[email protected]>
  • Loading branch information
kartben committed Nov 22, 2024
1 parent da713a2 commit ebe455d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/_extensions/zephyr/domain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def convert_node(self, node):
sidebar += field_list

details = [
("Name", nodes.literal(text=node["id"])),
("Vendor", node["vendor"]),
("Architecture", ", ".join(node["archs"])),
("SoC", ", ".join(node["socs"])),
Expand All @@ -262,7 +263,10 @@ def convert_node(self, node):
field = nodes.field()
field_name = nodes.field_name(text=property_name)
field_body = nodes.field_body()
field_body += nodes.paragraph(text=value)
if isinstance(value, nodes.Node):
field_body += value
else:
field_body += nodes.paragraph(text=value)
field += field_name
field += field_body
field_list += field
Expand Down
7 changes: 7 additions & 0 deletions doc/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,15 @@ li>a.code-sample-link.reference.internal.current {
margin-top: 12px !important;
margin-bottom: 12px !important;
grid-template-columns: auto 1fr !important;
padding-right: 1em;
}

.sidebar.board-overview dl.field-list > dt {
background: transparent !important;
}

.sidebar.board-overview dl.field-list>dd {
margin-left: 1em;
text-overflow: ellipsis;
overflow: hidden;
}

0 comments on commit ebe455d

Please sign in to comment.