diff --git a/docs_assets/extra.css b/docs_assets/extra.css index 7dd58fa0..499487b6 100644 --- a/docs_assets/extra.css +++ b/docs_assets/extra.css @@ -684,3 +684,25 @@ animation-iteration-count: 1 !important; } } + +/* A file card can be cited by URL: its link shows on hover, and the card a + link lands on is marked. */ +.rb-permalink { + margin-left: 0.4rem; + color: var(--md-default-fg-color--light, var(--rb-border)); + text-decoration: none; + opacity: 0; + transition: opacity 0.15s; +} +.rb-file-entry:hover .rb-permalink, +.rb-sys-file:hover .rb-permalink, +.rb-permalink:focus { + opacity: 1; +} +.rb-file-entry:target, +.rb-sys-file:target { + outline: 2px solid var(--md-accent-fg-color, var(--rb-border)); + outline-offset: 2px; + scroll-margin-top: 4rem; +} + diff --git a/scripts/generate_site.py b/scripts/generate_site.py index 2ef9e64e..e04de3fd 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -1776,8 +1776,11 @@ def _system_file_card(f: dict, consumers: FileConsumers) -> list[str]: sha1_short = sha1_full[:12] if sha1_full != "unknown" else "-" md5_short = md5_full[:12] if md5_full != "unknown" else "-" - lines = ['