Skip to content

Commit

Permalink
Feature/#130341347/landing page (#12)
Browse files Browse the repository at this point in the history
* Add new layout and styles for landing page

* Add animation for landing page slider

* Fix indentations issues raised by houndCI

* #131246955 Authenticated users can view game history (#11)

* Feature(base-files): Add base files needed to for the frontend

Start #131246955

* Feature(add-history-route): Add /#!/history route to the main controller

* Feature(history-test): Add test files for angular history code

Add spec files to test the angular js code to be written for
getting authenticated user's game history. The test files will
contain tests for an angular factory(service) and angular
controller.

* Feature(service-test): Add spec to test History service is defined

Add some specs to the history.test.js file to test if
the History service is defined. This is just a basic
test to ascertain the existence of the existence of the
service.

* Feature(test-files): Add location of new files to karma

The new files created for the History service and History
controller have been added to the karma config file. Also,
the History test file has also been added.

* Feature(pass-test): Add History service to pass the first test

* Feature(karma-config): Add all js files in app folder to karma

* Feature(service-test): Add spec to test history service has getHistory function

* add history api endpoints

* Feature(base-files): Add base files needed to for the frontend

Start #131246955

* Feature(add-history-route): Add /#!/history route to the main controller

* Feature(history-test): Add test files for angular history code

Add spec files to test the angular js code to be written for
getting authenticated user's game history. The test files will
contain tests for an angular factory(service) and angular
controller.

* Feature(service-test): Add spec to test History service is defined

Add some specs to the history.test.js file to test if
the History service is defined. This is just a basic
test to ascertain the existence of the existence of the
service.

* Feature(test-files): Add location of new files to karma

The new files created for the History service and History
controller have been added to the karma config file. Also,
the History test file has also been added.

* Feature(pass-test): Add History service to pass the first test

* Feature(karma-config): Add all js files in app folder to karma

* Feature(service-test): Add spec to test history service has getHistory function

* add history api endpoints

* Refactor(standards) simplify code by multi-lining

* Feature(add-history-controller): Add new angular module `services.history` to main module `mean`

Add services.History as a dependency to the mean angular module which serves as the main controller. Also registers services.History controller and its dependency

* Test(History-serice-test): Add test for HistoryFac test

add tests to check that the HistoryFac service exists and if it
has the getHistory function defined. It also checks if the getHistory
function makes a http get request to /api/users/:id/history endpoint

* Feature(Implement-getHistory): Implement getHistory() of HistoryFac

implement getHistory() function in HistoryFac service to make a
http request to /api/users/:id/history to get user history

* Test(history-controller-test): Add test for HistoryController

add test to check if HistoryController controller exists and if it
calls the getHistory() function of HistoryFac service

* Feature(history-controller): Implement HistoryController

implement HistoryController to call the getHistory() function of the
HistoryFac service.

* Feature(add-new-files): Add new controller and service file to food.jade

Add HistoryController and HistoryFac files to footer.jade file

* Refactor(variable-name): Change variable name for HistoryController in test file

* Feature(check-authentication): Check HistoryController if user is authenticated

* Feature(html-template): Add content to history.tpl.html

Add content to the template that displays the history of an
authenticated user. The page shows a message to unauthenticated
users indicating that they are not logged in. Also shows a message
to users who don't have a game history yet

* Feature(add-history-link): Add link to history in the top menu

add history link to the top menu. The link only shows up for
authenticated users

* Feature(change-binding): Change binding on history.tpl.html

changed from {{}} binding to using ng-bind online on line 59 of
history.tpl.html

* Refactor(const-to-var): Change const to var on line 6 in history.ctr.js

* Refactor(const-to-var): Change let to var on line 144 in history.test.js

* Refactor(refactor-history-test): Rewrite history.test.js to remove Hound CI errors

* #130341343 signup with jwt (#10)

* chore(readme-update): update read me with new relevant info
Finishes #130373385

