Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/andela/thorin-cfh into f…
Browse files Browse the repository at this point in the history
…eature/CZAR-draws-card-by-clicking
  • Loading branch information
sunday taiwo committed May 23, 2018
2 parents 3e462b6 + 662f877 commit c108db9
Show file tree
Hide file tree
Showing 14 changed files with 302 additions and 14 deletions.
5 changes: 5 additions & 0 deletions app/views/includes/foot.jade
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,10 @@ script(type='text/javascript', src='/js/init.js')
script(type='text/javascript', src='/socket.io/socket.io.js')
script(type='text/javascript', src="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.9.3/intro.min.js")

// Emojionearea library
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')


//Livereload script rendered
//script(type='text/javascript', src='http://localhost:35729/livereload.js')
2 changes: 2 additions & 0 deletions app/views/includes/head.jade
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ head
link(rel='stylesheet' href='https://fonts.googleapis.com/css?family=Kalam:400,700')
link(rel="stylesheet", href="https://fonts.googleapis.com/css?family=Quicksand:300,400,700")
link(rel="stylesheet", href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css")
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')
link(rel='stylesheet', href='/css/common.css')
link(rel='stylesheet', href='/css/animate.css')
link(rel='stylesheet', href='/css/style.css')
Expand Down
3 changes: 3 additions & 0 deletions public/css/game-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ body, html {
display: none;
}

.chat-control button{
background-color: white;
}



Expand Down
29 changes: 28 additions & 1 deletion public/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,14 @@ p {
align-items: stretch;
flex-wrap: wrap;
}
.ajust-text{
width: 250px;
margin-top: 20px;
text-align: justify;
}

.member-bio {
height: 100px;
padding-bottom: 20px;
border-bottom: 1px solid #bdbdbd;
}

Expand Down Expand Up @@ -880,3 +885,25 @@ p {
.team-background {
background: #f2f2f2;
}

/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 360px) and (max-device-width : 480px) {
.main-cover{
height: 100vh;
margin-top: 20px;
}
.team-lead img {
width: 124px;
height: 124px;
}
.team-lead h3{
font-size: 24px;
}
.managers{
padding: 10px;margin: 10px;
}
.team-lead{
margin: 10px;
}

}
Binary file added public/img/emma.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 public/img/moe.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 public/img/uk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ angular.module('mean', ['ngSanitize', 'ngAnimate', 'ngCookies', 'ngResource', 'u
}).
when('/choose-avatar', {
templateUrl: '/views/choose-avatar.html'
}).
})
.when('/profile', {
templateUrl: '/views/profile.html',
authenticated: true
}).
when('/team', {
templateUrl: 'views/team.html'
}).
otherwise({
redirectTo: '/'
});
Expand Down
22 changes: 18 additions & 4 deletions public/js/controllers/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,25 @@ angular //eslint-disable-line
};

$scope.resetForm = () => {
$scope.message = '';
$('#input').emojioneArea().data('emojioneArea').setText(''); //eslint-disable-line
};

