-
Notifications
You must be signed in to change notification settings - Fork 10
PR Dan Stineback - Photo Album #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
9daed43
2728788
e1e36a2
d4533a9
1ffa8b6
0c37af5
5d30866
481bd0a
a062160
16e2f08
fbd2603
b62d4ad
447fbb1
4c0e316
e062cf0
dbd1810
cb70e72
41dcfad
e104b2c
7fb67b1
a2d39ed
7f0a932
0038d2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| **/node_modules/* | ||
| **/vendor/* | ||
| **/*.min.js | ||
| /*.md | ||
| /package.json | ||
| /npm-debug.log | ||
| /procfile | ||
| /build/* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "rules": { | ||
| "no-console": 0, | ||
| "indent": [ | ||
| 2, | ||
| 2 | ||
| ], | ||
| "quotes": [ | ||
| 2, | ||
| "single" | ||
| ], | ||
| "linebreak-style": [ | ||
| 2, | ||
| "unix" | ||
| ], | ||
| "semi": [ | ||
| 2, | ||
| "always" | ||
| ] | ||
| }, | ||
| "env": { | ||
| "es6": true, | ||
| "node": true, | ||
| "browser": true, | ||
| "mocha": true, | ||
| "jasmine": true | ||
| }, | ||
| "globals": { | ||
| "describe": false, | ||
| "it": false, | ||
| "beforeEach": false, | ||
| "afterEach": false, | ||
| "before": false, | ||
| "after": false | ||
| }, | ||
| "ecmaFeatures": { | ||
| "modules": true, | ||
| "experimentalObjectRestSpread": true, | ||
| "impliedStrict": true | ||
| }, | ||
| "extends": "eslint:recommended" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # application specific | ||
| build/* | ||
| db/ | ||
|
|
||
| # Created by https://www.gitignore.io/api/node,osx,vim | ||
|
|
||
| ### Node ### | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
|
|
||
| # nyc test coverage | ||
| .nyc_output | ||
|
|
||
| # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
| # Compiled binary addons (http://nodejs.org/api/addons.html) | ||
| build/Release | ||
|
|
||
| # Dependency directories | ||
| node_modules | ||
| jspm_packages | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
|
|
||
| ### OSX ### | ||
| *.DS_Store | ||
| .AppleDouble | ||
| .LSOverride | ||
|
|
||
| # Icon must end with two \r | ||
| Icon | ||
|
|
||
|
|
||
| # Thumbnails | ||
| ._* | ||
|
|
||
| # Files that might appear in the root of a volume | ||
| .DocumentRevisions-V100 | ||
| .fseventsd | ||
| .Spotlight-V100 | ||
| .TemporaryItems | ||
| .Trashes | ||
| .VolumeIcon.icns | ||
| .com.apple.timemachine.donotpresent | ||
|
|
||
| # Directories potentially created on remote AFP share | ||
| .AppleDB | ||
| .AppleDesktop | ||
| Network Trash Folder | ||
| Temporary Items | ||
| .apdisk | ||
|
|
||
|
|
||
| ### Vim ### | ||
| # swap | ||
| [._]*.s[a-w][a-z] | ||
| [._]s[a-w][a-z] | ||
| # session | ||
| Session.vim | ||
| # temporary | ||
| .netrwhist | ||
| *~ | ||
| # auto-generated tag files | ||
| tags |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| body { | ||
| background-color: #fff; | ||
| } | ||
| div { | ||
| float: left; | ||
| } | ||
|
|
||
| .toggle { | ||
| float: none; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>Bunny App</title> | ||
| <link rel="stylesheet" href="app.css"> | ||
| </head> | ||
| <body data-ng-app="BunnyApp"> | ||
| <main ng-cloak ng-controller="PhotosController as albums"> | ||
| <!-- <div> | ||
|
|
||
| <title-directive title="{{settings.title}}" url="{{settings.url}}" description="{{settings.description}}"></title-directive> | ||
|
|
||
| <thumbnail-display url="{{settings.url}}"></thumbnail-display> | ||
|
|
||
| <image-display url="{{settings.url}}" height="{{settings.height}}" width="{{settings.width}}" title="{{settings.title}}" big="{{settings.big}}"></image-display> | ||
| </div> --> | ||
|
|
||
|
|
||
| <h1>{{albums.dragonPhotos.title}}</h1> | ||
| <h3>{{albums.dragonPhotos.description}}</h1> | ||
| <photo-album photos="albums.dragonPhotos.photos"></photo-album><br> | ||
| <h1>{{albums.cowPhotos.title}}</h1> | ||
| <h3>{{albums.cowPhotos.description}}</h1> | ||
| <photo-album photos="albums.cowPhotos.photos"></photo-album><br> | ||
| <h1>{{albums.pupPhotos.title}}</h1> | ||
| <h3>{{albums.pupPhotos.description}}</h1> | ||
| <photo-album photos="albums.pupPhotos.photos"></photo-album><br> | ||
|
|
||
| </main> | ||
| <script src="bundle.js"></script> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| 'use strict'; | ||
|
|
||
| const angular = require('angular'); | ||
|
|
||
| var BunnyApp = angular.module('BunnyApp', []); | ||
| require('./first')(BunnyApp); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 'use strict'; | ||
| module.exports = function(app) { | ||
| app.controller('imageController', ['$scope', function() { | ||
| this.url = 'http://f.cl.ly/items/3g3J1G0w122M360w380O/3726490195_f7cc75d377_o.jpg'; | ||
| this.height = 400; | ||
| this.width = 400; | ||
| this.title = 'Bunny Picture'; | ||
| this.description = 'A Cute picture of a bunny.'; | ||
| this.big = 'A BIG Cute Bunny Picture'; | ||
|
|
||
| }]); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| 'use strict'; | ||
|
|
||
| module.exports = function(app) { | ||
| require('./imageController')(app); | ||
| require('./photoController')(app); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| 'use strict'; | ||
| module.exports = function(app) { | ||
| app.controller('PhotosController', PhotosController); | ||
|
|
||
| function PhotosController() { | ||
| this.height = '400', | ||
| this.width = '400', | ||
| this.dragonPhotos = { | ||
| title:'Dragon photos', | ||
| description:'Pictures of Daragons', | ||
| photos:[ | ||
| { | ||
| url: 'http://vignette2.wikia.nocookie.net/dragonhandbook/images/e/e5/Chaos_breathing_fire.jpeg/revision/latest?cb=20130815032055', | ||
| title: 'Dragon one', | ||
| description: 'Firebreathing' | ||
| }, | ||
| { | ||
| url: 'http://images2.fanpop.com/image/photos/8700000/Red-dragon-dragons-8714488-688-868.jpg', | ||
| title: 'Dragon two', | ||
| description: 'lighting' | ||
|
|
||
| }, | ||
| { | ||
| url: 'http://static.tvtropes.org/pmwiki/pub/images/How-to-Train-Your-Dragon-2_3414.jpg', | ||
| title: 'Dragon three', | ||
| description: 'Sharptooth' | ||
|
|
||
| } | ||
| ] | ||
| }; | ||
|
|
||
| this.cowPhotos = { | ||
| title:'Cow Photos', | ||
| description:'Pictures of Cows', | ||
| photos:[ | ||
| { | ||
| url: 'http://resources3.news.com.au/images/2012/03/27/1226311/607271-cow.jpg', | ||
| title: 'Cow one', | ||
| description: 'Silly Cow' | ||
| }, | ||
| { | ||
| url: 'http://i.telegraph.co.uk/multimedia/archive/02532/Cows_2532445b.jpg', | ||
| title: 'Cow two', | ||
| description: 'many silly cows' | ||
| }, | ||
| { | ||
| url: 'http://fillyourplate.org/blog/wp-content/uploads/2015/07/bigstock-Head-of-funny-cow-looking-to-a-48484160-418x512.jpg', | ||
| title: 'Cow three', | ||
| description: 'Horn cow' | ||
| } | ||
| ] | ||
| }; | ||
|
|
||
| this.pupPhotos = { | ||
| title:'Pup Photos', | ||
| description:'Pictures of puppies', | ||
| photos:[ | ||
| { | ||
| url: 'http://theilovedogssite.com/wp-content/uploads/2015/01/4577137586_5f4cf7fbd3_z.jpg', | ||
| title: 'Pup one', | ||
| description: 'Brown pup' | ||
| }, | ||
| { | ||
| url: 'http://barkingroyalty.com/wp-content/uploads/2015/12/cutest-puppies.jpg', | ||
| title: 'Pup two', | ||
| description: 'red collar pup' | ||
| }, | ||
| { | ||
| url: 'http://www.pluspets.net/wp-content/uploads/2010/07/Cutest-Puppies1.jpg', | ||
| title: 'Pup three', | ||
| description: 'lab pup' | ||
| } | ||
| ] | ||
| }; | ||
|
|
||
| } | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| 'use strict'; | ||
| module.exports = function(app){ | ||
| app.directive('imageDisplay', function(){ | ||
| return{ | ||
| restrict: 'AEC', | ||
| templateUrl: './templates/firstApp/image.html', | ||
| scope: { | ||
| url: '=', | ||
| height: '=', | ||
| width: '=', | ||
| title: '=', | ||
| description: '=', | ||
| big: '=' | ||
| } | ||
| }; | ||
| }); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| 'use strict'; | ||
| module.exports =function(app) { | ||
| require('./thumbnailDirective')(app); | ||
| require('./imageDirective')(app); | ||
| require('./titleDirective')(app); | ||
| require('./photo_directive')(app); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| 'use strict'; | ||
| module.exports = function(app){ | ||
| app.directive('photoAlbum', function(){ | ||
| return{ | ||
| restrict: 'AEC', | ||
| templateUrl: './templates/firstApp/photo.html', | ||
| scope: { | ||
| photos: '=', | ||
| url: '=', | ||
| title: '=', | ||
| description: '=', | ||
| photo: '=' | ||
|
|
||
|
|
||
| }, | ||
| controller: function($scope) { | ||
| $scope.photoText = false; | ||
| $scope.photoTextAgain = true; | ||
|
|
||
| $scope.changeView = function() { | ||
| console.log($scope.mode); | ||
| }; | ||
| // $scope.currentPhoto = $scope.photos; | ||
| $scope.toggle = function(photo) { | ||
| console.log(photo); | ||
|
|
||
| $scope.currentPhoto = photo; | ||
| let photoArray = []; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't see this photoArray being using anywhere? |
||
| photoArray.push(photo); | ||
| console.log(photoArray); | ||
|
|
||
| $scope.photoText = !$scope.photoText; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could photoText and photoTextAgain be a single variable - it looks like they always change the same way and are initialized the same? |
||
| $scope.photoTextAgain = !$scope.photoTextAgain; | ||
| }; | ||
|
|
||
| } | ||
| }; | ||
| }); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| 'use strict'; | ||
| module.exports = function(app){ | ||
| app.directive('thumbnailDisplay', function(){ | ||
| return{ | ||
| restrict: 'AEC', | ||
| templateUrl: './templates/firstApp/thumbnail.html', | ||
| scope: { | ||
| url: '=', | ||
| height: '=', | ||
| width: '=', | ||
| title: '=', | ||
| description: '=' | ||
| } | ||
| }; | ||
| }); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| 'use strict'; | ||
| module.exports = function(app) { | ||
| app.directive('titleDirective', function() { | ||
| return { | ||
| templateUrl: './templates/firstApp/bunnyApp.html', | ||
| restrict: 'AEC', | ||
| scope: { | ||
| title: '=', | ||
| description: '=', | ||
| url: '=' | ||
| } | ||
| }; | ||
|
|
||
| }); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| module.exports = function(app) { | ||
| require('./controllers')(app); | ||
| require('./directives')(app); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <div> | ||
| Title: {{title}}<br> | ||
| url: {{url}}<br> | ||
| description: {{description}} | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used