Frederic G. MARAND 9 years ago
parent
commit
be7b329272
7 changed files with 196 additions and 79 deletions
  1. 1 0
      .meteor/.finished-upgraders
  2. 1 0
      .meteor/packages
  3. 1 1
      .meteor/release
  4. 48 52
      .meteor/versions
  5. 125 0
      simple-todos.css
  6. 13 6
      simple-todos.html
  7. 7 20
      simple-todos.js

+ 1 - 0
.meteor/.finished-upgraders

@@ -5,3 +5,4 @@
 notices-for-0.9.0
 notices-for-0.9.1
 0.9.4-platform-file
+notices-for-facebook-graph-api-2

+ 1 - 0
.meteor/packages

@@ -1,4 +1,5 @@
 # Meteor packages used by this project, one per line.
+# Check this file (and the other files in this directory) into your repository.
 #
 # 'meteor add' and 'meteor remove' will edit this file for you,
 # but you can also edit it by hand.

+ 1 - 1
.meteor/release

@@ -1 +1 @@
-METEOR@1.0.1
+METEOR@1.1.0.3

+ 48 - 52
.meteor/versions

@@ -1,52 +1,48 @@
-application-configuration@1.0.3
-autopublish@1.0.1
-autoupdate@1.1.3
-base64@1.0.1
-binary-heap@1.0.1
-blaze-tools@1.0.1
-blaze@2.0.3
-boilerplate-generator@1.0.1
-callback-hook@1.0.1
-check@1.0.2
-ctl-helper@1.0.4
-ctl@1.0.2
-ddp@1.0.12
-deps@1.0.5
-ejson@1.0.4
-fastclick@1.0.1
-follower-livedata@1.0.2
-geojson-utils@1.0.1
-html-tools@1.0.2
-htmljs@1.0.2
-http@1.0.8
-id-map@1.0.1
-insecure@1.0.1
-jquery@1.0.1
-json@1.0.1
-launch-screen@1.0.0
-livedata@1.0.11
-logging@1.0.5
-meteor-platform@1.2.0
-meteor@1.1.3
-minifiers@1.1.2
-minimongo@1.0.5
-mobile-status-bar@1.0.1
-mongo@1.0.9
-observe-sequence@1.0.3
-ordered-dict@1.0.1
-random@1.0.1
-reactive-dict@1.0.4
-reactive-var@1.0.3
-reload@1.1.1
-retry@1.0.1
-routepolicy@1.0.2
-session@1.0.4
-spacebars-compiler@1.0.3
-spacebars@1.0.3
-templating@1.0.9
-tracker@1.0.3
-ui@1.0.4
-underscore@1.0.1
-url@1.0.2
-webapp-hashing@1.0.1
-webapp@1.1.4
+autopublish@1.0.3
+autoupdate@1.2.1
+base64@1.0.3
+binary-heap@1.0.3
+blaze@2.1.2
+blaze-tools@1.0.3
+boilerplate-generator@1.0.3
+callback-hook@1.0.3
+check@1.0.5
+ddp@1.1.0
+deps@1.0.7
+ejson@1.0.6
+fastclick@1.0.3
+geojson-utils@1.0.3
+html-tools@1.0.4
+htmljs@1.0.4
+http@1.1.0
+id-map@1.0.3
+insecure@1.0.3
+jquery@1.11.3_2
+json@1.0.3
+launch-screen@1.0.2
+livedata@1.0.13
+logging@1.0.7
+meteor@1.1.6
+meteor-platform@1.2.2
+minifiers@1.1.5
+minimongo@1.0.8
+mobile-status-bar@1.0.3
+mongo@1.1.0
+observe-sequence@1.0.6
+ordered-dict@1.0.3
+random@1.0.3
+reactive-dict@1.1.0
+reactive-var@1.0.5
+reload@1.1.3
+retry@1.0.3
+routepolicy@1.0.5
+session@1.1.0
+spacebars@1.0.6
+spacebars-compiler@1.0.6
+templating@1.1.1
+tracker@1.0.7
+ui@1.0.6
+underscore@1.0.3
+url@1.0.4
+webapp@1.2.0
+webapp-hashing@1.0.3

+ 125 - 0
simple-todos.css

@@ -1 +1,126 @@
 /* CSS declarations go here */
+body {
+  font-family: sans-serif;
+  background-color: #315481;
+  background-image: linear-gradient(to bottom, #315481, #918e82 100%);
+  background-attachment: fixed;
+
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+
+  padding: 0;
+  margin: 0;
+
+  font-size: 14px;
+}
+
+.container {
+  max-width: 600px;
+  margin: 0 auto;
+  min-height: 100%;
+  background: white;
+}
+
+header {
+  background: #d2edf4;
+  background-image: linear-gradient(to bottom, #d0edf5, #e1e5f0 100%);
+  padding: 20px 15px 15px 15px;
+  position: relative;
+}
+
+#login-buttons {
+  display: block;
+}
+
+h1 {
+  font-size: 1.5em;
+  margin: 0;
+  margin-bottom: 10px;
+  display: inline-block;
+  margin-right: 1em;
+}
+
+form {
+  margin-top: 10px;
+  margin-bottom: -10px;
+  position: relative;
+}
+
+.new-task input {
+  box-sizing: border-box;
+  padding: 10px 0;
+  background: transparent;
+  border: none;
+  width: 100%;
+  padding-right: 80px;
+  font-size: 1em;
+}
+
+.new-task input:focus{
+  outline: 0;
+}
+
+ul {
+  margin: 0;
+  padding: 0;
+  background: white;
+}
+
+.delete {
+  float: right;
+  font-weight: bold;
+  background: none;
+  font-size: 1em;
+  border: none;
+  position: relative;
+}
+
+li {
+  position: relative;
+  list-style: none;
+  padding: 15px;
+  border-bottom: #eee solid 1px;
+}
+
+li .text {
+  margin-left: 10px;
+}
+
+li.checked {
+  color: #888;
+}
+
+li.checked .text {
+  text-decoration: line-through;
+}
+
+li.private {
+  background: #eee;
+  border-color: #ddd;
+}
+
+header .hide-completed {
+  float: right;
+}
+
+.toggle-private {
+  margin-left: 5px;
+}
+
+@media (max-width: 600px) {
+  li {
+    padding: 12px 15px;
+  }
+
+  .search {
+    width: 150px;
+    clear: both;
+  }
+
+  .new-task input {
+    padding-bottom: 5px;
+  }
+}

+ 13 - 6
simple-todos.html

@@ -1,14 +1,21 @@
 <head>
-  <title>simple-todos</title>
+  <title>Todo List</title>
 </head>
 
 <body>
-  <h1>Welcome to Meteor!</h1>
+<div class="container">
+  <header>
+    <h1>Todo List</h1>
+  </header>
 
-  {{> hello}}
+  <ul>
+    {{#each tasks}}
+    {{> task}}
+    {{/each}}
+  </ul>
+</div>
 </body>
 
-<template name="hello">
-  <button>Click Me Amadeus</button>
-  <p>You've pressed the button {{counter}} times.</p>
+<template name="task">
+  <li>{{text}}</li>
 </template>

+ 7 - 20
simple-todos.js

@@ -1,23 +1,10 @@
 if (Meteor.isClient) {
-  // counter starts at 0
-  Session.setDefault("counter", 0);
-
-  Template.hello.helpers({
-    counter: function () {
-      return Session.get("counter");
-    }
-  });
-
-  Template.hello.events({
-    'click button': function () {
-      // increment the counter when button is clicked
-      Session.set("counter", Session.get("counter") + 1);
-    }
-  });
-}
-
-if (Meteor.isServer) {
-  Meteor.startup(function () {
-    // code to run on server at startup
+  // This code only runs on the client
+  Template.body.helpers({
+    tasks: [
+      { text: "This is task 1" },
+      { text: "This is task 2" },
+      { text: "This is task 3" }
+    ]
   });
 }