JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
start on deck designer
authorJason Woofenden <jason@jasonwoof.com>
Fri, 4 Nov 2011 21:19:00 +0000 (17:19 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Fri, 4 Nov 2011 21:19:00 +0000 (17:19 -0400)
index.html
server.coffee
style.less

index 1127b5b..a1dd2ad 100644 (file)
@@ -10,6 +10,7 @@
        <script src="/javascript/jquery-ui/ui/jquery.ui.mouse.js"></script>
        <script src="/javascript/jquery-ui/ui/jquery.ui.draggable.js"></script>
        <script src="common.js"></script>
+       <script src="cs_cards.js"></script>
        <script src="client.js"></script>
 </head>
 <body>
@@ -21,5 +22,6 @@
                </div>
                <div id="my_side">Cards in this green area (except the two piles on the right) always appear face-down to the other player.</div>
        </div>
+       <div id="deck_designer"><h1>Deck Designer</h1><form></form></div>
 </body>
 </html>
index 82e4872..498e391 100644 (file)
@@ -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) ->
index 31bb99d..db96490 100644 (file)
@@ -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);
+}