1
Fork 0

Add back the column

This commit is contained in:
Michael Howell 2023-12-18 12:11:14 -07:00
parent 859bbc5def
commit bd14fb68da
8 changed files with 33 additions and 65 deletions

View file

@ -146,14 +146,13 @@ define-function: (
)
}
)
store-property: ("#src-sidebar > .title", {
store-property: (".src-sidebar-title", {
"offsetHeight": source_sidebar_title_height,
"offsetTop": source_sidebar_title_y,
})
call-function: ("check-sidebar-dir-entry", {
"x": 0,
// border + margin = 6
"y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
"y": |source_sidebar_title_y| + |source_sidebar_title_height|,
})
// Check the search form
@ -175,13 +174,13 @@ assert-property: ("#main-content", {"offsetTop": 50})
// 8 = 50 - 34 - 8
// Check the sidebar directory entries have a marker and spacing (tablet).
store-property: ("#src-sidebar > .title", {
store-property: (".src-sidebar-title", {
"offsetHeight": source_sidebar_title_height,
"offsetTop": source_sidebar_title_y,
})
call-function: ("check-sidebar-dir-entry", {
"x": 0,
"y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
"y": |source_sidebar_title_y| + |source_sidebar_title_height|,
})
// Tiny, phone mobile gets a different display where the logo is stacked on top.
@ -189,21 +188,11 @@ set-window-size: (450, 700)
assert-css: ("nav.sub", {"flex-direction": "column"})
// Check the sidebar directory entries have a marker and spacing (phone).
store-property: ("#src-sidebar > .title", {
store-property: (".src-sidebar-title", {
"offsetHeight": source_sidebar_title_height,
"offsetTop": source_sidebar_title_y,
})
call-function: ("check-sidebar-dir-entry", {
"x": 0,
"y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
"y": |source_sidebar_title_y| + |source_sidebar_title_height|,
})
// The logo is not present on this page.
assert-false: ".sub-logo-container > img"
// Check the staged-api page instead, which does.
// Now we check that the logo has a bottom margin so it's not stuck to the search input.
go-to: "file://" + |DOC_PATH| + "/src/staged_api/lib.rs.html"
assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
store-property: (".sub-logo-container", {"clientHeight": logo_height})
assert-position: (".search-form", {"y": |logo_height| + 8})