From d2732fceca505157f58de882f35a4b419690ddd1 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Fri, 4 Nov 2011 17:19:00 -0400 Subject: [PATCH] start on deck designer --- index.html | 2 ++ server.coffee | 11 ++++++++++- style.less | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1127b5b..a1dd2ad 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ + @@ -21,5 +22,6 @@
Cards in this green area (except the two piles on the right) always appear face-down to the other player.
+

Deck Designer

diff --git a/server.coffee b/server.coffee index 82e4872..498e391 100644 --- a/server.coffee +++ b/server.coffee @@ -23,11 +23,17 @@ css_handler = (args, out, request, url_parts) -> out.end css js_handler = (args, out, request, url_parts) -> + convert = false basename = url_parts.pathname.substr 1, (url_parts.pathname.length - 4) if basename is 'client' filename = 'client.coffee' + convert = true else if basename is 'common' filename = 'common.coffee' + convert = true + else if basename is 'cs_cards' + filename = 'cs_cards.js' + convert = false else error = "Unknown js basename: #{basename}" console.log error @@ -37,7 +43,10 @@ js_handler = (args, out, request, url_parts) -> fs.readFile filename, 'utf8', (err, data) -> if err return out.end "Server failed to read #{filename}" - out.end coffee.compile data + if convert + out.end coffee.compile data + else + out.end data html_handler = (args, out, request, url_parts) -> fs.readFile 'index.html', 'utf8', (err, data) -> diff --git a/style.less b/style.less index 31bb99d..db96490 100644 --- a/style.less +++ b/style.less @@ -156,3 +156,15 @@ h1 { #my_side div { top: 0; // @table-height - @hand-height; } + +#deck_designer { + position: absolute; + top: 40px; + left: 10px; + background: white; + z-index: 10000; + width: @table-width + 10; + height: @table-height + 20; + overflow: scroll; + .shadow(3px, 3px, 16px, 0.8); +} -- 1.7.10.4