$scope.$watch('game.gameID', function() { //eslint-disable-line
$scope.$watch('game.gameID', function () { //eslint-disable-line
if (game.gameID) {
const chat = $('#input').emojioneArea({ //eslint-disable-line
pickerPosition: 'top',
placeholder: 'Type something here ...',
events: {
keydown: (editor, event) => {
if (event.keyCode === 13) {
const message = chat.emojioneArea()
.data('emojioneArea').getText();
$scope.sendChatMessage(message);
$scope.resetForm();
}
}
}
});
startChatService();
}
if (game.gameID && game.state === 'awaiting players') {
Expand All @@ -341,7 +355,7 @@ angular //eslint-disable-line
//eslint-disable-line
const link = document.URL; //eslint-disable-line
const txt = 'Give the following link to your ' +
'friends so they can join your game: ';
'friends so they can join your game: ';
$('.how-to-play h1').css({ //eslint-disable-line
'font-size': '22px'
}).text(txt); //eslint-disable-line
Expand All @@ -361,7 +375,7 @@ angular //eslint-disable-line
if (message) {
$scope.chats.$add({
image: game.players[game.playerIndex].avatar,
message: $scope.message,
message,
date: Date.now(),
user: game.players[game.playerIndex].username
});
Expand Down
6 changes: 3 additions & 3 deletions public/views/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ <h2 id="chat-head" onclick="show()">CHAT</h2>
</div>
<form>
<span class="chat-control">
<input type="text" name="message" id="input" ng-model="message"placeholder="Message from {{game.players[game.playerIndex].username}}...">
<button ng-click="sendChatMessage(message)">Send</button>
<input type="text" name="message" id="input" ng-model="message">
<button ng-click="sendChatMessage(message)"><i class="material-icons">send</i></button>
</span>
</form>
</div>
Expand Down Expand Up @@ -200,4 +200,4 @@ <h6>{{game.message}}</h6>
$(".humburger.solid").addClass("solid")
})
</script>
<!-- </body>

Empty file removed public/views/chat.html
Empty file.
2 changes: 1 addition & 1 deletion public/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5>Cards for Humanity</h5>
</li>
</span>
<li>
<a href="" id="team">
<a href="#!/team">
Meet the Team
</a>
</li>
Expand Down
231 changes: 231 additions & 0 deletions public/views/team.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
<style>
* {
margin: 0;
padding: 0;
}
</style>
<header class="main-header solid" ng-controller="IndexController">
<div class="h-container">
<div class="logo">
<img src="/img/playing-cards.png" alt="">
<h5>Cards for Humanity</h5>
</div>

<nav class="site-nav solid" id="nav-id">
<ul>
<li>
<a href="#!/" id="top">Home</a>
</li>
<span ng-show="showOptions">
<li>
<a href="#!/signup">Sign Up</a>
</li>
<li>
<a href="#!/signin">Sign in</a>
</li>
</span>
<span ng-hide="showOptions">
<li class="dropdown">
<a id="arrow" class="dropdown-trigger" href="#" data-target="dropdown1">{{global.user.username}}
<span>
<i class="ion-arrow-down-b"></i>
</span>
</a>
</li>
</span>
</ul>
</nav>
<ul id="dropdown1" class="dropdown-content" ng-hide="showOptions">
<li>
<a href="#!/profile" ng-click="userGames()">Profile</a>
</li>
<li class="divider"></li>
<li>
<a onclick="logout()">Log Out</a>
</li>
</ul>



<div class="menu-toggle">
<div class="hamburger"></div>
</div>
</div>
</header>

<div class="team-background">
<h2>MEET THE TEAM</h2>
<section class="container team-section">
<h3>Meet the Team</h3>
<div class="member-row">
<div class="col s4 member">
<img src="/img/oseni.png" alt="">
<h6>Olusola Oseni</h6>
<p>Software Developer D0 (SIMs)</p>
<p class="ajust-text">Olusola Oseni is currently a D0 software developer at Andela. He loves coding in Python and JavaScript and enjoys taking
his dog, Lugzy Bugzy, for a walk.</p>
<div class="member-bio"></div>
<div class="member-social">
<p>Reach him on</p>
<div class="member-icon">
<a>
<i class="ion-social-facebook"></i>
</a>
<a>
<i class="ion-social-linkedin"></i>
</a>
</div>
</div>
</div>
<div class="col s4 member">
<img src="/img/ama.png" alt="">
<h6>Amarachukwu Agbo</h6>
<p>Software Developer D0 (SIMs)</p>
<p class="ajust-text">Agbo Amarachi is a D0 developer at Andela. When she is not coding, you will probably find her reading a book or checking
out fashion and lifestyle videos on Youtube.</p>
<div class="member-bio"></div>
<div class="member-social">
<p>Say hi to her</p>
<div class="member-icon">
<a>
<i class="ion-social-instagram"></i>
</a>
</div>
</div>
</div>
<div class="col s4 member">
<img src="/img/emma.png" alt="">
<h6>Emmanuel Abaye</h6>
<p>Software Developer D0 (SIMs)</p>
<p class="ajust-text">Emmanuel Abaye is a D0 software developer at Andela. He currently works with with Javascript technologies. Emmanuel loves
learning and sharing knowledge. If he’s not coding, you can catch him unwinding by hanging out with friends and watching
movies.</p>
<div class="member-bio"></div>
<div class="member-social">
<p>Reach him on</p>
<div class="member-icon">
<a>
<i class="ion-social-twitter"></i>
</a>
<a>
<i class="ion-social-facebook"></i>
</a>
</div>
</div>
</div>
</div>
<div class="member-row">
<div class="col s4 member">
<img src="/img/sunday.png" alt="">
<h6>Sunday Taiwo</h6>
<p>Software Developer D0 (SIMs)</p>
<p class="ajust-text">Taiwo Sunday D0 software developer at Andela. All things javascript and python. likes anime, rock music and sci-fi.</p>
<div class="member-bio"></div>
<div class="member-social">
<p>Send him a mail</p>
<div class="member-icon">
<a>
<i class="ion-social-google"></i>
</a>
</div>
</div>
</div>
<div class="col s4 member">
<img src="/img/ola.png" alt="">
<h6>Olayemi Lawal</h6>
<p>Software Developer D0 (SIMs)</p>
<p class="ajust-text">Olayemi Lawal, a D0 developer at Andela currently working with Javascript and React. He loves watching cartoons and listening to music</p>
<div class="member-bio"></div>
<div class="member-social">
<p>Check him out here</p>
<div class="member-icon">
<a>
<i class="ion-social-linkedin"></i>
</a>
</div>
</div>
</div>
<div class="col s4 member">
<img src="/img/chika.png" alt="">
<h6>Onuchukwu Chika</h6>
<p>Software Developer D0 (SIMs)</p>
<p class="ajust-text">
Chika Onuchukwu is currently a D0 software developer in Andela, he likes learning new stuff about functional programming.
His favourite programming language is C# and he so loves cooking.
</p>
<div class="member-bio"></div>
<div class="member-social">
<p>Say hi to him</p>
<div class="member-icon">
<a>
<i class="ion-social-facebook"></i>
</a>
<a>
<i class="ion-social-twitter"></i>
</a>
</div>
</div>
</div>
</div>
</section>
</div>
<footer class="footer">
<div class="footer-content container">
<div class="footer-col">
<div class="footer-logo">
<img src="/img/playing-cards.png" />
<p id="footer-logo">CARDS FOR HUMANITY</p>
</div>
<p class="copyright">© 2018 CFH Software</p>
</div>
<div class="footer-col">
<p>ABOUT CARDS FOR HUMANITY</p>
<p>
<a id="about">About Us</a>
</p>
<p>
<a id="about">Meet the Team</a>
</p>
</div>
<div class="footer-col">
<p>JOIN THE CONVERSATION</p>
<div class="footer-icons">
<div class="footer-icon">
<a>
<i class="ion-social-facebook"></i>
</a>
</div>
<div class="footer-icon">
<a>
<i class="ion-social-twitter"></i>
</a>
</div>
<div class="footer-icon">
<a>
<i class="ion-social-instagram"></i>
</a>
</div>
<div class="footer-icon">
<a>
<i class="ion-social-youtube"></i>
</a>
</div>
</div>
</div>
</div>
</footer>

<script>
$(document).ready(function () {
$(".dropdown-trigger").dropdown();
$('.menu-toggle').click(function () {
$('.site-nav').toggleClass('site-nav--open', 500);
$(this).toggleClass('open');
})
$(window).scroll(function () {
$(".main-header").addClass("solid");
$(".site-nav").addClass("solid");
$(".humburger.solid").addClass("solid")
})
})
</script>
Loading

0 comments on commit c108db9

Please sign in to comment.