From 1a4906183ddda328b4527dc1840ea83e3dd4314e Mon Sep 17 00:00:00 2001 From: Sebastiaan Deckers Date: Sat, 4 Oct 2014 00:37:47 +0800 Subject: [PATCH] Fully interactive wall on landing page --- source/js/modules/Layouts.js | 24 +++++++++------------- source/styles/modules/layouts/landing.styl | 16 ++++++++++++--- source/styles/modules/walls/wall.styl | 2 ++ source/templates/layouts/landing.html | 4 +--- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/source/js/modules/Layouts.js b/source/js/modules/Layouts.js index e8c200e..b0193e4 100644 --- a/source/js/modules/Layouts.js +++ b/source/js/modules/Layouts.js @@ -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) }); }, @@ -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(); } }); diff --git a/source/styles/modules/layouts/landing.styl b/source/styles/modules/layouts/landing.styl index d94c083..2e0e85d 100644 --- a/source/styles/modules/layouts/landing.styl +++ b/source/styles/modules/layouts/landing.styl @@ -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) @@ -32,3 +40,5 @@ // > .gotowall margin-top 20px + > footer + z-index 1 diff --git a/source/styles/modules/walls/wall.styl b/source/styles/modules/walls/wall.styl index 1ca1bea..3ab1ddf 100644 --- a/source/styles/modules/walls/wall.styl +++ b/source/styles/modules/walls/wall.styl @@ -4,6 +4,8 @@ position relative display flex flex-direction column + width 100% + height 100% > .controls position absolute diff --git a/source/templates/layouts/landing.html b/source/templates/layouts/landing.html index ce44a9e..970518d 100644 --- a/source/templates/layouts/landing.html +++ b/source/templates/layouts/landing.html @@ -2,9 +2,7 @@
-
-
    -
    +

    Drywall

    GitHub Issues as stickies on a wall.