Skip to content

Commit

Permalink
Merge b5f075e into 720570f
Browse files Browse the repository at this point in the history
  • Loading branch information
topseySuave committed Apr 27, 2018
2 parents 720570f + b5f075e commit 6149c09
Show file tree
Hide file tree
Showing 22 changed files with 644 additions and 156 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gulpfile.babel.js
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eqeqeq": 0,
"func-names": 0,
"curly": ["error", "multi-line"],
"import/extensions": "off",
"import/no-unresolved": "off",
"no-shadow": ["error", { "allow": ["req", "res", "err"] }],
"valid-jsdoc": [
Expand Down
1 change: 1 addition & 0 deletions app/controllers/game.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable import/no-unresolved, import/extensions */
import mongoose from 'mongoose';

const GameHistory = mongoose.model('GameHistory');
Expand Down
9 changes: 6 additions & 3 deletions app/models/game.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable import/extensions, import/no-unresolved */
import mongoose from 'mongoose';

const { Schema } = mongoose;

/**
* Game Schema
*/
* Game Schema
*/
const gameSchema = new Schema(
{
gameID: String,
Expand All @@ -15,7 +16,9 @@ const gameSchema = new Schema(
default: ''
}
},
{ timestamps: true }
{
timestamps: true
}
);

mongoose.model('GameHistory', gameSchema);
21 changes: 16 additions & 5 deletions app/views/includes/foot.jade
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ script.
g.src = '//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s)
}(document, 'script'));

script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js')
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js')
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js')
Expand Down Expand Up @@ -40,19 +41,29 @@ script.
});
});

//Firebase
script(type='text/javascript', src="https://www.gstatic.com/firebasejs/3.6.6/firebase.js")
script(type='text/javascript', src="/js/firebase.config.js")

script(type='text/javascript', src='/lib/underscore/underscore-min.js')

//AngularJS
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js')
script(type='text/javascript', src='https://code.angularjs.org/1.1.5/angular.js')
script(type='text/javascript', src='https://code.angularjs.org/1.1.5/angular-resource.js')
script(type='text/javascript', src='https://code.angularjs.org/1.1.5/angular-cookies.js')
//script(type='text/javascript', src='/lib/angular/angular.min.js')
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js')
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-route.js')
script(type='text/javascript', src='https://code.angularjs.org/1.4.0/angular-resource.js')
script(type='text/javascript', src='https://code.angularjs.org/1.4.0/angular-cookies.js')

script(type='text/javascript', src="https://cdn.firebase.com/libs/angularfire/2.3.0/angularfire.min.js")

//Angular UI
script(type='text/javascript', src='/lib/angular-bootstrap/ui-bootstrap-tpls.js')
script(type='text/javascript', src='/lib/angular-ui-utils/modules/route.js')
script(type="text/javascript", src="https://cdnjs.cloudflare.com/ajax/libs/angular-materialize/0.2.2/angular-materialize.min.js")

script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/lib/js/emojione.min.js')
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/emojionearea/3.4.1/emojionearea.min.js')

//Application Init
script(type='text/javascript', src='/js/init.js')
script(type='text/javascript', src='/js/app.js')
Expand All @@ -68,7 +79,7 @@ script(type='text/javascript', src='/js/services/game.js')
script(type='text/javascript', src='/js/controllers/index.js')
script(type='text/javascript', src='/js/controllers/header.js')
script(type='text/javascript', src='/js/controllers/game.js')
// script(type='text/javascript', src='/js/controllers/users.js')
script(type='text/javascript', src='/js/controllers/chat.js')
script(type='text/javascript', src='/js/init.js')

//Socket.io Client Library
Expand Down
4 changes: 3 additions & 1 deletion app/views/includes/head.jade
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ head
meta(property='og:site_name', content='Cards for Humanity')
meta(property='fb:admins', content='APP_ADMIN')

