This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugged') | |
Plug 'kchmck/vim-coffee-script' | |
Plug 'kien/ctrlp.vim' | |
Plug 'rking/ag.vim' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'scrooloose/nerdtree' | |
Plug 'slim-template/vim-slim' | |
Plug 'thoughtbot/vim-rspec' | |
Plug 'tpope/vim-fugitive' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Books = new Mongo.Collection('books'); | |
if (Meteor.isClient) { | |
Template.books.helpers({ | |
books: function(){ | |
var filter = Session.get('filter'); | |
return Books.find({ title: new RegExp(filter, 'i') }); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#books-container{ | |
padding-top: 24px; | |
padding-bottom: 24px; | |
} | |
.thumbnail { | |
margin-bottom:7px; | |
border: 0px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="book"> | |
<div class="col-md-2"> | |
<div class="thumbnail"> | |
<img class="image-responsive" src="http://lorempixel.com/128/191/" /> | |
<div class="caption text-center"> | |
<b><a href="#">{{title}}</a></b> | |
<p>by {{author}}</p> | |
</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="books"> | |
<div class="container" id="books-container"> | |
{{#each books}} | |
{{> book }} | |
{{/each}} | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.books.insert([{title: 'The Hunger Games', author: 'Suzanne Collins'}, | |
{title: 'Harry Potter and the Order of the Phoenix', author: 'J.K. Rowling'}, | |
{title: 'To Kill a Mockingbird', author: 'Harper Lee'}, | |
{title: 'Pride and Prejudice', author: 'Jane Austen'}, | |
{title: 'Gone with the Wind', author: 'Margaret Mitchell'}, | |
{title: 'The Chronicles of Narnia', author: 'C.S. Lewis'}, | |
{title: 'Animal Farm' , author: 'George Orwell'}, | |
{title: 'The Giving Tree The Giving Tree', author: 'Shel Silverstein'}, | |
{title: 'The Hitchhikers Guide to the Galaxy', author: 'Douglas Adams'}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ meteor mongo | |
$ db.books.find(); | |
$ db.books.insert({title: 'Children of Hurin', author: 'J.R.R. Tolkien'}); | |
$ db.books.find(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Books = new Mongo.Collection('books'); | |
if (Meteor.isClient) { | |
Template.books.helpers({ | |
books: function(){ | |
return Books.find(); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="books"> | |
{{#each books}} | |
{{title}} - {{author}} | |
{{/each}} | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="searchbar"> | |
<form role="form"> | |
<div class="container"> | |
<div class="col-xs-12"> | |
<div class="input-group input-group-md"> | |
<input type="text" class="form-control" placeholder="Search by title, author or ISBN" /> | |
<div class="input-group-btn"> | |
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-search"> Search</span></button> | |
</div> | |
</div> |