Permalink
Browse files

add mobile screen css

  • Loading branch information...
1 parent 285332e commit d9e81bffef0629a10310dbaa072fb9ba5cdfe172 @davidascher committed Dec 30, 2011
Showing with 51 additions and 4 deletions.
  1. +5 −3 app.js
  2. +1 −1 public/javascripts/main.js
  3. +45 −0 public/stylesheets/mine.css
View
8 app.js
@@ -233,13 +233,15 @@ app.get("/api/deadlines", function (req, res) {
return;
}
- console.log(deadline_keys);
- console.log(deadlines);
deadlines_objs = [];
for (var i=0; i < deadlines.length; i++) {
- console.log(deadlines[i]);
deadlines_objs.push(JSON.parse(deadlines[i]));
}
+ function sortByDate(a,b) {
+ if (new Date(a['when']) < new Date(b['when'])) return -1;
+ return 1;
+ }
+ deadlines_objs.sort(sortByDate);
res.json(deadlines_objs);
});
});
@@ -393,7 +393,7 @@ function setupDeadlines() {
<label class="xlarge">What are you waiting for?</label>\
<div class="input">\
<input id="what" class="what" data-bind="what" name="what" size="30" type="text"/>\
- when?\
+ <span id="when">when?</span>\
<input class="large datepicker" data-bind="when" name="when" size="30" type="text"/>\
<button id="create" class="create btn">create countdown!</button>\
</div>\
@@ -295,6 +295,51 @@ label.xlarge {
margin-bottom: 15em;
}
+@media only screen and (max-width:500px){
+ .hero-unit {
+ margin: 0;
+ /*width: 100%;*/
+ padding-top: 1em;
+ padding-bottom: 1em;
+ border-radius: 0;
+ }
+ .hero-unit h1 {
+ font-size: 30pt;
+ }
+ .container {
+ width: 100%;
+ }
+ #countdown,#countdown.row,.countdown-container {
+ margin: 0;
+ padding: 0;
+ }
+ #when, #create {
+ display: block;
+ }
+ .uneditable-input {
+ width: 120px;
+ }
+ .row {
+ margin-left: 1em;
+ }
+ label.xlarge, #when {
+ display: block;
+ width: 100%;
+ text-align: left;
+ padding-top: 1em;
+ padding-bottom: 1em;
+ }
+ #create {
+ margin-top: 1em;
+ }
+ ul {
+ margin: 0;
+ }
+ #new {
+ margin-top: 2em;
+ }
+}
+
/*scheme:*/
/*#233338*/
/*#5B5A14*/

0 comments on commit d9e81bf

Please sign in to comment.