link(rel='stylesheet', href='/lib/hopscotch/dist/css/hopscotch.min.css')
link(rel='stylesheet', href='/lib/hopscotch/dist/css/hopscotch.min.css')
link(rel='stylesheet', href='https://fonts.googleapis.com/icon?family=Material+Icons')
link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css')
link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css')
link(rel='stylesheet', href='/css/hover-min.css')
link(rel='stylesheet', href='/css/style.css')
link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Nova Flat')
link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Allerta Stencil')
link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/css/emojione.min.css')
link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/emojionearea/3.4.1/emojionearea.min.css')

//if lt IE 9
script(src='http://html5shim.googlecode.com/svn/trunk/html5.js')
1 change: 1 addition & 0 deletions config/routes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import Game from '../app/controllers/game';

const users = require('../app/controllers/users');
Expand Down
47 changes: 37 additions & 10 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,18 @@ gulp.task('nodemon', () =>

gulp.task('build', ['babel', 'sass', 'dist-dep', 'dist-base']);
gulp.task('babel', () => {
gulp
.src([
'./**/*.js',
'!dist/**',
'!node_modules/**',
'!gulpfile.babel.js',
'!bower_components/**/*'
])
gulp.src([
'./**/*.js',
'!dist/**',
'!node_modules/**',
'!gulpfile.babel.js',
'!bower_components/**/*'
])
.pipe(babel())
.pipe(gulp.dest('./dist'));
});
gulp.task('sass', () => {
gulp
.src('public/css/common.scss')
gulp.src('public/css/common.scss')
.pipe(sass())
.pipe(gulp.dest('public/css/'));
});
Expand All @@ -60,6 +58,10 @@ gulp.task('dist-dep', [
'mv-angularUtils',
'mv-angular-bootstrap',
'mv-hopscotch',
'mv-angular-bootstrap',
'emojioneCSS',
'emojioneJS',
'emojionearea'
]);

gulp.task('test', () => {
Expand Down Expand Up @@ -98,6 +100,21 @@ gulp.task('mv-angularUtils', () =>
'./dist/public/lib/angular-ui-utils/modules'
));

gulp.task('emojioneCSS', () => {
gulp.src('bower_components/emojione/extras/css/emojione.css')
.pipe(gulp.dest('./dist/public/lib/emojionearea'));
});

gulp.task('emojioneJS', () => {
gulp.src('bower_components/emojione/lib/js/emojione.js')
.pipe(gulp.dest('./dist/public/lib/emojionearea'));
});

gulp.task('emojionearea', () => {
gulp.src('bower_components/emojionearea/dist/*')
.pipe(gulp.dest('./dist/public/lib/emojionearea'));
});

gulp.task('mv-angular-bootstrap', () =>
move(
'bower_components/angular-bootstrap/**/*',
Expand All @@ -110,3 +127,13 @@ gulp.task('mv-config', () => move('config/env/*.json', './dist/config/env'));

gulp.task('mv-public', () =>
move(['public/**/*', '!public/js/**'], './dist/public'));

gulp.task('test', () => {
gulp.src(['test/**/*.js'])
.pipe(mocha({
reporter: 'spec',
exit: true,
compilers: 'babel-core/register'
}))
.pipe(exit());
});
Binary file added public/audio/beep.mp3
Binary file not shown.
177 changes: 173 additions & 4 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nav .brand-logo {
}

p {
line-height: 2rem;
line-height: 1.6rem;
}

.button-collapse {
Expand Down Expand Up @@ -411,8 +411,7 @@ textarea.materialize-textarea.valid:focus,

.flex {
display: flex;
width: calc(100%-5px);
/* flex-wrap: wrap; */
width: calc(100% - 5px)
}

.timer {
Expand Down Expand Up @@ -486,7 +485,7 @@ textarea.materialize-textarea.valid:focus,
display: inline-block;
}
.par {
width: calc(100%-5px);
width: calc(100% - 5px);
}

.fsize {
Expand All @@ -496,6 +495,176 @@ textarea.materialize-textarea.valid:focus,
justify-content: center;
}

/*chat section*/
#chatbox{
width:390px;
background:#fff;
border-radius:6px;
overflow:hidden;
height:484px;
display: none;
}
#chatview{
width:390px;
height:484px;
position:absolute;
top:0;
left:0;
background:#fff;
-webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
}
#chat-messages{
margin-top:40px;
height: 370px;
overflow-y:scroll;
overflow-x:hidden;
padding-right: 20px;
-webkit-transition: all 200ms cubic-bezier(0.000, 0.995, 0.990, 1.000);
-moz-transition: all 200ms cubic-bezier(0.000, 0.995, 0.990, 1.000);
-ms-transition: all 200ms cubic-bezier(0.000, 0.995, 0.990, 1.000);
-o-transition: all 200ms cubic-bezier(0.000, 0.995, 0.990, 1.000);
transition: all 200ms cubic-bezier(0.000, 0.995, 0.990, 1.000);
}
#chat-messages div.message{
padding:0 50px 0px 20px;
clear:both;
margin-right: -19px;
}
#chat-messages div.message.right{
padding: 0 20px 0px 50px;
margin-right: -19px;
}
.message .bubble{
background: #f0f1f2;
font-size:13px;
font-weight: lighter;
padding:12px 13px;
border-radius:5px 5px 5px 0px;
color:#333;
position:relative;
float:left;
margin-bottom: 10px;
}
#chat-messages div.message.right .bubble{
float:right;
font-weight: lighter;
border-radius:5px 5px 0px 5px ;
}
.bubble .corner{
background:url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/245657/bubble-corner.png") 0 0 no-repeat;
position:absolute;
width:7px;
height:7px;
left:-5px;
bottom:0;
}
div.message.right .corner{
background:url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/245657/bubble-cornerR.png") 0 0 no-repeat;
left:auto;
right:-5px;
}
.bubble span{
display: block;
color: #000;
}
.bubble .bubble-title {
font-weight: 700;
}
.bubble-message img{
width: 20px;
height: 20px;
}
#sendmessage{
/*height:60px;*/
border-top:1px solid #e7ebee;
position:absolute;
bottom:0;
right:0px;
width:390px;
background:#fff;
/*padding-bottom:50px;*/
}
#sendmessage input{
background:#fff;
margin: 7px 0 0 15px;
border: none;
padding:0;
font-size:14px;
font-family:"Open Sans", sans-serif;
font-weight: 400;
color:#aab8c2;
width: 320px;
}
#sendmessage input:focus{
outline: 0;
}
#sendmessage button{
background:#fff url("https://storage.googleapis.com/material-icons/external-assets/v4/icons/svg/ic_send_black_24px.svg") 50% 50% no-repeat;
width:30px;
height:100%;
position:absolute;
right: 15px;
top: 0;
border:none;
}
#sendmessage button:hover{
cursor:pointer;

}
#sendmessage button:focus{
outline: 0;
opacity: .7;
}
#chatview, #sendmessage {
border-radius:6px;
}
.close-btn{
position: absolute;
top: 0;
right: 0;
padding: 10px;
z-index: 1;
cursor: pointer;
}
.mute-btn{
position: absolute;
top: 0;
left: 0;
padding: 10px;
color: black;
z-index: 10;
cursor: pointer;
}

#sendmessage input{
border-bottom: 0px;
-webkit-box-shadow: none;
box-shadow: none;
}

.notification{
position: absolute;
color: white;
top: -5px;
height: 20px;
width: 20px;
background: red;
border-radius: 50%;
}
.emojionearea.emojionearea-inline{
height: 54px !important;
}
.emojionearea.emojionearea-inline>.emojionearea-editor{
height: 52px !important;
}
.typing{
position: absolute;
bottom: 63px;
padding-left: 10px;
font-size: 12px;
color: grey;
}
div.hopscotch-bubble .hopscotch-nav-button.next {
background: #2f102e !important;
}
Expand Down
Loading

0 comments on commit 6149c09

Please sign in to comment.