# HG changeset patch # User Mike Pavone # Date 1365985493 25200 # Node ID b2a3f202d4851aa49f0ffa4a42410200ce9cf2d8 # Parent d715fb3c39abab22fbee2fbf1bd2e06ba75a2630 Fleshed out the UI a little. Added a "literal" button that replaces the operator panel with a literal panel. Added the navigation buttons, but they're not functional yet. diff -r d715fb3c39ab -r b2a3f202d485 editor.css --- a/editor.css Sat Apr 13 23:37:54 2013 -0700 +++ b/editor.css Sun Apr 14 17:24:53 2013 -0700 @@ -83,7 +83,7 @@ box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; - height: 50%; + height: 33%; margin: 0; overflow: auto; } @@ -100,12 +100,12 @@ border-bottom-width: 0px; } -#editor #operators +#editor #operators, #editor #literals { display: none; } -#editor .showops > #operators +#editor .showops > #operators, #editor .showlit > #literals { display: block; } @@ -123,6 +123,11 @@ cursor: pointer; } +#nav > li +{ + min-width: 20mm; +} + /* AST Nodes */ #src span { diff -r d715fb3c39ab -r b2a3f202d485 index.html --- a/index.html Sat Apr 13 23:37:54 2013 -0700 +++ b/index.html Sun Apr 14 17:24:53 2013 -0700 @@ -32,7 +32,22 @@
  • &&
  • ||
  • - + + + diff -r d715fb3c39ab -r b2a3f202d485 src/editor.tp --- a/src/editor.tp Sat Apr 13 23:37:54 2013 -0700 +++ b/src/editor.tp Sun Apr 14 17:24:53 2013 -0700 @@ -188,10 +188,20 @@ srcel textContent!: (srcel textContent) + (el textContent) } } + visible <- "showops" (q: "#ops_button") onclick!: :event { each: (qall: ".controls") :idx el { + removeClass: el visible addClass: el "showops" } + visible <- "showops" + } + (q: "#lit_button") onclick!: :event { + each: (qall: ".controls") :idx el { + removeClass: el visible + addClass: el "showlit" + } + visible <- "showlit" } path <- (window location) pathname