Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Empty file added .babelrc
Empty file.
118 changes: 118 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Created by https://www.gitignore.io/api/osx,windows,node

build/

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

###
.env

# 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


### 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

### 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

# End of https://www.gitignore.io/api/osx,windows,node
Binary file added app/assets/cf-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
27 changes: 27 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<section class="create-gallery">
<h3>OH EM GEE IT IS GALLERY TIME!</h3>

<form name="createGalleryForm"
class="gallery-form"
ng-submit="createGalleryCtrl.createGallery()">

<fieldset>
<input type="text"
name="name"
class="input-std"
type="text"
ng-model="createGalleryCtrl.gallery.name"
placeholder="gallery name" required>
</fieldset>

<fieldset>
<input type="text"
name="desc"
class="input-std"
ng-model="createGalleryCtrl.gallery.desc"
placeholder="gallery description" 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.
19 changes: 19 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<section class="edit">
<form class="edit-gallery"
name="editGallery"
ng-submit="editGalleryCtrl.updateGallery()"
no-validate>

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

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

<button class="btn-std">update</button>
</form>
</section>
20 changes: 20 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'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() {
galleryService.updateGallery(this.gallery._id, this.gallery);
}
}
Empty file.
19 changes: 19 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<li class="gallery-item">
<div class="current-item" ng-if="!galleryItemCtrl.showEditGallery">
<div>
<span class="item-label">name:</span>
<span>{{ galleryItemCtrl.gallery.name }}</span>
</div>

<div>
<span class="item-label">description:</span>
<span>{{ galleryItemCtrl.gallery.desc }}</span>
</div>
</div>

<edit-gallery ng-if="galleryItemCtrl.showEditGallery" gallery="galleryItemCtrl.gallery"></edit-gallery>
</li>
<li class="edit-btns">
<span class="btn-std" ng-click="galleryItemCtrl.showEditGallery = !galleryItemCtrl.showEditGallery">edit</span>
<span class="btn-std del-btn" ng-click="galleryItemCtrl.deleteGallery()">delete</span>
</li>
22 changes: 22 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'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);
}
};
15 changes: 15 additions & 0 deletions app/component/landing/login/_login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import "../../../scss/lib/theme/vars";

.login-form {
.input-std {
margin-bottom: $gutter-sm;
}

button {
float: right;
padding-top: 1.5vw;
padding-bottom: 1.5vw;
}


}
33 changes: 33 additions & 0 deletions app/component/landing/login/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<section class="login-form">
<form
name="loginForm"
ng-submit="loginCtrl.login()" novalidate>
<div
ng-class="{
'error': loginForm.username.$invalid,
'success': loginForm.username.$valid,
}">
<input type="text"
name="username"
placeholder="username"
class="input-std"
ng-minlength="4"
ng-model="loginCtrl.user.username" required>
</div>

<div
ng-class="{
'error': loginForm.password.$invalid && loginForm.$submitted,
'success': loginForm.password.$valid,
}">
<input type="password" name="password"
ng-disabled="loginForm.username.$invalid"
placeholder="password"
class="input-std"
ng-minlength="3"
ng-model="loginCtrl.user.password" required>
</div>

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

require('./_login.scss');

module.exports = {
template: require('./login.html'),
controller: ['$log', '$location', 'authService', LoginController],
controllerAs: 'loginCtrl'
};

function LoginController($log, $location, authService) {
$log.debug('LoginController');

authService.getToken()
.then( () => {
$location.url('/home');
});

this.login = function() {
$log.log('loginCtrl.login()');

authService.login(this.user)
.then( () => {
$location.url('/home');
});
};
};
13 changes: 13 additions & 0 deletions app/component/landing/signup/_signup.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import "../../../scss/lib/theme/vars";

.signup {
.input-std {
margin-bottom: $gutter-sm;
}

button {
float: right;
padding-top: 1.5vw;
padding-bottom: 1.5vw;
}
}
25 changes: 25 additions & 0 deletions app/component/landing/signup/signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<section class="signup">
<form class="signup-form"
ng-submit="signupCtrl.signup(signupCtrl.user)"
no-validate>

<input class="input-std"
type="text"
placeholder="name"
ng-minlength="4"
ng-model="signupCtrl.user.username" required>

<input class="input-std"
type="email"
placeholder="email"
ng-model="signupCtrl.user.email">

<input class="input-std"
type="password"
placeholder="password"
ng-minlength="3"
ng-model="signupCtrl.user.password" required>

<input type="submit" class="btn-std" value="sign up">
</form>
</section>
25 changes: 25 additions & 0 deletions app/component/landing/signup/signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

module.exports = {
template: require('./signup.html'),
controller: ['$log', '$location', 'authService', SignupController],
controllerAs: 'signupCtrl'
};

function SignupController($log, $location, authService) {
$log.debug('SignupController');

authService.getToken()
.then( () => {
$location.url('/home');
});

this.signup = function(user) {
$log.debug('signupCtrl.signup()');

authService.signup(user)
.then( () => {
$location.url('/home');
});
};
};
Empty file.
Loading