Skip to content

Commit

Permalink
It's a working application!
Browse files Browse the repository at this point in the history
  • Loading branch information
PxlBuzzard committed Feb 15, 2014
1 parent 8bac04a commit e075fc9
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<head>
<title>Stats At Last</title>
</head>
<body>
<div class="container">
<header class="navbar">
<div class="navbar-inner">
<a class="brand" href="/">Stats At Last</a>
</div>
</header>
<div id="main" class="row-fluid">
{{> songsList}}
</div>
</div>
</body>
1 change: 1 addition & 0 deletions client/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Meteor.subscribe('songs');
7 changes: 7 additions & 0 deletions client/views/songs/song_item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template name="songItem">
<div class="songs">
<div class="song-content">
<h3><a href="{{url}}">{{title}}</a><span>{{domain}}</span></h3>
</div>
</div>
</template>
7 changes: 7 additions & 0 deletions client/views/songs/song_item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Template.songItem.helpers({
domain: function() {
var a = document.createElement('a');
a.href = this.url;
return a.hostname;
}
});
7 changes: 7 additions & 0 deletions client/views/songs/songs_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template name="songsList">
<div class="songs">
{{#each songs}}
{{> songItem}}
{{/each}}
</div>
</template>
File renamed without changes.
3 changes: 3 additions & 0 deletions server/publications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Meteor.publish('songs', function() {
return Songs.find();
});

0 comments on commit e075fc9

Please sign in to comment.