A few fixes

This commit is contained in:
Anthony Bullard 2024-12-16 09:40:25 -06:00
parent 11e736f3e8
commit 04029d36de
No known key found for this signature in database
2 changed files with 17 additions and 9 deletions

View file

@ -156,6 +156,7 @@ pub fn generate_docs_html(root_file: PathBuf, build_dir: &Path) {
"<!-- Package Name -->", "<!-- Package Name -->",
render_name_link(package_name.as_str()).as_str(), render_name_link(package_name.as_str()).as_str(),
) )
.replace("<!-- Package Name String -->", package_name.as_str())
.replace( .replace(
"<!-- Module Docs -->", "<!-- Module Docs -->",
render_package_index(&exposed_module_docs).as_str(), render_package_index(&exposed_module_docs).as_str(),
@ -183,6 +184,7 @@ pub fn generate_docs_html(root_file: PathBuf, build_dir: &Path) {
"<!-- Package Name -->", "<!-- Package Name -->",
render_name_link(package_name.as_str()).as_str(), render_name_link(package_name.as_str()).as_str(),
) )
.replace("<!-- Package Name String -->", package_name.as_str())
.replace( .replace(
"<!-- Module Docs -->", "<!-- Module Docs -->",
render_module_documentation( render_module_documentation(

View file

@ -23,7 +23,7 @@
--font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier,
monospace; monospace;
--top-header-height: 67px; --top-header-height: 67px;
--sidebar-width: 280px; --sidebar-width: clamp(280px, 33dvw, 650px);
--module-search-height: 48px; --module-search-height: 48px;
--module-search-padding-height: 12px; --module-search-padding-height: 12px;
--module-search-form-padding-width: 20px; --module-search-form-padding-width: 20px;
@ -131,7 +131,7 @@ a:hover code {
min-width: 0; /* necessary for text-overflow: ellipsis to work in descendants */ min-width: 0; /* necessary for text-overflow: ellipsis to work in descendants */
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: flex-start;
gap: 16px; gap: 16px;
background-color: var(--violet-bg); background-color: var(--violet-bg);
padding-block: 16px; padding-block: 16px;
@ -202,6 +202,7 @@ main {
flex-direction: column; flex-direction: column;
scrollbar-color: var(--violet) var(--body-bg-color); scrollbar-color: var(--violet) var(--body-bg-color);
scrollbar-gutter: stable both-edges; scrollbar-gutter: stable both-edges;
scroll-padding-top: calc(16px + 16px + 1lh + 16px + 16px);
} }
main > * { main > * {
@ -263,8 +264,7 @@ padding: 0px 16px;
overflow-y: auto; overflow-y: auto;
scrollbar-color: var(--violet) var(--violet-bg); scrollbar-color: var(--violet) var(--violet-bg);
scrollbar-gutter: stable both-edges; scrollbar-gutter: stable both-edges;
view-transition-name: sidebar; transition: all 1s linear;
transition: 1s linear;
} }
.top-header { .top-header {
@ -339,11 +339,17 @@ footer p {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-left: 14px; margin-left: 14px;
padding-left: 26px; padding-left: 27px;
border-left: 2px solid var(--violet); border-left: 2px solid rgb(from var(--gray) r g b / .30);
white-space: nowrap; white-space: nowrap;
} }
.sidebar-sub-entries a:hover {
border-left-color: rgb(from var(--violet) r g b / .60);
color: hsl(from var(--text-color) h s calc(l * 1.5));
background-color: rgb(from white r g b / .10);
}
.module-name { .module-name {
font-size: 28px; font-size: 28px;
line-height: 1em; line-height: 1em;
@ -655,17 +661,15 @@ pre>samp {
} }
#sidebar-nav { #sidebar-nav {
display: none;
left: calc(-1 * var(--sidebar-width)); left: calc(-1 * var(--sidebar-width));
top: 0; top: 0;
bottom: 0; bottom: 0;
position: fixed; position: fixed;
z-index: 2; z-index: 2;
transition: 1s linear; transition: all .2s linear;
} }
body.sidebar-open #sidebar-nav { body.sidebar-open #sidebar-nav {
display: block;
left: 0; left: 0;
} }
@ -796,6 +800,8 @@ pre>samp {
.pkg-and-logo { .pkg-and-logo {
width: 100%; width: 100%;
padding-block: 4px;
align-items: space-between;
} }
.pkg-full-name { .pkg-full-name {