Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
resolve linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Erin Schnabel authored and ebullient committed Oct 27, 2020
1 parent c72b979 commit 70dcbe2
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 120 deletions.
1 change: 1 addition & 0 deletions app/.jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"curly": true,
"eqeqeq": true,
"esnext": true,
"eqnull":true,
"jasmine": true,
"latedef": true,
"noarg": true,
Expand Down
4 changes: 3 additions & 1 deletion app/gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ gulp.task('lint:templates', () => {
customattrs: ['scroll-glue', 'marked'],
customtags: ['profile-core'],
relaxerror: [
'Consider adding a “lang” attribute to the “html” start tag to declare the language of this document.'
'Consider adding a “lang” attribute to the “html” start tag to declare the language of this document.',
'Illegal character in path segment: “{” is not allowed.'
],
};
return gulp.src('public/templates/**/*.html')
Expand All @@ -290,6 +291,7 @@ gulp.task('test', function(done) {
new karma.Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
autoWatch: false,
browsers: ['PhantomJS']
}, done).start();
});
Expand Down
1 change: 1 addition & 0 deletions app/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports = function(config) {
'public/js/app.js',
'public/js/controllers/default.js',
'public/js/controllers/play.js',
'public/js/controllers/redhat.js',
'public/js/controllers/site.js',
'public/js/directives/profileCore.js',
'public/js/services/auth.js',
Expand Down
11 changes: 6 additions & 5 deletions app/public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,16 @@ angular.module('playerApp', ['ngResource', 'ngSanitize', 'ui.router', 'ngWebSock
url: '^/yuk',
onEnter: function (auth, go_ga) {
console.info("state -> yuk");
go_ga.hit('yuk');
var start = auth.getStartingState();
auth.logout(); // reset to try again
auth.setStartingState(start);
}
})
.state('default.logout', {
onEnter: function (auth, go_ga) {
onEnter: function ($state, auth, go_ga) {
console.info("state -> logout");
go_ga.hit('logout');
var start = auth.getStartingState();
auth.logout(); // reset to try again
return $state.target(start);
Expand All @@ -186,9 +188,8 @@ angular.module('playerApp', ['ngResource', 'ngSanitize', 'ui.router', 'ngWebSock
.state('redhat.login', {
url: '^/redhat/login',
onEnter: function (auth, go_ga) {
console.info("state -> redhat.login");
console.info('state -> redhat.login');
auth.setStartingState('redhat');
go_ga.hit('redhat');
go_ga.report('send', 'event', 'GameOn', 'App', 'redhat-login');
}
})
Expand All @@ -203,7 +204,7 @@ angular.module('playerApp', ['ngResource', 'ngSanitize', 'ui.router', 'ngWebSock
// a fictional var that we'll have injected to onEntry and into the PlayCtrl.
// resolve will make sure we don't create PlayCtrl or enter onEntry until
// the promises below are all complete.
"userAndAuth": function (auth, user, $state) {
"userAndAuth": function (auth, user) {
return auth.getAuthenticationState().then(function (isAuthenticated) {
if (!isAuthenticated || typeof user.profile._id === 'undefined') {
return false;
Expand All @@ -216,7 +217,7 @@ angular.module('playerApp', ['ngResource', 'ngSanitize', 'ui.router', 'ngWebSock
onEnter: function ($state, auth, user, userAndAuth) {
console.info("state -> play", user.profile, userAndAuth);
if ( ! userAndAuth ) {
return $state.go(auth.getStartingState());
return $state.target(auth.getStartingState());
}
}
})
Expand Down
8 changes: 3 additions & 5 deletions app/public/js/controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
angular.module('playerApp')
.controller('DefaultCtrl',
[ '$state','$log', 'API', 'user', 'auth',
function ( $state, $log, API, user, auth) {
[ '$state','API', 'user', 'auth',
function ( $state, API, user, auth) {

// Login links
this.api = API;
Expand All @@ -20,9 +20,7 @@ angular.module('playerApp')
this.auth = auth;

this.backToTheBeginning = function() {
var start = auth.getStartingState();
auth.logout(); // reset to try again
$state.go(start);
$state.go('logout');
};

this.showDummy = function() {
Expand Down
8 changes: 3 additions & 5 deletions app/public/js/controllers/redhat.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
angular.module('playerApp')
.controller('RedHatCtrl',
[ '$state','$log', 'API', 'user', 'auth',
function ( $state, $log, API, user, auth) {
[ '$state','API', 'user', 'auth',
function ( $state, API, user, auth) {

// Login links
this.api = API;
Expand All @@ -19,10 +19,8 @@ angular.module('playerApp')
this.user = user;
this.auth = auth;

this.userLogin = {};

this.backToTheBeginning = function() {
$state.go('logout');
$state.go('logout');
};
}
]);
46 changes: 23 additions & 23 deletions app/public/js/services/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ angular.module('playerApp')
rules.colorRule = "At least 3 characters, no spaces.";
rules.colorPattern = /^\w{3,}$/;

var refresh = function() {
$log.debug('loading user %o', profile._id);
var gameonHeaders = {'gameon-jwt': auth.token()};
var q;

q = $http({
method : 'GET',
url : API.PROFILE_URL + 'accounts/' + profile._id,
cache : false,
headers : gameonHeaders
}).then(function(response) {
$log.debug('%o: %o %o', API.PROFILE_URL + 'accounts/' + profile._id, response.status, response.statusText);
angular.extend(profile, angular.fromJson(response.data));
$log.debug('updated profile: %o', profile);
return true;
}, function(response) {
$log.debug(response.status + ' ' + response.statusText + ' ' + response.data);
return false;
}).catch(console.log.bind(console));

return q;
};

var load = function() {
var jwt = auth.get_jwt();
$log.debug('loading user %o', jwt.id);
Expand Down Expand Up @@ -65,29 +88,6 @@ angular.module('playerApp')
.catch(console.log.bind(console));
};

var refresh = function() {
$log.debug('loading user %o', profile._id);
var gameonHeaders = {'gameon-jwt': auth.token()};
var q;

q = $http({
method : 'GET',
url : API.PROFILE_URL + 'accounts/' + profile._id,
cache : false,
headers : gameonHeaders
}).then(function(response) {
$log.debug('%o: %o %o', API.PROFILE_URL + 'accounts/' + profile._id, response.status, response.statusText);
angular.extend(profile, angular.fromJson(response.data));
$log.debug('updated profile: %o', profile);
return true;
}, function(response) {
$log.debug(response.status + ' ' + response.statusText + ' ' + response.data);
return false;
}).catch(console.log.bind(console));

return q;
};

var update = function() {
$log.debug("Updating user with: %o", profile);
// Update user
Expand Down
101 changes: 51 additions & 50 deletions app/public/styles/redhatContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
padding-right: 1em;
height: 25px;
}
#redhat .colab img {
height: 100%;
width: auto;
}
#redhat .silhouettes div img {
width: 70%;
height: auto;
}
#redhat .main .logo img {
height: 100%;
width: auto;
Expand Down Expand Up @@ -58,111 +66,104 @@
height: 20px;
color: #000;
}
#redhat .colab img {
height: 100%;
width: auto;
}
.silhouettes {
#redhat .silhouettes {
box-sizing: border-box;
display: -ms-flexbox;
margin: 0 -0.5em;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: 0 -.5em;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: end;
align-items: flex-end;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
position: relative;
overflow: hidden;
padding-top: 80px;
text-align: center;
font-size: 0;
}
.silhouettes div {
#redhat .silhouettes div {
transform: translateY(100%);
transition: transform 0.3s ease;
}
.silhouettes div img {
width: 70%;
height: auto;
}
.silhouettes.animate > div:nth-child(1) {
#redhat .silhouettes.animate > div:nth-child(1) {
animation: slideUp1 1s forwards 1;
}
#redhat .silhouettes.animate > div:nth-child(2) {
animation: slideUp2 1s forwards 1;
}
#redhat .silhouettes.animate > div:nth-child(3) {
animation: slideUp3 1s forwards 1;
}
#redhat .silhouettes.animate > div:nth-child(4) {
animation: slideUp4 1s forwards 1;
}
#redhat .silhouettes.animate > div:nth-child(5) {
animation: slideUp5 1s forwards 1;
}
#redhat .silhouettes.animate > div:nth-child(6) {
animation: slideUp6 1s forwards 1;
}
#redhat .silhouettes.animate > div:nth-child(7) {
animation: slideUp7 1s forwards 1;
}

@keyframes slideUp1 {
0% {
transform: translateY(285px);
transform: translateY(285px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
.silhouettes.animate > div:nth-child(2) {
animation: slideUp2 1s forwards 1;
}

@keyframes slideUp2 {
0% {
transform: translateY(484px);
transform: translateY(484px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
.silhouettes.animate > div:nth-child(3) {
animation: slideUp3 1s forwards 1;
}

@keyframes slideUp3 {
0% {
transform: translateY(81px);
transform: translateY(81px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
.silhouettes.animate > div:nth-child(4) {
animation: slideUp4 1s forwards 1;
}

@keyframes slideUp4 {
0% {
transform: translateY(664px);
transform: translateY(664px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
.silhouettes.animate > div:nth-child(5) {
animation: slideUp5 1s forwards 1;
}

@keyframes slideUp5 {
0% {
transform: translateY(52px);
transform: translateY(52px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
.silhouettes.animate > div:nth-child(6) {
animation: slideUp6 1s forwards 1;
}

@keyframes slideUp6 {
0% {
transform: translateY(297px);
transform: translateY(297px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
.silhouettes.animate > div:nth-child(7) {
animation: slideUp7 1s forwards 1;
}

@keyframes slideUp7 {
0% {
transform: translateY(372px);
transform: translateY(372px);
}
100% {
transform: translateY(0);
transform: translateY(0);
}
}
31 changes: 0 additions & 31 deletions resources/icons/half-circle.svg

This file was deleted.

0 comments on commit 70dcbe2

Please sign in to comment.