mirror of
https://github.com/fazo96/homework.git
synced 2025-01-09 12:10:08 +01:00
first commit
This commit is contained in:
commit
4387b8e198
1
.meteor/.gitignore
vendored
Normal file
1
.meteor/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
local
|
12
.meteor/packages
Normal file
12
.meteor/packages
Normal file
@ -0,0 +1,12 @@
|
||||
# Meteor packages used by this project, one per line.
|
||||
#
|
||||
# 'meteor add' and 'meteor remove' will edit this file for you,
|
||||
# but you can also edit it by hand.
|
||||
|
||||
standard-app-packages
|
||||
insecure
|
||||
coffeescript
|
||||
bootstrap-3
|
||||
font-awesome
|
||||
accounts-base
|
||||
accounts-password
|
1
.meteor/release
Normal file
1
.meteor/release
Normal file
@ -0,0 +1 @@
|
||||
0.8.1.3
|
20
app.coffee
Normal file
20
app.coffee
Normal file
@ -0,0 +1,20 @@
|
||||
todos = new Meteor.Collection "todos"
|
||||
|
||||
if Meteor.isServer
|
||||
#todos.insert { content: "Example" } unless todos.find().fetch().length > 0
|
||||
Meteor.publish "todos", -> todos.find()
|
||||
|
||||
if Meteor.isClient
|
||||
Meteor.subscribe "todos"
|
||||
Template.notes.notes = ->
|
||||
todos.find().fetch()
|
||||
Template.notes.events {
|
||||
'click .delete': ->
|
||||
todos.remove @_id
|
||||
}
|
||||
Template.adder.events {
|
||||
'keypress #newNote': (e,template) ->
|
||||
console.log e.keyCode
|
||||
if e.keyCode is 13
|
||||
todos.insert { content: template.find('#newNote').value }
|
||||
}
|
28
index.html
Normal file
28
index.html
Normal file
@ -0,0 +1,28 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>Homework <small>management for students</small></h1>
|
||||
</div>
|
||||
<div class="center-block" id="quicknotes">
|
||||
{{> notes}}
|
||||
<div align="center"> {{> adder}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<template name="notes">
|
||||
<ul class="list-group">
|
||||
{{#each notes}}
|
||||
<li class="list-group-item">
|
||||
{{content}}
|
||||
<button type="button" class="btn btn-danger pull-right delete">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</button>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<template name="adder">
|
||||
<input type="text" id="newNote" class="form-control" placeholder="Add new note">
|
||||
</template>
|
2
packages/.gitignore
vendored
Normal file
2
packages/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/bootstrap-3
|
||||
/font-awesome
|
6
smart.json
Normal file
6
smart.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"packages": {
|
||||
"bootstrap-3": {},
|
||||
"font-awesome": {}
|
||||
}
|
||||
}
|
21
smart.lock
Normal file
21
smart.lock
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"meteor": {},
|
||||
"dependencies": {
|
||||
"basePackages": {
|
||||
"bootstrap-3": {},
|
||||
"font-awesome": {}
|
||||
},
|
||||
"packages": {
|
||||
"bootstrap-3": {
|
||||
"git": "https://github.com/mangasocial/meteor-bootstrap-3.git",
|
||||
"tag": "v3.1.1-1",
|
||||
"commit": "63dd38968828bb8963636df93e9a1c45e2dfe67e"
|
||||
},
|
||||
"font-awesome": {
|
||||
"git": "https://github.com/nate-strauser/meteor-font-awesome.git",
|
||||
"tag": "v4.1.0",
|
||||
"commit": "ce6b1e92715d1938babc5d69c655c17e387f5926"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user