Skip to content

Commit

Permalink
Fully interactive wall on landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdeckers committed Oct 3, 2014
1 parent bdea5cd commit 1a49061
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
24 changes: 10 additions & 14 deletions source/js/modules/Layouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,16 @@ function (
})
.fetch({
success: function (preload) {
var stickies = new Stickies.Collections.Stickies(null, preload.pick(
'coordinates', 'issues', 'repo', 'owner', 'repository'
));
stickies.each(function (stickie) {
this._addStickie(stickie);
}, this);
this.setViews({
'> .main > .demo': new Walls.Views.Wall({
coordinates: preload.get('coordinates'),
issues: preload.get('issues'),
repo: preload.get('repo'),
stickies: new Stickies.Collections.Stickies(null, preload.pick(
'coordinates', 'issues', 'repo', 'owner', 'repository'
))
})
}).render();
}.bind(this)
});
},
Expand All @@ -142,14 +146,6 @@ function (
this.setViews({
'> .main > article > .gotowall': new GoToWall.Views.Navigator()
});
},
_addStickie: function (stickie) {
this.insertView('.zoom > .stickies', new Stickies.Views.Stickie({
model: stickie,
repo: new GitHub.Models.Repo({
permissions: {pull: true}
})
})).render();
}
});

Expand Down
16 changes: 13 additions & 3 deletions source/styles/modules/layouts/landing.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#app > .layouts.landing
> .main
> .zoom
> .stickies
list-style-type none
> .demo
overflow hidden
position absolute
top 0
right 0
bottom 0
left 0
> .wall
background-color transparent
> .grid
background none
> article
text-align center
background-color rgba(255, 255, 255, 0.8)
Expand Down Expand Up @@ -32,3 +40,5 @@
//
> .gotowall
margin-top 20px
> footer
z-index 1
2 changes: 2 additions & 0 deletions source/styles/modules/walls/wall.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
position relative
display flex
flex-direction column
width 100%
height 100%

> .controls
position absolute
Expand Down
4 changes: 1 addition & 3 deletions source/templates/layouts/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<header></header>
<aside></aside>
<section class="main">
<div class="zoom">
<ul class="stickies"></ul>
</div>
<div class="demo"></div>
<article>
<h1><span class="logotype"><i>Dry</i><b>wall</b></span></h1>
<p class="tagline">GitHub Issues as stickies on a wall.</p>
Expand Down

0 comments on commit 1a49061

Please sign in to comment.