* feature(signup): JWT for signup

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in auth.js, routes.js, all.js and signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in auth.js and signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): JWT for signup

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in auth.js, routes.js, all.js and signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in auth.js and signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt
- Allow signup without the need of a token
Finishes #130341343

* feature(signup): signup-with-jwt
- Rebase with develop branch
Finishes #130341343

* feature(signup): signup-with-jwt
- Rebase with develop branch
Finishes #130341343

* feature(signup): JWT for signup

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in auth.js, routes.js, all.js and signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in auth.js and signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt

-Update code in signup-spec.js
to meet hound specifications.

Finishes #130341343

* feature(signup): signup-with-jwt
- Allow user signup without token
Finishes #130341343

* feature(signup): signup-with-jwt
- Rebase with develop
Finishes #130341343

* feature(signup): signup-with-jwt
- Rebase with develop
Finishes #130341343

* feature(signup): signup-with-jwt
- Add password hashing function to signup
Finishes #130341343

* Feature(delete-history): Add a function to the history controller to delete history from the db

* Feature(delete-endpoint): Add route for history delete endpoint

* Feature(tests): Add afterEach to delete added history after each /api/history spec runs

* Feature(jasmine-jquery): Install jasmine-jquery from bower

* Refactor(move-response): Move response in history file to its file

move the mock response json object to its own file and require it through the getJSONFixture of jasmine-jquery

* Feature(base-files): Add base files needed to for the frontend

Start #131246955

* Feature(add-history-route): Add /#!/history route to the main controller

* Feature(history-test): Add test files for angular history code

Add spec files to test the angular js code to be written for
getting authenticated user's game history. The test files will
contain tests for an angular factory(service) and angular
controller.

* Feature(service-test): Add spec to test History service is defined

Add some specs to the history.test.js file to test if
the History service is defined. This is just a basic
test to ascertain the existence of the existence of the
service.

* Feature(test-files): Add location of new files to karma

The new files created for the History service and History
controller have been added to the karma config file. Also,
the History test file has also been added.

* Feature(pass-test): Add History service to pass the first test

* Feature(karma-config): Add all js files in app folder to karma

* Feature(service-test): Add spec to test history service has getHistory function

* add history api endpoints

* Feature(history-test): Add test files for angular history code

Add spec files to test the angular js code to be written for
getting authenticated user's game history. The test files will
contain tests for an angular factory(service) and angular
controller.

* add history api endpoints

* Refactor(standards) simplify code by multi-lining

* Feature(add-history-controller): Add new angular module `services.history` to main module `mean`

Add services.History as a dependency to the mean angular module which serves as the main controller. Also registers services.History controller and its dependency

* Test(History-serice-test): Add test for HistoryFac test

add tests to check that the HistoryFac service exists and if it
has the getHistory function defined. It also checks if the getHistory
function makes a http get request to /api/users/:id/history endpoint

* Feature(Implement-getHistory): Implement getHistory() of HistoryFac

implement getHistory() function in HistoryFac service to make a
http request to /api/users/:id/history to get user history

* Test(history-controller-test): Add test for HistoryController

add test to check if HistoryController controller exists and if it
calls the getHistory() function of HistoryFac service

* Feature(history-controller): Implement HistoryController

implement HistoryController to call the getHistory() function of the
HistoryFac service.

* Feature(add-new-files): Add new controller and service file to food.jade

Add HistoryController and HistoryFac files to footer.jade file

* Refactor(variable-name): Change variable name for HistoryController in test file

* Feature(check-authentication): Check HistoryController if user is authenticated

* Feature(html-template): Add content to history.tpl.html

Add content to the template that displays the history of an
authenticated user. The page shows a message to unauthenticated
users indicating that they are not logged in. Also shows a message
to users who don't have a game history yet

* Feature(add-history-link): Add link to history in the top menu

add history link to the top menu. The link only shows up for
authenticated users

