Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
80b09bb
basic scaffolding added
darms Mar 28, 2017
3a576de
added gitignore
darms Mar 28, 2017
0f729b4
scss lib added
darms Mar 29, 2017
eb43ead
successfully styled
darms Mar 29, 2017
7a350c6
gitignore added
darms Mar 30, 2017
3fb82bb
updated webpack config file along with package.json dependencies
darms Mar 30, 2017
845545f
removed modules
darms Apr 3, 2017
8362d37
bug fixed and styling completed!
darms Apr 4, 2017
d566575
Success! The gallery works!
darms Apr 4, 2017
16c4a56
cf logo
darms Apr 4, 2017
e86a4b2
functionality is done. ugly as hell
darms Apr 4, 2017
0d8daf4
pic upload added
darms Apr 4, 2017
2f295f8
most styling complete
darms Apr 5, 2017
7b572cd
navbar styling complete
darms Apr 5, 2017
4020007
styling success for upload section!
darms Apr 6, 2017
e9fb4af
fixed sticky footer
darms Apr 6, 2017
1b1e0b7
STYLING IS DONEEEEEgit add .!
darms Apr 6, 2017
096faac
authService test added
darms Apr 6, 2017
686d542
basic test scaffolding has been added
darms Apr 6, 2017
df0fda5
changed scripts
darms Apr 6, 2017
689f891
first 2 tests work!
darms Apr 6, 2017
e5e99cd
all tests pass! Woot!
darms Apr 6, 2017
426f102
gallery-item component test added
darms Apr 7, 2017
4999ad9
added directive folder
darms Apr 10, 2017
0135d4c
added in directive and filter to entry.js file
darms Apr 10, 2017
57b8770
added sprite sheet
darms Apr 10, 2017
6a35d98
tooltip
darms Apr 11, 2017
3a857f3
added herokub postbuild script
darms Apr 11, 2017
dc22596
let's see if this starts a build
darms 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"]
}
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_URL='https://slugram-backend.herokuapp.com'

218 changes: 218 additions & 0 deletions .eslintrc

Large diffs are not rendered by default.

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
#Build Directory
build/

# End of https://www.gitignore.io/api/node
1 change: 1 addition & 0 deletions app/component/gallery/create-gallery/_create-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

20 changes: 20 additions & 0 deletions app/component/gallery/create-gallery/create-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<section class="create-gallery">
<form name="createGalleryForm"
class="gallery-form"
ng-submit="createGalleryCtrl.createGallery()">

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

<fieldset>
<label for="desc"> description </label>
<input name="desc" class="input-std" type="text"
ng-model="createGalleryCtrl.gallery.desc" required>
</fieldset>
<div class="clearfix"></div>
<button class="btn-std" type="submit"> create gallery</button>
</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';


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;
});
};
};
1 change: 1 addition & 0 deletions app/component/gallery/edit-gallery/_edit-gallery.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 26 additions & 0 deletions app/component/gallery/edit-gallery/edit-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<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"
uib-tooltip="Please input a name for the gallery"
ng-model="editGalleryCtrl.gallery.name">
</fieldset>

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


</form>
<div class="clearfix"></div>
<button class="btn-std">update</button>
</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);
};
};
1 change: 1 addition & 0 deletions app/component/gallery/gallery-item/_gallery-item.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

24 changes: 24 additions & 0 deletions app/component/gallery/gallery-item/gallery-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<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 ng-click="galleryItemCtrl.deleteGallery()" class="btn-edit" id="delete">
delete
</span>
<span
ng-click="galleryItemCtrl.showEditGallery = !galleryItemCtrl.showEditGallery" class="btn-edit" id="edit">
edit
</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);
};
};
1 change: 1 addition & 0 deletions app/component/landing/login/_login.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

35 changes: 35 additions & 0 deletions app/component/landing/login/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<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"
uib-tooltip="Please enter in text for the name"
name="username"
placeholder="username"
ng-minlength="4"
ng-model="loginCtrl.user.username"
class="input-std" 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"
ng-minlength="3"
ng-model="loginCtrl.user.password"
class="input-std" 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.debug('loginCtrl.login');

authService.login(this.user)
.then( () => {
$location.url('/home');
});
};
};
5 changes: 5 additions & 0 deletions app/component/landing/signup/_signup.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// input {
// padding: 3% 5%;
// position: absolute;
// right: 2%
// };
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)"
novalidate>

<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')
});
};
};
1 change: 1 addition & 0 deletions app/component/navbar/_navbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

12 changes: 12 additions & 0 deletions app/component/navbar/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

<section class="navbar">


<nav>
<div ng-hide="navbarCtrl.hideButtons">
<img src="/../../app/wireframes/assets/cf-logo.png">
<h1>cfgram</h1>
<button class="btn-std" ng-click="navbarCtrl.logout()" id="sign">sign out</button>
</div>
</nav>
</section>
Loading