Skip to content

Commit 27f64b8

Browse files
committed
fix most CSS issues with CardModel, most of the cards look as they should, but need to work on fonts & sizing for cards with long names or types
1 parent 739a0a3 commit 27f64b8

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

src/components/CardModel.vue

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
<template>
22
<div class="card card-outer"
33
:class="{'selected': card.selected, 'targetable': doingAction && targets.indexOf(card.id) !== -1}">
4-
<!--
5-
TODO Add ng-FitText.js fields to elements in this model of which length may vary widely, for example card descriptions and flavor text.
6-
The primary fields for FitText are:
7-
- data-fittext : Enable FitText for the content inside the tag
8-
- data-fittext-min="8pt" : Minimum font size allowed
9-
- data-fittext-max="12pt" : Maximum font size allowed
10-
-->
11-
124
<div class="test" v-if="debugMode">doingAction: {{doingAction}} targets: {{targets}} actions: {{actions}} card: {{card}}</div>
135
<!-- card name -->
146
<div>
@@ -31,43 +23,53 @@
3123
<!-- card statistics -->
3224
<div>
3325
<!-- mana cost -->
34-
<div style="float: left; padding: 5px">
35-
<button class="btn btn-sm btn-info active fa fa-tint" style="cursor:default">{{card.properties.MANA_COST}}</button>
26+
<div style="float: left; padding-left: 5px;">
27+
<button class="btn btn-sm btn-info active fa fa-tint" style="cursor:default" title="Mana Cost">
28+
{{card.properties.MANA_COST}}
29+
</button>
3630
</div>
37-
<div style="float: right; padding: 5px;" class="btn-group">
31+
<div style="float: right; padding-right: 5px;" class="btn-group">
3832
<!-- attack -->
39-
<button class="btn btn-sm btn-danger active fa fa-crosshairs" style="cursor:default">{{card.properties.ATTACK || "-"}}</button>
33+
<button class="btn btn-sm btn-danger active fa fa-crosshairs" style="cursor:default" title="Attack">
34+
{{card.properties.ATTACK || "-"}}
35+
</button>
4036
<!-- health -->
4137
<div class="card-property">
42-
<button class="btn btn-sm btn-success active fa fa-heart" style="cursor:default">{{card.properties.HEALTH || "-"}}</button>
38+
<button class="btn btn-sm btn-success active fa fa-heart" style="cursor:default" title="Health">
39+
{{card.properties.HEALTH || "-"}}
40+
</button>
4341
<!-- <dynamic-animation items="card.animations.HEALTH" /> -->
4442
</div>
4543
</div>
4644
</div>
4745
<div style="clear: both;">
48-
<div style="float: left; padding: 5px; text-align: center;">
46+
<div v-if="card.properties.SCRAP_COST" style="float: left; padding: 5px;">
4947
<!-- scrap cost -->
50-
<button v-if="card.properties.SCRAP_COST" class="btn btn-xs btn-primary active fa fa-wrench" style="cursor:default">{{card.properties.SCRAP_COST}}</button>
48+
<button class="btn btn-sm btn-primary active fa fa-wrench" style="cursor:default" title="Scrap Cost">
49+
{{card.properties.SCRAP_COST}}
50+
</button>
5151
</div>
52-
<div v-if="card.properties.SCRAP" style="float: left; padding: 5px; text-align: center;">
52+
<div v-if="card.properties.SCRAP" style="float: left; padding: 5px;">
5353
<!-- scrap value -->
54-
<button class="btn btn-xs btn-primary active fa fa-cog" style="cursor:default">{{card.properties.SCRAP}}</button>
54+
<button class="btn btn-sm btn-primary active fa fa-cog" style="cursor:default" title="Scrap Value">
55+
{{card.properties.SCRAP}}
56+
</button>
5557
</div>
5658
<!-- flavor text -->
5759
<div v-show="card.properties.flavor" style="float: right; padding: 5px; text-align: center;">
58-
<b-btn type="button" class="btn btn-xs btn-primary fa fa-book"
60+
<b-btn type="button" class="btn btn-sm btn-dark fa fa-book"
5961
popover-placement="top"
6062
v-b-popover.hover="card.properties.flavor"></b-btn>
6163
</div>
6264
<!-- effect text -->
6365
<div v-show="card.properties.effect" style="float: right; padding: 5px; text-align: center;">
64-
<b-btn type="button" class="btn btn-xs btn-warning fa fa-flash"
66+
<b-btn type="button" class="btn btn-sm btn-secondary fa fa-flash"
6567
popover-placement="top"
6668
v-b-popover.hover="card.properties.effect">FX</b-btn>
6769
</div>
6870
</div>
6971
<div class="card-actions">
70-
<button class="btn btn-xs btn-navbar csh-button btn-default" v-for="action in actions"
72+
<button class="btn btn-sm btn-navbar csh-button btn-default" v-for="action in actions"
7173
:key="action.action"
7274
v-if="!doingAction && action.id === card.id"
7375
@click="startAction(action)">
@@ -131,18 +133,18 @@ export default {
131133
132134
.card-name {
133135
float: left;
134-
padding: 5px;
136+
padding-left: 5px;
135137
font-family: Georgia, Times, "Times New Roman", serif;
136-
font-size: 1.2em;
137-
font-weight: bold;
138+
font-size: 0.9em;
139+
/* font-weight: bold; */
138140
}
139141
140142
.card-type {
141143
clear:both;
142144
padding: 5px;
143145
padding-top: 8px;
144146
font-family: Georgia, Times, "Times New Roman", serif;
145-
font-size: 1.1em;
147+
font-size: 0.9em;
146148
}
147149
148150
.card-actions {

0 commit comments

Comments
 (0)