* Feature(change-binding): Change binding on history.tpl.html

changed from {{}} binding to using ng-bind online on line 59 of
history.tpl.html

* Refactor(const-to-var): Change const to var on line 6 in history.ctr.js

* Refactor(const-to-var): Change let to var on line 144 in history.test.js

* Refactor(refactor-history-test): Rewrite history.test.js to remove Hound CI errors

* Feature(delete-history): Add a function to the history controller to delete history from the db

* Feature(delete-endpoint): Add route for history delete endpoint

* Feature(tests): Add afterEach to delete added history after each /api/history spec runs

* Feature(jasmine-jquery): Install jasmine-jquery from bower

* Refactor(move-response): Move response in history file to its file

move the mock response json object to its own file and require it through the getJSONFixture of jasmine-jquery

* Fix responsive design issue for animated card

* Add new layout and styles for landing page

* Add animation for landing page slider

* Fix indentations issues raised by houndCI

* Fix responsive design issue for animated card
  • Loading branch information
cyrielo authored and ruqoyyasadiq committed Oct 10, 2016
1 parent 94c3868 commit dc667b0
Show file tree
Hide file tree
Showing 11 changed files with 482 additions and 256 deletions.
7 changes: 2 additions & 5 deletions app/views/includes/head.jade
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
meta(name='viewport', content='width=device-width,initial-scale=1')

title= appName
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
meta(name="keywords", content="cards against humanity, cards for humanity, offensive card game")
meta(name="description", content="Cards for Humanity: A Game for Horrible People Desperately Trying to do Good.")

meta(name="apple-mobile-web-app-capable", content="yes")
meta(name="viewport", content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")

link(href='/img/icons/favicon.ico', rel='shortcut icon', type='image/x-icon')
link(href='http://fonts.googleapis.com/css?family=Lobster', rel='stylesheet', type='text/css')
Expand All @@ -24,9 +23,7 @@ head
meta(property='fb:admins', content='APP_ADMIN')

link(rel='stylesheet', href='/lib/bootstrap/dist/css/bootstrap.css')
link(rel='stylesheet', href='/css/common.css')
link(rel='stylesheet', href='/css/animate.css')
link(rel='stylesheet', href='/css/style.css')
link(rel='stylesheet', href='/css/landing.css')


//if lt IE 9
Expand Down
290 changes: 290 additions & 0 deletions public/css/landing.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
@font-face {
font-family: 'proxima';
src: url('../fonts/proximanova-regular-webfont.ttf') format('truetype'),
url('../fonts/proximanova-regular-webfont.ttf') format('woff')
}

@font-face {
font-family: 'proxima-light';
src: url('../fonts/proximanova-light-webfont.ttf') format('truetype'),
url('../fonts/proximanova-light-webfont.ttf') format('woff')
}


@font-face {
font-family: 'proxima-bold';
src: url('../fonts/proximanova-semibold-webfont.ttf') format('truetype'),
url('../fonts/proximanova-semibold-webfont.ttf') format('woff')
}


a{
color: inherit !important;
text-decoration: none;
}

/*Header*/
.navbar-light{
background: #fff !important;
color: #9e9e9e;
}

#header-play{
width: 110px;
text-align: center;
background: #4074f5;
color: #fff;
font-weight: bold;
}

/*Main*/
.container{
width: 100%;
margin: 0 !important;
}
.section{
padding-bottom: 15px;
}
#demo-video{
width: 100%;
padding: 0 80px;
}

#play-now{
margin: 55px 0;
}

#play-now button{
background: #4074f5;
padding: 25px;
color: #ffffff;
width: 230px;
border: transparent;
font-family: proxima-bold;
font-size: 17px;
}
.how-to-play{
background: #f6f6f6;
padding: 15px;
}

