changeset 111:b2a3f202d485

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.
author Mike Pavone <pavone@retrodev.com>
date Sun, 14 Apr 2013 17:24:53 -0700
parents d715fb3c39ab
children c0cf9444cf88
files editor.css index.html src/editor.tp
diffstat 3 files changed, 34 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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
 {
--- 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 @@
 				<li>&&</li>
 				<li>||</li>
 			</ul>
-			<ul><li id="ops_button">operators</li></ul>
+			<ul id="literals">
+				<li>object</li>
+				<li>list</li>
+				<li>array</li>
+				<li>string</li>
+				<li>number</li>
+				<li>new symbol</li>
+			</ul>
+			<ul>
+				<li id="ops_button">operators</li>
+				<li id="lit_button">literals</li>
+			</ul>
+			<ul id="nav">
+				<li id="out">outwards</li><li id="in">inwards</li>
+				<li id="prev">previous</li><li id="next">next</li>
+			</ul>
 		</div>
 	</div>
 </body>
--- 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