Skip to content
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

Bootstrap-Dana #108

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
61f85e6
Scaffolding project.
dkulp23 Mar 28, 2017
ec1b4f6
Configuring settings and attempting to load image dynamically.
dkulp23 Mar 28, 2017
9aea9d0
entry.js fiel and karma config.
dkulp23 Mar 28, 2017
3a9def5
Auth-service logic.
dkulp23 Mar 28, 2017
9fee345
Added router configuration.
dkulp23 Mar 28, 2017
ef5dfed
Scaffolded files for views and components. Completed home view.
dkulp23 Mar 28, 2017
f42ef79
Added landing view controller and html.
dkulp23 Mar 28, 2017
75c3975
Added signup component.
dkulp23 Mar 28, 2017
7d3a1f6
Added login component.
dkulp23 Mar 28, 2017
7708f74
Starting on styling.
dkulp23 Mar 29, 2017
74ac040
Working on styling header.
dkulp23 Mar 29, 2017
9817d77
Sign in page is looking pretty good.
dkulp23 Mar 29, 2017
26a786b
Styling almost there.
dkulp23 Mar 29, 2017
a06e1bb
Finished styling buttons.
dkulp23 Mar 29, 2017
27a2b5b
Configured debug logs to toggle off in production mode. Webpack not l…
dkulp23 Mar 29, 2017
b38166b
Added gallery service with methods to post or delete one and fetch all.
dkulp23 Mar 29, 2017
4550b98
Scaffolding new navbar component and restructured landing page compon…
dkulp23 Mar 29, 2017
fc10ab0
Added navbar html template. Added custom directive to index in header.
dkulp23 Mar 30, 2017
e912078
Added controller and html template for component to create a new gall…
dkulp23 Mar 30, 2017
5a4bf13
Added home view template and controller.
dkulp23 Mar 30, 2017
5aaa6f1
Sign out button styled.
dkulp23 Mar 30, 2017
e4d5739
Form fields for creating a gallery styled.
dkulp23 Mar 30, 2017
b62b223
Galleries styled.
dkulp23 Mar 30, 2017
b09a757
Updated gallery service to include update and delete methods.
dkulp23 Mar 31, 2017
870f4c3
Scaffolding gallery components file structure.
dkulp23 Mar 31, 2017
885e436
Added components for displaying and editing individual galleries. Plu…
dkulp23 Mar 31, 2017
8958b85
Debugged an issue with the edit component. Misspelled the controllerA…
dkulp23 Mar 31, 2017
90691b7
Removed duplicate login directory.
dkulp23 Apr 3, 2017
61c539c
Removed duplicate signup directory.
dkulp23 Apr 3, 2017
7fbef53
Added service to handle business logic for sending a post request to …
dkulp23 Apr 3, 2017
c5bb335
Scaffolding pic upload and thumbnail components. Added pic upload com…
dkulp23 Apr 3, 2017
c93b5dc
added thumbnail and thumbnail container components.
dkulp23 Apr 3, 2017
f586ae5
Updated home view controller to show thumbnail container.
dkulp23 Apr 3, 2017
8d78fd3
Installed file upload module and saved as dependency. Also injected a…
dkulp23 Apr 3, 2017
446e6f4
Added attributes to gallery-item directive to show thumbnail directiv…
dkulp23 Apr 3, 2017
11e4c7c
Fixed typo.
dkulp23 Apr 3, 2017
97b1345
Writing delete method on pic service.
dkulp23 Apr 4, 2017
9b50bce
Delete method working to send the delete request. Still need to have …
dkulp23 Apr 4, 2017
95a5260
Thumbnail removed upon delete now.
dkulp23 Apr 4, 2017
30eefe4
Test setup.
dkulp23 Apr 4, 2017
5f2ddd2
Karma conf file set up properly for testing. tests to get a token and…
dkulp23 Apr 4, 2017
dd2648c
Passing test for the delete method of the gallery service.
dkulp23 Apr 4, 2017
d86d712
Messing around with testing.
dkulp23 Apr 5, 2017
c95906b
Added some expect statements.
dkulp23 Apr 5, 2017
a76a170
Tests passing for edit-gallery and gallery-item components. Not sure …
dkulp23 Apr 6, 2017
0578d42
Fuzzy search on galleries working properly. Directive for social medi…
dkulp23 Apr 6, 2017
e016e0c
Sprite sheet working to display icons in footer nav tag as list.
dkulp23 Apr 6, 2017
de14842
Custom filter created to hashtagify the gallery name. Added to galler…
dkulp23 Apr 6, 2017
205743b
Functionally done. Styling now.
dkulp23 Apr 7, 2017
abc64ed
Playing around with cards component.
dkulp23 Apr 10, 2017
2c10a85
Using button components.
dkulp23 Apr 11, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
21 changes: 21 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"rules": {
"no-console": "off",
"indent": [ "error", 2 ],
"quotes": [ "error", "single" ],
"semi": ["error", "always"],
"linebreak-style": [ "error", "unix" ]
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
116 changes: 116 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Created by https://www.gitignore.io/api/node,macos,windows

### macOS ###
*.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

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# 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

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# Angular Build Directory
build/

# End of https://www.gitignore.io/api/node,macos,windows
File renamed without changes
Binary file added app/assets/images/cf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/spritesheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/component/gallery/create-gallery/_create-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import '../../../scss/lib/theme/vars';

label {
color: $dark * 2;
float: left;
margin-left: 40px;
padding-top: 20px;
font-size: 20px;
}
31 changes: 31 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<section class="create-gallery">
<form name="createGalleryForm"
class="gallery-form"
ng-submit="createGalleryCtrl.createGallery()">
<fieldset>
<label for="name">Create a new gallery.</label>
<input
name="name"
placeholder="gallery name"
class="input-std"
type="text"
ng-model="createGalleryCtrl.gallery.name"
required>
</fieldset>

<span ng-model="createGalleryCtrl.gallery.name" class="hashtag-preview">
{{ createGalleryCtrl.gallery.name | hashtagify: createGalleryCtrl.gallery.name}}
</span>

<fieldset>
<input
type="text"
name="desc"
placeholder="gallery description"
class="input-std"
ng-model="createGalleryCtrl.gallery.desc"
required>
</fieldset>
<button class="btn-std" type="submit">create gallery</button>
</form>
</section>
23 changes: 23 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

require('./_create-gallery.scss');

module.exports = {
template: require('./create-gallery.html'),
controller: ['$log', 'galleryService', CreateGalleryController],
controllerAs: 'createGalleryCtrl'
};

function CreateGalleryController($log, galleryService) {
$log.debug('CreateGalleryController');

this.gallery = {};

this.createGallery = function() {
galleryService.createGallery(this.gallery)
.then( () => {
this.gallery.name = null;
this.gallery.desc = null;
});
};
}
Empty file.
25 changes: 25 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<section class="edit">
<form class="edit-gallery"
name="editGallery"
ng-submit="editGalleryCtrl.updateGallery()"
novalidate>

<fieldset>
<span class="item-label">name:</span>
<input name="name"
class="input-std"
type="text"
ng-model="editGalleryCtrl.gallery.name">
</fieldset>

<fieldset>
<span class="item-label">description:</span>
<input type="text"
name="desc"
class="input-std"
ng-model="editGalleryCtrl.gallery.desc">
</fieldset>

<button class="btn-std">update</button>
</form>
</section>
22 changes: 22 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

require('./_edit-gallery.scss');

module.exports = {
template: require('./edit-gallery.html'),
controller: ['$log', 'galleryService', EditGalleryController],
controllerAs: 'editGalleryCtrl',
bindings: {
gallery: '<'
}
};

function EditGalleryController($log, galleryService) {
$log.debug('EditGalleryController');

this.updateGallery = function() {
$log.debug('editGalleryCtrl.updateGallery');

galleryService.updateGallery(this.gallery._id, this.gallery);
};
}
8 changes: 8 additions & 0 deletions app/component/gallery/gallery-item/_gallery-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.media {
width: 70vw;
}

.btn-group {
width: 15vw;
float: right;
}
27 changes: 27 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<li class="gallery-item">
<div class="media"
ng-if="!galleryItemCtrl.showEditGallery">
<div class="media-left media-middle">
<a href="#">
<img class="media-object" src="http://fillmurray.com/64/64" alt="fillmurray">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">name:
<span>{{ galleryItemCtrl.gallery.name | hashtagify: galleryItemCtrl.gallery.name }}</span>
</h4>
<h4 class="media-heading">description:
<span>{{ galleryItemCtrl.gallery.desc }}</span>
</h4>
</div>
</div>

<div class="btn-group" role="group" aria-label="edit-buttons">
<button type="button" class="btn btn-default" ng-click="galleryItemCtrl.showEditGallery = !galleryItemCtrl.showEditGallery">edit</button>
<button class="btn btn-default" ng-click="galleryItemCtrl.deleteGallery()">delete</button>
</div>

<edit-gallery ng-if="galleryItemCtrl.showEditGallery"
gallery="galleryItemCtrl.gallery">
</edit-gallery>
</li>
25 changes: 25 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

require('./_gallery-item.scss');

module.exports = {
template: require('./gallery-item.html'),
controller: ['$log', 'galleryService', GalleryItemController],
controllerAs: 'galleryItemCtrl',
bindings: {
gallery: '<'
}
};

function GalleryItemController($log, galleryService) {
$log.debug('GalleryItemController');

this.showEditGallery = false;

this.deleteGallery = function() {
galleryService.deleteGallery(this.gallery._id)
.then( () => {
this.deleteDone(this.gallery);
});
};
}
Empty file.
10 changes: 10 additions & 0 deletions app/component/gallery/thumbnail-container/thumbnail-container.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="thumbnail-container">
<h3>{{ thumbnailContainerCtrl.gallery.name }}</h3>
<upload-pic gallery="thumbnailContainerCtrl.gallery"></upload-pic>

<div class="thumbs">
<thumbnail ng-repeat="item in thumbnailContainerCtrl.gallery.pics"
pic="item" gallery="thumbnailContainerCtrl.gallery">
</thumbnail>
</div>
</div>
11 changes: 11 additions & 0 deletions app/component/gallery/thumbnail-container/thumbnail-container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

require('./_thumbnail-container.scss');

module.exports = {
template: require('./thumbnail-container.html'),
controllerAs: 'thumbnailContainerCtrl',
bindings: {
gallery: '<'
}
};
Empty file.
4 changes: 4 additions & 0 deletions app/component/gallery/thumbnail/thumbnail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="thumbnail">
<img ng-src="{{ thumbnailCtrl.pic.imageURI }}" alt="{{ thumbnailCtrl.pic.desc }}">
<span class="btn-std" ng-click="thumbnailCtrl.deletePic()">delete</span>
</div>
23 changes: 23 additions & 0 deletions app/component/gallery/thumbnail/thumbnail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

require('./_thumbnail.scss');

module.exports = {
template: require('./thumbnail.html'),
controller: ['$log', 'picService', ThumbnailController],
controllerAs: 'thumbnailCtrl',
bindings: {
pic: '<',
gallery: '<'
}
};

function ThumbnailController($log, picService) {
$log.debug('ThumbnailController');

this.deletePic = function() {
$log.debug('thumbnailCtrl.deletePic');

picService.deleteGalleryPic(this.gallery, this.pic);
};
}
Empty file.
24 changes: 24 additions & 0 deletions app/component/gallery/upload-pic/upload-pic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<section class="upload-pic">
<form ng-submit="uploadPicCtrl.uploadPic()"
novalidate>

<h3>upload a new photo</h3>

<fieldset>
<input type="text" class="input-std"
ng-model="uploadPicCtrl.pic.name" placeholder="name">
<input type="text" class="input-std" ng-model="uploadPicCtrl.pic.desc" placeholder="desc">
</fieldset>

<div>
<p class="grab-img"
ngf-select
ng-model="uploadPicCtrl.pic.file">
select a file to upload
</p>

<button class="btn-std">upload</button>
</div>

</form>
</section>
Loading