.desc-col{
}
.desc-box{
margin-top: 200px;
}
.desc-text{
font-size: 35px;
color: #676767;
font-weight: lighter;
padding: 20px;
}
.desc-box .divider, .donate-row .divider{
background: #afafaf;
height: 1px;
width: 100%;
}
.animated-col{
height: 500px;
overflow: hidden;
}

#donate-title, #how-to-play-title, #site-title{
font-family: proxima-bold;
color: #676767 !important;
word-spacing: 7px !important;
letter-spacing: 10px;
}

#how-to-play-title{
margin-top: 16px;
}
#site-title{
padding: 20px;
}

.quote{
font-family: proxima-light;
font-size: 40px;
color: #6b6b6b;
font-weight: lighter;
}
.quote sup{
font-size: 14px;
top: -1.5em !important;
}
.donation-text{
margin-top: 50px;
font-size: 23px;
color: #6b6b6b;
font-family: proxima-light;
}

.footer{
margin-top: 80px;
background: #444444;
padding: 40px;
}
.footer p{
color: #9c9c9c;
font-size: 20px;
}
.donate-input{
margin-top: 80px;
border: 2px solid #d5d5d5;
width: 400px;
text-align: left;
}

.donate-input input{
outline: 0;
color: #c2c2c2;
padding: 20px;
font-size: 21px;
background: white;
width: 226px;
border:0;
}

.donate-input button{
padding: 25px;
background: #4074f5;
color: #fff;
width: 170px;
border: 0;
font-weight: bolder;
float:right;
font-size: 16px;
}
.cards{
margin-top: 20px;
float: left;
margin-left: 26px;
position: absolute;
left: 50%;
}
.cards-container{
position: relative;
left: -50%;
width: 500px;
}
.cards .card{
width: 300px;
background: white;
padding: 20px;
min-height: 370px;
font-size: 23px;
font-weight: bolder;
font-family: proxima-bold;
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
border: 2px solid #b2b2b2;
position: absolute;
z-index: 2;
left:130px;
color: #656565;
}
.cards .real-cards:first-child{
display: inherit !important;
}
.card.current{
z-index: 3;
display: inherit !important;
}

.card.real-card{
display: none;
}

.card.shadow-card{
background: #dbdbdb;
position: absolute;
transform: rotate(-6deg);
z-index: 1;
left: 90px;

}

#slider-controls{
width: 460px;
position: relative;
top: 180px;
transform: rotate(6deg) !important;
left: -72px;
}

#slider-left{
float: left;
}

#slider-right{
left: -32px;
float: right;
}

.slider-controller{
color: #6b6b6b;
position: relative;
z-index: 3;
font-size: 34px;
cursor: pointer;
}

.slider-controller.not-dead:hover{
color: #575757;
}
.dead{
color: #e8e8e8;
cursor: not-allowed;
}

/*Applying user queries*/
@media (max-width:320px) {
.cards {
margin-left: 60px;
}
}
@media (max-width:499px){
.card{
width:180px !important;
}

#slider-controls{
width:330px;
}
.desc-box {
margin-top: 0;
}

#site-title{
padding:0;
}

#demo-video{
height: 300px;
}

#play-now{
margin: 0 0 55px 0;
}

.desc-text{
margin: 0 0 55px 0;
font-size: 25px;
}

.donate-input input{
width: 60%
}

.donate-input button{
width : 40%;
}

.donate-input {
width: auto
}

}
Binary file added public/fonts/proximanova-light-webfont.ttf
Binary file not shown.
Binary file added public/fonts/proximanova-light-webfont.woff
Binary file not shown.
Binary file added public/fonts/proximanova-regular-webfont.ttf
Binary file not shown.
Binary file added public/fonts/proximanova-regular-webfont.woff
Binary file not shown.
Binary file added public/fonts/proximanova-semibold-webfont.ttf
Binary file not shown.
Binary file added public/fonts/proximanova-semibold-webfont.woff
Binary file not shown.
Binary file added public/img/panda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dc667b0

Please sign in to comment.