mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-15 22:43:48 -06:00
fix: render a single tab without a tab bar
142 tab bars held one tab, most of them "On the device" under a heading saying so. One item now stands alone, led by its label unless it names the place the text around already gives. The network route drops "Run the command on the computer" under the heading "From your computer", which keeps RetroPie in its word budget.
This commit is contained in:
1 parent
124e96cd09
commit
32cc1ce4fa
6 files changed
+39
-4
No files matched your search
+10
-1
@@ -139,8 +139,17 @@ def details(kind: str, title: str, body: list[str], indent: str = "", opened: bo
|
||||
|
||||
def tabs(items: list[tuple[str, list[str]]], indent: str = "", sync: str = "os") -> list[str]:
|
||||
"""Content tabs. Tabs that share a label share the reader's choice
|
||||
across pages."""
|
||||
across pages.
|
||||
|
||||
One item is no choice: 142 bars offered a single tab, most of them
|
||||
"On the device" under a heading that says so. Its body stands alone,
|
||||
led by its label when it has one: the RetroPie card is read from Linux
|
||||
only, and the label is where the page said so."""
|
||||
lines: list[str] = []
|
||||
if len(items) == 1:
|
||||
label, body = items[0]
|
||||
lead = [f"{indent}**{label}**", ""] if label else []
|
||||
return [*lead, *_indented(_trim(body), indent), ""]
|
||||
if _engine == "mkdocs":
|
||||
for label, body in items:
|
||||
lines += [f'{indent}=== "{label}"', "", *_indented(_trim(body), indent + " "), ""]
|
||||
|
||||
Reference in new issue
Block a user