Corrige errores javascript para integrar mdBook
This commit is contained in:
parent
eb3e354f2f
commit
62be835042
2 changed files with 3 additions and 1 deletions
3
website/doc/theme/book.js
vendored
3
website/doc/theme/book.js
vendored
|
|
@ -500,7 +500,8 @@ function playground_text(playground) {
|
||||||
html.classList.add('sidebar-resizing');
|
html.classList.add('sidebar-resizing');
|
||||||
}
|
}
|
||||||
function resize(e) {
|
function resize(e) {
|
||||||
var pos = (e.clientX - sidebar.offsetLeft);
|
var viewportOffset = sidebar.getBoundingClientRect();
|
||||||
|
var pos = (e.clientX - sidebar.offsetLeft - viewportOffset.left);
|
||||||
if (pos < 20) {
|
if (pos < 20) {
|
||||||
hideSidebar();
|
hideSidebar();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ async fn mdbook_page(request: app::HttpRequest) -> ResultPage<Markup, FatalError
|
||||||
if let Ok(html) = std::str::from_utf8(content.data) {
|
if let Ok(html) = std::str::from_utf8(content.data) {
|
||||||
let mut page = Page::new().with_title("Documentación");
|
let mut page = Page::new().with_title("Documentación");
|
||||||
page.context()
|
page.context()
|
||||||
|
.alter(InContextOp::AddMetadata("theme-color", "#ffffff"))
|
||||||
.alter(InContextOp::StyleSheet(
|
.alter(InContextOp::StyleSheet(
|
||||||
AssetsOp::<StyleSheet>::Add(StyleSheet::located("/doc/css/variables.css"))
|
AssetsOp::<StyleSheet>::Add(StyleSheet::located("/doc/css/variables.css"))
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue