mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
fix: let the site search land on cards
The search splits a page at its headings. Emulator cards were titled in bold and platform systems folded into blocks under one heading, so a pasted hash opened the top of a page or the systems overview of a 100-block platform page. Each file card is now a level 4 heading kept out of the table of contents, and each platform system a heading. Card lines that list other pages (platforms, packs, source citations, collection paths) leave the search index: 24.7 MB down to 18.1 MB, the names, hashes and notes still searchable.
This commit is contained in:
1 parent
32dcfcf85a
commit
a67265e903
7 files changed
+189
-34
No files matched your search
+20
-3
@@ -109,6 +109,24 @@
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* A card's title is a heading so the search lands on it, set as body text */
|
||||
.md-typeset .rb-file-title {
|
||||
margin: 0 0 0.3rem;
|
||||
font-size: inherit;
|
||||
font-weight: 400;
|
||||
letter-spacing: normal;
|
||||
scroll-margin-top: 4rem;
|
||||
}
|
||||
|
||||
.md-typeset .rb-file-title code {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Lines the search skips continue the card's list */
|
||||
.rb-search-skip > ul {
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
|
||||
.rb-file-entry ul,
|
||||
.rb-sys-file ul {
|
||||
margin: 0.3rem 0 0;
|
||||
@@ -265,8 +283,7 @@
|
||||
.rb-permalink:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
.rb-file-entry:target,
|
||||
.rb-sys-file:target {
|
||||
.rb-file-entry:has(> .rb-file-title:target),
|
||||
.rb-sys-file:has(> .rb-file-title:target) {
|
||||
background: var(--rb-surface);
|
||||
scroll-margin-top: 4rem;
|
||||
}
|
||||
Reference in new issue
Block a user