diff --git a/Rakefile b/Rakefile index 63e24bf8..2bc6b04d 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,7 @@ require 'yui/compressor' desc "Build the documentation page" task :doc do source = 'documentation/index.html.erb' - child = fork { exec "bin/coffee documentation/coffee/*.coffee -o documentation/js -w" } + child = fork { exec "bin/coffee -c documentation/coffee/*.coffee -o documentation/js -w" } at_exit { Process.kill("INT", child) } Signal.trap("INT") { exit } loop do diff --git a/documentation/css/docs.css b/documentation/css/docs.css index fd1bfb4e..bb2a0583 100644 --- a/documentation/css/docs.css +++ b/documentation/css/docs.css @@ -145,6 +145,9 @@ div.code { border-top: 0; border-bottom: 0; cursor: pointer; } + body.full_screen .navigation { + position: static; + } .navigation.try { border-left: 0; } @@ -174,14 +177,33 @@ div.code { width: 700px; padding: 0; } + body.full_screen .navigation .contents.repl_wrapper { + position: fixed; + width: auto; height: auto; + left: 60px; top: 75px; right: 60px; bottom: 30px; + } .navigation .contents.repl_wrapper .code { -webkit-box-shadow: none; -moz-box-shadow: none; background: transparent; border: 0; + position: static; } + body.full_screen .navigation .contents.repl_wrapper .code { + height: 100%; + padding: 0; margin: 0; + } .navigation .code button { bottom: 10px; + text-transform: none; } + .navigation .full_screen, .navigation .minimize { + right: auto; + left: 10px; + display: none; + } + body.minimized .full_screen, body.full_screen .minimize { + display: inline; + } .navigation .contents a { display: block; width: 300px; @@ -206,19 +228,39 @@ div.code { #repl_source, #repl_results { background: transparent; outline: none; + margin: 5px 0 20px; } - #repl_source { - border: 0; - padding: 5px 7px; + #repl_source_wrap { margin-left: 5px; - min-height: 250px; - resize: none; - width: 295px; + height: 250px; + width: 307px; + position: relative; + float: left; } + #repl_source { + width: 96%; + height: 100%; + border: 0; + resize: none; + } #repl_results { font-family: Monaco, Consolas, "Lucida Console", monospace; text-transform: none; font-weight: normal; - min-height: 260px; - width: 355px; - } \ No newline at end of file + height: 260px; + margin-bottom: 25px; + overflow-y: auto; + width: 370px; + } + body.full_screen #repl_results, body.full_screen #repl_source_wrap { + width: auto; height: auto; + position: absolute; + margin-bottom: 0; + top: 10px; left: 10px; right: 10px; bottom: 40px; + } + body.full_screen #repl_source_wrap { + right: 50%; + } + body.full_screen #repl_results { + left: 50%; + } diff --git a/documentation/index.html.erb b/documentation/index.html.erb index df143110..491668f7 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -22,9 +22,9 @@
This provides the coffee command, which will execute CoffeeScripts - under Node.js by default, but is also used to compile CoffeeScript + under Node.js by default, but is also used to compile CoffeeScript .coffee files into JavaScript, or to run an an interactive REPL. When compiling to JavaScript, coffee writes the output as .js files in the same directory by default, but output @@ -996,7 +998,9 @@ coffee --print app/scripts/*.coffee > concatenation.js # Helper to hide the menus. close_menus: -> - current_nav.removeClass 'active' if current_nav + if current_nav + current_nav.removeClass 'active' + document.body.className: 'minimized' current_nav: null # Bind navigation buttons to open the menus. @@ -1010,6 +1014,12 @@ coffee --print app/scripts/*.coffee > concatenation.js $(document.body).click -> close_menus() + $('.navigation .full_screen').click -> + document.body.className: 'full_screen' + + $('.navigation .minimize').click -> + document.body.className: 'minimized' + compile_source() diff --git a/index.html b/index.html index fbf54f1e..ce292ca5 100644 --- a/index.html +++ b/index.html @@ -8,9 +8,9 @@
This provides the coffee command, which will execute CoffeeScripts - under Node.js by default, but is also used to compile CoffeeScript + under Node.js by default, but is also used to compile CoffeeScript .coffee files into JavaScript, or to run an an interactive REPL. When compiling to JavaScript, coffee writes the output as .js files in the same directory by default, but output @@ -1876,7 +1878,9 @@ task('test # Helper to hide the menus. close_menus: -> - current_nav.removeClass 'active' if current_nav + if current_nav + current_nav.removeClass 'active' + document.body.className: 'minimized' current_nav: null # Bind navigation buttons to open the menus. @@ -1890,6 +1894,12 @@ task('test $(document.body).click -> close_menus() + $('.navigation .full_screen').click -> + document.body.className: 'full_screen' + + $('.navigation .minimize').click -> + document.body.className: 'minimized' + compile_source()