From efc1b9cfd9c04b8d7f8cf0fb35e77bcb94a25a6e Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 18 Nov 2014 03:12:51 -0800 Subject: Fixed sidebar scrolling problems and added a button to collapse/expand the sidebar --- book/src/main/resources/css/side-menu.css | 6 +++--- book/src/main/scala/book/Book.scala | 1 + book/src/main/scalatex/book/handson/GettingStarted.scalatex | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'book') diff --git a/book/src/main/resources/css/side-menu.css b/book/src/main/resources/css/side-menu.css index fbb2b26..81f1ee7 100755 --- a/book/src/main/resources/css/side-menu.css +++ b/book/src/main/resources/css/side-menu.css @@ -302,17 +302,17 @@ code{ .header-link{ opacity: 0.05; } -.menu-item-list li.hide > ul{ +.collapsed.menu-item-list li.hide > ul{ opacity: 1; overflow: hidden; height: 0px; } -.menu-item-list li > ul{ +.collapsed.menu-item-list li > ul{ opacity: 1; overflow: hidden; } -#menu .menu-item-list li.selected > a{ +#menu .collapsed.menu-item-list li.selected > a{ border-left: 2px solid white; } diff --git a/book/src/main/scala/book/Book.scala b/book/src/main/scala/book/Book.scala index d78e622..9323fff 100644 --- a/book/src/main/scala/book/Book.scala +++ b/book/src/main/scala/book/Book.scala @@ -71,6 +71,7 @@ object Book { span ), div(id:="menu") + ), div(id:="main", div(id:="main-box")( diff --git a/book/src/main/scalatex/book/handson/GettingStarted.scalatex b/book/src/main/scalatex/book/handson/GettingStarted.scalatex index b766ea7..314a425 100644 --- a/book/src/main/scalatex/book/handson/GettingStarted.scalatex +++ b/book/src/main/scalatex/book/handson/GettingStarted.scalatex @@ -243,7 +243,7 @@ @p As you can see, this code is still very verbose, with lots of unnecessarily long identifiers such as @hl.javascript{Lexample_ScalaJSExample} in it. This is because we've only performed the @i{fast optimization} on this file, to try and keep the time taken to edit -> compile while developing reasonably short. - @sect{Full Optimization} + @sect{Optimization} @p If we're planning on publishing the app for real, we can run the @i{full optimization}. This takes several seconds longer than the @i{fast optimization}, but results in a significantly smaller and leaner output file @code{example-opt.js}. -- cgit v1.2.3