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
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

# Created by https://www.gitignore.io/api/node

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


# End of https://www.gitignore.io/api/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.
Binary file added app/assets/spritesheet.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.
5 changes: 5 additions & 0 deletions app/component/carousel/carousel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div uib-carousel active="active" interval="myInterval" no-wrap="noWrapSlides">
<div uib-slide ng-repeat="slide in carouselCtrl.slides track by slide.id" index="slide.id">
<img ng-src="{{slide.image}}" style="margin:auto;">
</div>
</div>
32 changes: 32 additions & 0 deletions app/component/carousel/carousel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

require('./_carousel.scss');

module.exports = {
template: require('./carousel.html'),
controller: ['$log', CarouselController],
controllerAs: 'carouselCtrl'
};

function CarouselController($log) {
$log.debug('CarouselController');

var currIndex = 0;
this.myInterval = 3000;
this.noWrapSlides = false;
this.active = 0;
this.slides = [
{
image: 'http://lorempixel.com/400/200/food',
id: currIndex++
},
{
image: 'http://lorempixel.com/400/200/sports',
id: currIndex++
},
{
image: 'http://lorempixel.com/400/200/',
id: currIndex++
}
];
}
12 changes: 12 additions & 0 deletions app/component/gallery/create-gallery/_create-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$brand-primary: #444;
$brand-secondary: #888;
$black: #000;
$white: #fff;
$grey: #ccc;
$gutter: 30px;
$gutterP: 10%;

.evilbutton{
margin-top: $gutter / 2;
margin-bottom: $gutter / 2;
}
25 changes: 25 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<section class="create-gallery">
<form class="gallery-form"
name="createGalleryForm"
ng-submit="createGalleryCtrl.createGallery()">
<h2>Create a new gallery</h2>
<fieldset>
<input class="input-std"
name="name"
type="text"
value="name"
placeholder="gallery name"
ng-model="createGalleryCtrl.gallery.name" required>
</fieldset>
<fieldset>
<input class="input-std"
name="desc"
type="text"
placeholder="gallery description"
ng-model="createGalleryCtrl.gallery.desc" required>
</fieldset>
<input class="btn-std evilbutton"
type="submit"
value="create gallery">
</form>
</section>
22 changes: 22 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'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;
});
};
}
37 changes: 37 additions & 0 deletions app/component/gallery/edit-gallery/_edit-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
$brand-primary: #444;
$brand-secondary: #888;
$black: #000;
$white: #fff;
$grey: #ccc;
$gutter: 30px;
$gutterP: 10%;

.edit-gallery {
background:$brand-secondary;
padding-top: $gutter / 2;
padding-bottom: $gutter / 2;
border-radius: 5px;
fieldset {
margin-bottom: $gutter / 2;
}
.fieldset-last-child-fix {
margin-bottom: 0; }
span{
display: inline-block;
}
input{
display: inline-block;
margin-top: 0;
width: 70%;
float: right;
}
}

.update-btn{
height: 30px;
width: 25%;
border-radius: 5px;
outline: 0;
border-style: none;
margin-top: $gutter * 1.5;
}
23 changes: 23 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<section class="edit">
<form class="edit-gallery"
name="edit-gallery"
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 class="fieldset-last-child-fix">
<span class="item-label">description:</span>
<input name="desc"
class="input-std"
type="text"
ng-model="editGalleryCtrl.gallery.description">
</fieldset>

<button class="btn-std update-btn" type="submit" value="update">update</button>
</form>
</section>
23 changes: 23 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'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);
console.log(this.gallery.id);
console.log(this.gallery);
};
}
36 changes: 36 additions & 0 deletions app/component/gallery/gallery-item/_gallery-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
$brand-primary: #444;
$brand-secondary: #888;
$black: #000;
$white: #fff;
$grey: #ccc;
$gutter: 30px;

.gallery-item {
.current-item {
background-color: $brand-secondary;
padding-top: $gutter / 2;
padding-bottom: $gutter / 2;
border-radius: 5px;
margin-top: $gutter;
div{
margin-bottom: $gutter / 2;
height: 35px;
}
div:last-child {
margin-bottom: 0;

}
}

.gallery-button{
border-radius: 5px;
height: 30px;
text-align: center;
line-height: 30px;
margin-top: $gutter;
margin-left: 0;
}
.gallery-button:last-child{
background: $brand-secondary;
}
}
32 changes: 32 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- markup is for EACH gallery item -->
<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>

<span class="btn-std gallery-button"
ng-click="galleryItemCtrl.showEditGallery = !galleryItemCtrl.showEditGallery"
ng-hide="galleryItemCtrl.showEditGallery"
ng-if="!galleryItemCtrl.hideEditButtons">
edit
</span>
<span
class="btn-std gallery-button"
ng-click="galleryItemCtrl.deleteGallery()"
ng-hide="galleryItemCtrl.showEditGallery"
ng-if="!galleryItemCtrl.hideEditButtons">
delete
</span>
</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.hideEditButtons = false;

this.deleteGallery = function() {
$log.debug('galleryItemCtrl.deleteGallery');
galleryService.deleteGallery(this.gallery._id);

};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$brand-primary: #444;
$brand-secondary: #888;
$black: #000;
$white: #fff;
$grey: #ccc;
$gutter: 30px;
$gutterP: 10%;

.thumbnail-container {
width:90%;
background-color: $grey;
padding-top: $gutter / 2;
padding-bottom: $gutter / 2;
border-radius: 5px;
margin-top: $gutter;
margin-left: $gutterP / 2;
margin-right: $gutterP / 2;
h3{
font-size: 125%;
}
}
11 changes: 11 additions & 0 deletions app/component/gallery/thumbnail-container/thumbnail-container.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="thumbnail-container">
<h3>{{ thumbnailContainerCtrl.gallery.name | uppercase }}</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: '<'
}
};
Loading