Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
99d5473
fixed Node.JS link markdown
Zomis Aug 20, 2015
f42661c
changed action buttons on cards to use `<button>` instead of `<input>…
Zomis Aug 23, 2015
6475478
making the player-actions float left, to avoid jumping all other elem…
Zomis Aug 23, 2015
6c90055
Removed line breaks that were adding blank spaces on buttons
Aug 23, 2015
c702e86
merge changes from develop
Aug 23, 2015
8beea7a
Converted a // ine comment to CSS syntax
Aug 24, 2015
232f103
Merge branch 'sections-layout' into develop
Zomis Aug 24, 2015
e0c6453
Fixed PICNIC issues.
Aug 24, 2015
81489fa
Merge branch 'sections-layout' into develop
Zomis Aug 24, 2015
1f10486
added /test page to quickly test things about cards (such as the temp…
Zomis Aug 24, 2015
1cf559f
added more properties to test card
Zomis Aug 24, 2015
9afb464
started to add animation support (work in progress)
Zomis Aug 24, 2015
472c2e6
fixed up card-template. Matching divs correctly, using NG directive w…
Zomis Aug 24, 2015
22dcbfa
added animations for cards coming and going (animating opacity and he…
Zomis Aug 24, 2015
baac9e5
working on adding an animation for when health changes
Zomis Aug 24, 2015
82d548b
added health animations
Zomis Aug 24, 2015
2f062bf
changed animation approach. removing the DOM element and the animatio…
Zomis Aug 24, 2015
042bea8
fixed 404 error for ngFitText
Zomis Aug 24, 2015
42eac14
removed hacky hack and fixed grammar in readme.md
Aug 26, 2015
2722aa9
changed occurences of ^1.4.3 to 1.4.3 (without the ^) in dependencies
Aug 26, 2015
85a00f7
removed card_model.html spoof
Aug 26, 2015
59de8b3
card action section has been made, but alignment is wrong - opened is…
Aug 26, 2015
8d6ae3a
add colored borders and started formatting divs
Aug 27, 2015
884e25b
Removed colored borders and other inline css artifacts
Aug 27, 2015
4b50e78
move player actions button into player info div, add CSS classes for …
Aug 27, 2015
b6185a3
added height to sections
Aug 27, 2015
0f48169
Move targetable player name into player info box, other small CSS adj…
Aug 27, 2015
11fdd3d
More work on alignment
Aug 27, 2015
9798ae3
First satisfyingly playable game board so far
Aug 27, 2015
c730210
Removed border guidelines, small CSS adjustments, including a 10px ma…
Aug 28, 2015
123dc48
Everything is where it should be for the game to be playable. Added s…
Aug 28, 2015
4aabbc9
Added files and links for favicons in www/ for some reason they are n…
Aug 29, 2015
ae40571
add slash in front of image links
Aug 29, 2015
83c10e9
Merge pull request #77 from The-Quill/develop
Zomis Aug 29, 2015
3b3bffe
Merge branch 'sections-layout2' into develop
Zomis Aug 29, 2015
39d9f73
Merge branch 'game-board' into develop
Zomis Aug 29, 2015
f9456d1
Added images for Chinese cardset
Aug 29, 2015
be991f4
Merge branch 'develop'
Zomis Aug 29, 2015
653f4e4
Merge branch 'card-images' into develop
Zomis Aug 29, 2015
4dcb224
player-specific action buttons checks the player to determine visibility
Zomis Aug 29, 2015
e933945
fix a problem in `moveCard` (ZoneChangeMessage handler) when source z…
Zomis Aug 29, 2015
75746d0
Added mythos/hindu/ images
Aug 30, 2015
a0c5377
Merge branch 'card-images' of https://github.com/Cardshifter/HTML-Cli…
Aug 30, 2015
65478a5
Merge remote-tracking branch 'origin/card-images' into card-images
Aug 30, 2015
6b84fe4
fixed issues with cards not found when UpdateMessage is sent before C…
Zomis Aug 30, 2015
91b0a58
Add mythos/greek image files
Sep 5, 2015
60646a6
Cropped bear.jpg correctly
Sep 5, 2015
4998a8d
images/cards/mythos/common
Sep 5, 2015
3664d72
merge card-images into develop
Sep 5, 2015
c5f4041
only tries to display "from" in a chat message if it exists, cleaned …
sirpython Sep 14, 2015
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For more information about the Cardshifter project, see:
- [Primary repository on GitHub](https://github.com/Cardshifter/Cardshifter)

### Development
Ensure you have [https://nodejs.org/](NodeJS) installed. Then execute the following instructions:
Ensure you have [NodeJS](https://nodejs.org/) installed. Then execute the following instructions:

````bash
git clone https://www.github.com/cardshifter/html-client
Expand All @@ -22,6 +22,6 @@ npm i
````

Then you can run one of the following scripts to perform actions:
- `npm run build` - builds, and minifies, the cardshifter client and deposits it in the ./dist folder. The files built by this script are intended to be deployed to a live server.
- `npm run develop` - starts a basic webserver (powered by `webpack-dev-server`) that will host the cardshifter html client. It will also watch your files and recompile them every time they change. See [webpack](webpack.github.io) for more information.
- `npm run build` - builds, and minifies, the Cardshifter client and deposits it in the ./dist folder. The files built by this script are intended to be deployed to a live server.
- `npm run develop` - starts a basic webserver (powered by `webpack-dev-server`) that will host the Cardshifter HTML client. It will also watch your files and recompile them every time they change. See [webpack](webpack.github.io) for more information.
- `npm test` - runs all tests via karma. Tests are created by placing a file with the extension `*.spec.js` inside of the src folder. All tests have access to webpack (and thus `require`).
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
"webpack-dev-server": "^1.10.1"
},
"dependencies": {
"angular": "^1.4.3",
"angular-route": "^1.4.3",
"angular-bootstrap-npm": "0.13.3"
"angular": "1.4.3",
"angular-route": "1.4.3",
"angular-bootstrap-npm": "0.13.3",
"angular-animate": "1.4.3"
}
}
74 changes: 73 additions & 1 deletion src/card_model/card_model.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
background: gainsboro;
float: left;
padding: 2px;
margin-bottom: 10px;
}

.card-image {
Expand All @@ -31,4 +32,75 @@
padding-top: 8px;
font-family: Georgia, Times, "Times New Roman", serif;
font-size: 1.1em;
}
}

.card-actions {
width: 180px;
clear: both;
/*border-style: solid;
border-width: 3px;
border-color: black;
border-radius: 10px;*/
text-align: center;
}

.card.ng-enter, .card.ng-leave, .card.ng-move {
-webkit-transition: 0.5s linear all;
-moz-transition: 0.5s linear all;
-o-transition: 0.5s linear all;
transition: 0.5s linear all;
}

.card.ng-enter, .card.ng-move {
opacity: 0;
height: 0;
overflow: hidden;
}

.card.ng-move.ng-move-active,
.card.ng-enter.ng-enter-active {
opacity: 1;
height: 275px;
}

.card.ng-leave {
opacity: 1;
overflow: hidden;
}

.card.ng-leave.ng-leave-active {
opacity: 0;
height: 0;
padding-top: 0;
padding-bottom: 0;
}

/* CARD PROPERTY ANIMATION */

.card-property {
position: relative;
display: inline-block;
}

button.diff-animation {
z-index: 4;
position: absolute;
opacity: 0;
}

.diff-animation.ng-leave {
-webkit-transition: 1.5s linear all;
-moz-transition: 1.5s linear all;
-o-transition: 1.5s linear all;
transition: 1.5s linear all;
}

.diff-animation.ng-leave {
opacity: 1;
}

.diff-animation.ng-leave.ng-leave-active {
opacity: 0;
top: -32px;
}

108 changes: 0 additions & 108 deletions src/card_model/card_model.html

This file was deleted.

45 changes: 20 additions & 25 deletions src/card_model/card_template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="card"
<div class="card card-outer"
ng-class="{'selected': card.selected, 'targetable': doingAction && targets.indexOf(card.id) !== -1}"
>
<!--
Expand All @@ -9,7 +9,6 @@
- data-fittext-max="12pt" : Maximum font size allowed
-->

<div class="card-outer">
<div class="test" ng-show="debugMode">doingAction: {{doingAction}} targets: {{targets}} actions: {{actions}} card: {{card}}</div>
<!-- card name -->
<div>
Expand All @@ -33,39 +32,28 @@
<div>
<!-- mana cost -->
<div style="float: left; padding: 5px">
<button class="btn btn-sm btn-info active glyphicon glyphicon-tint" style="cursor:default">
{{card.properties.MANA_COST}}
</button>
<button class="btn btn-sm btn-info active glyphicon glyphicon-tint" style="cursor:default">{{card.properties.MANA_COST}}</button>
</div>
<div style="float: right; padding: 5px;" class="btn-group">
<!-- attack -->
<button ng-show="card.properties.ATTACK" class="btn btn-sm btn-danger active glyphicon glyphicon-screenshot" style="cursor:default">
{{card.properties.ATTACK}}
</button>
<button ng-hide="card.properties.ATTACK" class="btn btn-sm btn-danger active glyphicon glyphicon-screenshot" style="cursor:default">
-
</button>
<button ng-show="card.properties.ATTACK" class="btn btn-sm btn-danger active glyphicon glyphicon-screenshot" style="cursor:default">{{card.properties.ATTACK}}</button>
<button ng-hide="card.properties.ATTACK" class="btn btn-sm btn-danger active glyphicon glyphicon-screenshot" style="cursor:default">-</button>
<!-- health -->
<button ng-show="card.properties.HEALTH" class="btn btn-sm btn-success active glyphicon glyphicon-heart" style="cursor:default">
{{card.properties.HEALTH}}
</button>
<button ng-hide="card.properties.HEALTH" class="btn btn-sm btn-success active glyphicon glyphicon-heart" style="cursor:default">
-
</button>
<div class="card-property">
<button ng-show="card.properties.HEALTH" class="btn btn-sm btn-success active glyphicon glyphicon-heart" style="cursor:default">{{card.properties.HEALTH}}</button>
<button ng-hide="card.properties.HEALTH" class="btn btn-sm btn-success active glyphicon glyphicon-heart" style="cursor:default">-</button>
<dynamic-animation items="card.animations.HEALTH" />
</div>
</div>
</div>
<div style="clear: both;">
<div style="float: left; padding: 5px; text-align: center;">
<!-- scrap cost -->
<button ng-show="card.properties.SCRAP_COST" class="btn btn-xs btn-primary active glyphicon glyphicon-wrench" style="cursor:default">
{{card.properties.SCRAP_COST}}
</button>
<button ng-show="card.properties.SCRAP_COST" class="btn btn-xs btn-primary active glyphicon glyphicon-wrench" style="cursor:default">{{card.properties.SCRAP_COST}}</button>
</div>
<div ng-show="card.properties.SCRAP" style="float: left; padding: 5px; text-align: center;">
<!-- scrap value -->
<button class="btn btn-xs btn-primary active glyphicon glyphicon-cog" style="cursor:default">
{{card.properties.SCRAP}}
</button>
<button class="btn btn-xs btn-primary active glyphicon glyphicon-cog" style="cursor:default">{{card.properties.SCRAP}}</button>
</div>
<!-- flavor text -->
<div ng-show="card.properties.flavor" style="float: right; padding: 5px; text-align: center;">
Expand All @@ -82,5 +70,12 @@
>FX</button>
</div>
</div>
<input ng-repeat="action in actions" ng-if="!doingAction && action.id === card.id" ng-click="startAction({action: action})" type="button" value="{{action.action}}"/>
</div>
<div class="card-actions">
<button class="btn btn-xs btn-navbar csh-button" ng-repeat="action in actions"
ng-if="!doingAction && action.id === card.id"
ng-click="startAction({action: action})"
class="btn btn-xs btn-default">
{{action.action}}
</button>
</div>
</div>
66 changes: 66 additions & 0 deletions src/cardshifter.css
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ th {
}

/* FORMATTING FOR GAME-BOARD STUFF */


.targetable {
background-color: yellow;
}
Expand All @@ -242,3 +244,67 @@ th {
background-color: #00ffff;
}

.player-info-box {
/*border: solid 3px yellow;*/ /* for testing */
/* Layout & Positioning */
height: 300px;
width: 14%;
float: left;
/* Styling: */
border: double 3px #7A7A7A;
background-color: #F5F5F5;
border-radius: 10px;
/* Content alignment */
text-align: left;
padding-left: 5px;
font-size: 0.8em;
}

.player-actions {
}

.card-property {
position: relative;
}

.player-user .zone-Hand {
/*border: solid 3px red;*/
height: 300px;
width: 86%;
overflow-y: scroll;
float: left;
/* Styling: */
border: double 3px #BBBBBB;
background-color: #EEEEEE;
border-radius: 10px;
}

.player-user .zone-Battlefield {
/*border: solid 3px pink;*/
height: 300px;
width: 86%;
overflow-y: scroll;
float: left;
/* Styling: */
border: double 3px #1F3D7A;
background-color: #C2D1F0;
border-radius: 10px;
}

.player-opponent .zone-Hand {
visibility: hidden; /* THERE IS NOTHING TO SHOW IN THIS SECTION RIGHT NOW - @Phrancis 2015-08-27 */
/*border: solid 3px blue;*/
height: 300px;
width: 3%;
}

.player-opponent .zone-Battlefield {
/*border: solid 3px teal;*/
height: 300px;
width: 100%;
overflow-y: scroll;
/* Styling: */
border: double 3px #7A0000;
background-color: #E68080;
border-radius: 10px;
}
Loading