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"]
}
22 changes: 22 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"rules": {
"no-console": "off",
"indent": [ "error", 2 ],
"quotes": [ "error", "single" ],
"semi": ["error", "always"],
"linebreak-style": [ "error", "unix" ],
# "linebreak-style": [ "error", "windows"]
},
"env": {
"es6": true,
"node": true,
"mocha": true,
"jasmine": true
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"extends": "eslint:recommended"
}
123 changes: 123 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@

# Created by https://www.gitignore.io/api/monodevelop,vim,node,windows,archlinuxpackages

### ArchLinuxPackages ###
*.tar
*.tar.*
*.jar
*.exe
*.msi
*.zip
*.tgz
*.log
*.log.*
*.sig

pkg/
src/

### MonoDevelop ###
#User Specific
*.userprefs
*.usertasks

#Mono Project Files
*.pidb
*.resources
test-results/

### Node ###
# Logs
logs
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
build

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

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
*~
# auto-generated tag files
tags

### 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
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/monodevelop,vim,node,windows,archlinuxpackages
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- 'stable'
sudo: required
before_script: npm i
script:
- npm run test
File renamed without changes
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 @@
@import "../../../scss/lib/theme/vars";

.create-gallery {
input[type="text"] {
margin-bottom: $gutter-sm;
}

button {
float: right;
padding: 2% 6%;
}
}
21 changes: 21 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<section class="create-gallery">
<h2>Create a new gallery</h2>
<form name="createGalleryForm"
class="gallery-form"
ng-submit="createGalleryCtrl.createGallery()">

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

<fieldset>
<input type="text" name="desc" class="input-std"
placeholder="gallery description"
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;
});
};
}
8 changes: 8 additions & 0 deletions app/component/gallery/edit-gallery/_edit-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "../../../scss/lib/theme/vars";

.edit {
.item-lable {
margin-bottom: 1vw;
display: block;
}
}
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 @@
<div class="clearfix"></div>
<section class="edit">
<form class="edit-gallery"
name="editGallery"
ng-submit="EditGalleryCtrl.updateGallery()"
novalidate>

<fieldset>
<span class="item-label">name:</span>
<input type="text" name="name" class="input-std" 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="btd-std">update</button>

</form>

</section>
21 changes: 21 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'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);
};
};
41 changes: 41 additions & 0 deletions app/component/gallery/gallery-item/_gallery-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@import "../../../scss/lib/theme/vars";

.gallery-item-container {
clear: both;
padding-top: $gutter-std;

.gallery-item {
margin: $gutter-std 0 1% 0;
padding: $gutter-sm;
background: $app-secondary;
font-size: 3vw;
border-radius: $btn-radius;
}

.edit-btns {
text-align: right;

span {
display: inline-block;

.del-btn {
color: $black;
background: $app-secondary;
}
}
}

.current-item {
div {
margin-bottom: $gutter-sm;

&:last-child {
margin-bottom: 1vw;
}

.item-label {
font-weight: bold;
}
}
}
}
23 changes: 23 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

<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-alt" 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);
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import "../../../scss/lib/theme/vars";

.thumbnail-container {
margin-top: 7.5%;

h3 {
height: 5vw;
text-transform: capitalize;
}
}
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"></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