Created
October 21, 2014 07:31
-
-
Save BrianTheCoder/e31a8cace1cc68f77e29 to your computer and use it in GitHub Desktop.
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
@SocialGallery = -> | |
restrict: 'E' | |
templateUrl: '/templates/products/social_gallery' | |
controller: ($scope, Product)-> | |
$scope.columnCount = 2 | |
$scope.columns = [[],[]] | |
$scope.product.$promise.then (product)-> | |
Product.social_gallery slug: product.slug, (images)-> | |
_.each images, (img, index)-> | |
$scope.columns[index % $scope.columnCount].push(img) |
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
.container.social-gallery | |
.row | |
h2.section-header As seen on... | |
.col-sm-6(ng-repeat="column in columns") | |
.image(ng-repeat="image in column") | |
img(alt="{{image.caption}}") | |
h4 | |
| {{image.caption}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment