瀏覽代碼

added 2.6x5.4 cards for monsters

Okos 5 年之前
父節點
當前提交
e2f759015d
共有 6 個檔案被更改,包括 224 行新增189 行删除
  1. 12
    1
      generator/css/card-size.css
  2. 26
    13
      generator/css/cards.css
  3. 124
    162
      generator/data/card_data_example.js
  4. 10
    3
      generator/generate.html
  5. 48
    8
      generator/js/cards.js
  6. 4
    2
      generator/js/ui.js

+ 12
- 1
generator/css/card-size.css 查看文件

79
     height: 1.5in;
79
     height: 1.5in;
80
 }
80
 }
81
 
81
 
82
+/* Monster card size */
83
+.card-size-36x54 {
84
+    width:3.6in;
85
+    min-width:3.6in;
86
+    height:5.4in;
87
+}
88
+.card-size-36x54 .card-back-icon {
89
+    width: 1.5in;
90
+    height: 1.5in;
91
+}
92
+
82
 /* Landscape big card */
93
 /* Landscape big card */
83
 .card-size-75x50 {
94
 .card-size-75x50 {
84
     width:7.5in;
95
     width:7.5in;
98
 .page[size="Letter"] .card-size-full3x3 {
109
 .page[size="Letter"] .card-size-full3x3 {
99
     width:71mm;
110
     width:71mm;
100
     height:92mm;
111
     height:92mm;
101
-}
112
+}

+ 26
- 13
generator/css/cards.css 查看文件

17
     padding:2mm;
17
     padding:2mm;
18
     padding-top:1mm;
18
     padding-top:1mm;
19
     border-radius: 2mm;
19
     border-radius: 2mm;
20
-    margin-top:0px;
20
+    margin-top:2mm;
21
     background-color: white;
21
     background-color: white;
22
     border-color: inherit;
22
     border-color: inherit;
23
     display: flex;
23
     display: flex;
27
 }
27
 }
28
 
28
 
29
 .card-back {
29
 .card-back {
30
-/*     background-color: white; */
30
+     background-color: white;
31
     border-radius: 4mm;
31
     border-radius: 4mm;
32
     border-color: inherit;
32
     border-color: inherit;
33
-    margin: 3mm;
34
     flex: 1;
33
     flex: 1;
35
     display: flex;
34
     display: flex;
36
 }
35
 }
77
 }
76
 }
78
 
77
 
79
 .card-title-inlineicon {
78
 .card-title-inlineicon {
80
-    width: 7mm;
81
-    height: 7mm;
79
+    width: 8mm;
80
+    height: 8mm;
82
     background-repeat: no-repeat;
81
     background-repeat: no-repeat;
83
     background-size: contain;
82
     background-size: contain;
84
     background-color: inherit;
83
     background-color: inherit;
85
     border-color: inherit;
84
     border-color: inherit;
85
+    display: inline-block;
86
+    font-size: 12pt;
87
+    text-align: center;
86
 }
88
 }
87
 .card-title-inlineicon-container {
89
 .card-title-inlineicon-container {
88
     position: absolute;
90
     position: absolute;
89
-    right: -1mm;
90
-    top: -1mm;
91
-    border: 1mm solid;
92
-    border-radius: 1mm;
93
-    background-color: inherit;
94
-    border-color: inherit;
91
+    right: 1mm;
92
+    color: white;
93
+    font-weight: bold;
94
+    font-size: 12pt;
95
+    line-height: 8mm;
95
 }
96
 }
96
 
97
 
97
 .card-title {
98
 .card-title {
113
 }
114
 }
114
 .card-title-14 {
115
 .card-title-14 {
115
     font-size: 14pt;
116
     font-size: 14pt;
116
-    line-height: 6.5mm;
117
+    line-height: 8mm;
117
 }
118
 }
118
 .card-title-13 {
119
 .card-title-13 {
119
     font-size: 13pt;
120
     font-size: 13pt;
139
     font-size: 10pt;
140
     font-size: 10pt;
140
     font-style: italic;
141
     font-style: italic;
141
 }
142
 }
143
+.card-challenge {
144
+    position: absolute;
145
+    right: 2mm;
146
+    display: inline;
147
+}
142
 .card-picture {
148
 .card-picture {
143
     height: 80px;
149
     height: 80px;
144
     line-height: 18px;
150
     line-height: 18px;
259
     margin-bottom: 0;
265
     margin-bottom: 0;
260
     margin-top: 0;
266
     margin-top: 0;
261
     font-size: inherit;
267
     font-size: inherit;
262
-}
268
+}
269
+
270
+img.inline-logo {
271
+    height: 6mm;
272
+    margin-left: 3px;
273
+    margin-right: 1px;
274
+}
275
+

+ 124
- 162
generator/data/card_data_example.js 查看文件

1
 var card_data_example = [
1
 var card_data_example = [
2
-    {
3
-        "count": 1,
4
-        "color": "maroon",
5
-        "title": "Burning Hands",
6
-        "icon": "white-book-1",
7
-        "icon_back": "robe",
8
-        "contents": [
9
-            "subtitle | 1st level evocation",
10
-            "rule",
11
-            "property | Casting time | 1 action",
12
-            "property | Range | Self (15ft cone)",
13
-            "property | Components | V,S",
14
-            "rule",
15
-            "fill | 2",
16
-            "text | Each creature in a 15-foot cone must make a Dexterity saving throw. A creature takes <b>3d6 fire damage</b> on a failed save, or half as much damage on a successful one.",
17
-            "text | The fire ignites any flammable objects in the area that aren't being worn or carried.",
18
-            "fill | 3",
19
-            "section | At higher levels",
20
-            "text | +1d6 damage for each slot above 1st"
21
-        ],
22
-        "tags": ["spell", "mage"]
23
-    },
24
-    {
25
-        "count": 1,
26
-        "color": "indigo",
27
-        "title": "Cunning Action",
28
-        "icon": "white-book",
29
-        "icon_back": "cloak-dagger",
30
-        "contents": [
31
-            "subtitle | Rogue feature",
32
-            "rule",
33
-            "fill | 2",
34
-            "text | You can take a <b>bonus action on each of your turns</b> in combat. This action can be used only to take the <b>Dash, Disengage, or Hide</b> action.",
35
-            "fill | 2",
36
-            "section | Fast hands (Thief 3rd)",
37
-            "text | You can also use the bonus action to make a Dexterity (<b>Sleight of Hand</b>) check, use your thieves' tools to <b>disarm a trap</b> or <b>open a lock</b>, or take the <b>Use an Object</b> action."
38
-        ],
39
-        "tags": ["feature", "rogue"]
40
-    },
41
-    {
42
-        "count": 1,
43
-        "color": "dimgray",
44
-        "title": "Full Plate",
45
-        "icon": "breastplate",
46
-        "contents": [
47
-            "subtitle | Heavy armor (1500gp)",
48
-            "rule",
49
-            "property | AC | 18",
50
-            "property | Strength required | 15",
51
-            "property | Stealth | Disadvantage",
52
-            "rule",
53
-            "fill | 2",
54
-            "description | Heavy | Unless you have the required strength, your speed is reduced by 10 feet.",
55
-            "description | Stealth | You have disadvantage on Dexterity (Stealth) checks.",
56
-            "fill | 3"
57
-        ],
58
-        "tags": ["item", "armor"]
59
-    },
60
-    {
61
-        "count": 1,
62
-        "color": "dimgray",
63
-        "title": "Dagger",
64
-        "icon": "mixed-swords",
65
-        "contents": [
66
-            "subtitle | Simple melee weapon (2gp)",
67
-            "rule",
68
-            "property | Damage | 1d4 piercing",
69
-            "property | Modifier | Strength or Dexterity",
70
-            "property | Properties | Light, Finesse, Thrown (20/60)",
71
-            "rule",
72
-            "fill | 2",
73
-            "description | Finesse | Use your choice of Strength or Dexterity modifier for attack and damage.",
74
-            "description | Light | When you attack while dual wielding light weapons, you may use a bonus action to attack with your off hand.",
75
-            "description | Thrown | You can throw the weapon to make a ranged attack with the given range.",
76
-            "fill | 3"
77
-        ],
78
-        "tags": ["item", "weapon"]
79
-    },
80
-    {
81
-        "count": 1,
82
-        "color": "dimgray",
83
-        "title": "Shortsword of Very Long Names",
84
-        "title_size": "10",
85
-        "icon": "crossed-swords",
86
-        "contents": [
87
-            "subtitle | Simple melee weapon (10gp)",
88
-            "rule",
89
-            "property | Damage | 1d6 piercing",
90
-            "property | Modifier | Strength or Dexterity",
91
-            "property | Properties | Light, Finesse",
92
-            "rule",
93
-            "fill | 2",
94
-            "description | Finesse | Use your choice of Strength or Dexterity modifier for attack and damage.",
95
-            "description | Light | When you attack while dual wielding light weapons, you may use a bonus action to attack with your off hand.",
96
-            "fill | 3"
97
-        ],
98
-        "tags": ["item", "weapon", "magic"]
99
-    },
100
-    {
101
-        "count": 1,
102
-        "color": "dimgray",
103
-        "title": "Wand of Magic Missiles",
104
-        "icon": "crystal-wand",
105
-        "contents": [
106
-            "subtitle | Wondrous item",
107
-            "rule",
108
-            "property | Maximum charges | 7",
109
-            "property | Recharge | 1d6+1 each day",
110
-            "property | Depletion | If you expend the last charge, roll a d20. On a 1, the item is destroyed.",
111
-            "rule",
112
-            "fill | 2",
113
-            "description | Spells | You can use your action to cast the following spells:",
114
-            "bullet | magic missile, 1st level (1 charge)",
115
-            "bullet | magic missile, 2nd level (2 charges)",
116
-            "bullet | magic missile, 3rd level (3 charges)",
117
-            "fill | 3",
118
-            "boxes | 7 | 2.5"
119
-        ],
120
-        "tags": ["item", "wondrous-item", "magic"]
121
-    },
122
-    {
123
-        "count": 2,
124
-        "color": "dimgray",
125
-        "title": "Potion of Healing",
126
-        "icon": "drink-me",
127
-        "contents": [
128
-            "subtitle | Potion (50gp)",
129
-            "rule",
130
-            "property | Use time | 1 action",
131
-            "property | Hit points restored | 2d4+2",
132
-            "rule",
133
-            "fill | 2",
134
-            "text | When you drink this potion, you regain 2d4+2 hitpoints.",
135
-            "text | Drinking or administering a potion takes 1 action.",
136
-            "fill | 3"
137
-        ],
138
-        "tags": ["item", "consumable"]
139
-    },
140
-    {
141
-        "count": 1,
142
-        "color": "black",
143
-        "title": "Goblin",
144
-        "icon": "imp-laugh",
145
-        "contents": [
146
-            "subtitle | Small humanoid (goblinoid)",
147
-            "rule",
148
-            "property | Armor class | 15 (leather armor, shield)",
149
-            "property | Hit points | 7 (2d6)",
150
-            "rule",
151
-            "dndstats | 8 | 14 | 10 | 10 | 8 | 8",
152
-            "rule",
153
-            "property | Skills | Stealth +6",
154
-            "property | Challenge | 1/4 (50 XP)",
155
-            "rule",
156
-            "description | Nimble escape | Disengage or Hide as bonus action",
157
-            "fill | 2",
158
-            "section | Actions",
159
-            "description | Scimitar | Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage"
160
-        ],
161
-        "tags": ["creature", "humanoid"]
162
-    }
163
-]
2
+  {
3
+    "count": 1,
4
+    "title": "Bugbear",
5
+    "contents": [
6
+      "subtitle | M, humanoid (goblinoid), chaotic evil | 1",
7
+      "fill",
8
+      "rule",
9
+      "fill",
10
+      "dndstats | 15 | 14 | 13 | 8 | 11 | 9",
11
+      "fill",
12
+      "rule",
13
+      "fill",
14
+      "property | Skills | Stealth: +6, Survival: +2 ",
15
+      "property | Senses | Darkvision 60 ft., passive perception 10",
16
+      "property | Languages | Common, goblin",
17
+      "fill",
18
+      "section | Abilities",
19
+      "description | Brute| A melee weapon deals one extra die of its damage when the bugbear hits with it (included in the attack).",
20
+      "description | Surprise Attack | If the bugbear surprises a creature and hitsection | Actionss it with an attack during the first round of combat, the target takes an extra 7 (2d6) damage from the attack.",
21
+      "fill",
22
+      "section | Actions",
23
+      "description | Morningstar | Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 11 (2d8 + 2) piercing damage.",
24
+      "description | Javelin | Melee or Ranged Weapon Attack: +4 to hit, reach 5 ft. or range 30/120 ft., one target. Hit: 9 (2d6 + 2) piercing damage in melee or 5 (1d6 + 2) piercing damage at range.",
25
+      "",
26
+      ""
27
+    ],
28
+    "tags": [],
29
+    "color": "",
30
+    "title_size": "14",
31
+    "background_image": "https://media-waterdeep.cursecdn.com/avatars/thumbnails/0/221/1000/1000/636252765234633232.jpeg",
32
+    "icon": "",
33
+    "stats": "30|27|16"
34
+  },
35
+  {
36
+    "count": "1",
37
+    "title": "Goblin",
38
+    "contents": [
39
+      "subtitle | S, humanoid (goblinoid), neutral evil | 1/4",
40
+      "fill",
41
+      "rule",
42
+      "fill",
43
+      "dndstats | 8 | 14 | 10 | 10 | 8 | 8",
44
+      "fill",
45
+      "rule",
46
+      "fill",
47
+      "property | Skills | Stealth: +6",
48
+      "property | Senses |  Darkvision 60 ft., passive perception 9",
49
+      "property | Languages | Common, goblin",
50
+      "fill",
51
+      "section | Abilities",
52
+      "description | Nimble Escape | The goblin can take the Disengage or Hide action as a bonus action on each of its turns.",
53
+      "fill",
54
+      "section | Actions",
55
+      "description | Scimitar | Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage.",
56
+      "description | Shortbow | Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: 5 (1d6 + 2) piercing damage."
57
+    ],
58
+    "tags": [],
59
+    "color": "SeaGreen",
60
+    "title_size": "14",
61
+    "background_image": "https://media-waterdeep.cursecdn.com/avatars/thumbnails/0/351/1000/1000/636252777818652432.jpeg",
62
+    "stats": "30|7|15"
63
+  },
64
+  {
65
+    "count": "1",
66
+    "title": "Owlbear",
67
+    "contents": [
68
+      "subtitle | L, monstrosity , unaligned | 3",
69
+      "fill",
70
+      "rule",
71
+      "fill",
72
+      "dndstats | 20 | 12 | 17 | 3 | 12 | 7",
73
+      "fill",
74
+      "rule",
75
+      "fill",
76
+      "property | Skills | Perception +3",
77
+      "property | Senses | Darkvision 60 ft., passive perception 13",
78
+      "property | Languages | None",
79
+      "fill",
80
+      "section | Abilities",
81
+      "description | Keen Sight and Smell | The owlbear has advantage on Wisdom (Perception) checks that rely on sight or smell.",
82
+      "fill",
83
+      "section | Actions",
84
+      "",
85
+      "",
86
+      "description | Multiattack | The owlbear makes two attacks: one with its beak and one with its claws.",
87
+      "description | Beak | Melee Weapon Attack: +7 to hit, reach 5 ft., one creature. Hit: 10 (1d10 + 5) piercing damage.",
88
+      "description | Claws | Melee Weapon Attack: +7 to hit, reach 5 ft., one target. Hit: 14 (2d8 + 5) slashing damage.",
89
+      ""
90
+    ],
91
+    "tags": [],
92
+    "color": "Brown",
93
+    "title_size": "14",
94
+    "background_image": "https://media-waterdeep.cursecdn.com/avatars/thumbnails/0/315/1000/1000/636252772225295187.jpeg",
95
+    "stats": "40|59|13"
96
+  },
97
+  {
98
+    "count": "1",
99
+    "title": "Hobgoblin",
100
+    "contents": [
101
+      "subtitle | M, humanoid (goblinoid), lawful evil | 1/2",
102
+      "fill",
103
+      "rule",
104
+      "fill",
105
+      "dndstats | 13 | 12 | 12 | 10 | 10 | 9",
106
+      "fill",
107
+      "rule",
108
+      "fill",
109
+      "property | Senses | Darkvision 60 ft., passive perception 10",
110
+      "property | Languages | Common, goblin",
111
+      "fill",
112
+      "section | Abilities",
113
+      "description | Martial Advantage | Once per turn, the hobgoblin can deal an extra 7 (2d6) damage to a creature it hits with a weapon attack if that creature is within 5 ft. of an ally of the hobgoblin that isn't incapacitated.",
114
+      "fill",
115
+      "section | Actions",
116
+      "description | Longsword | Melee Weapon Attack: +3 to hit, reach 5 ft., one target. Hit: 5 (1d8 + 1) slashing damage, or 6 (1d10 + 1) slashing damage if used with two hands.",
117
+      "description | Longbow | Ranged Weapon Attack: +3 to hit, range 150/600 ft., one target. Hit: 5 (1d8 + 1) piercing damage."
118
+    ],
119
+    "tags": [],
120
+    "color": "Teal",
121
+    "title_size": "14",
122
+    "background_image": "https://media-waterdeep.cursecdn.com/avatars/thumbnails/0/389/1000/1000/636252781431932597.jpeg",
123
+    "stats": "30|11|18"
124
+  }
125
+]

+ 10
- 3
generator/generate.html 查看文件

101
                         <div class="col-sm-8">
101
                         <div class="col-sm-8">
102
                             <select class="form-control" id="card-size" data-option="card_size">
102
                             <select class="form-control" id="card-size" data-option="card_size">
103
                                 <option value="225x35">2.25&quot; x 3.5&quot; (Bridge)</option>
103
                                 <option value="225x35">2.25&quot; x 3.5&quot; (Bridge)</option>
104
-                                <option value="25x35" selected>2.5&quot; x 3.5&quot; (Poker)</option>
104
+                                <option value="25x35">2.5&quot; x 3.5&quot; (Poker)</option>
105
                                 <option value="35x50">3.5&quot; x 5.0&quot;</option>
105
                                 <option value="35x50">3.5&quot; x 5.0&quot;</option>
106
+                                <option value="36x54" selected>3.6&quot; x 5.4&quot; (Monster)</option>
106
                                 <option value="75x50">7.5&quot; x 5.0&quot;</option>
107
                                 <option value="75x50">7.5&quot; x 5.0&quot;</option>
107
                             </select>
108
                             </select>
108
                         </div>
109
                         </div>
282
                             <input type="text" id="card-tags" class="form-control" placeholder="Tags">
283
                             <input type="text" id="card-tags" class="form-control" placeholder="Tags">
283
                         </div>
284
                         </div>
284
                     </div>
285
                     </div>
286
+                    <div class="form-group">
287
+                        <label for="card-stats" class="col-sm-2 control-label">Stats</label>
288
+                        <div class="col-sm-10">
289
+                            <input type="text" id="card-stats" class="form-control" placeholder="SPD|HP|AC" data-property="stats">
290
+                        </div>
291
+                    </div>
285
                     <div class="form-group">
292
                     <div class="form-group">
286
                         <label for="card-icon" class="col-sm-2 control-label">Icon</label>
293
                         <label for="card-icon" class="col-sm-2 control-label">Icon</label>
287
                         <div class="col-sm-10">
294
                         <div class="col-sm-10">
376
                         <li>Some RPG systems are protected by copyright. Even if some spell/item data is freely available, it does not mean you may redistribute cards containing such data.</li>
383
                         <li>Some RPG systems are protected by copyright. Even if some spell/item data is freely available, it does not mean you may redistribute cards containing such data.</li>
377
                         <li>If you find a bug or have a feature request, post them at the <a href="https://github.com/crobi/rpg-cards/issues">Github project site</a>.</li>
384
                         <li>If you find a bug or have a feature request, post them at the <a href="https://github.com/crobi/rpg-cards/issues">Github project site</a>.</li>
378
                         <li>
385
                         <li>
379
-                            The user interface consists of three columns: 
386
+                            The user interface consists of three columns:
380
                             <img alt="help" src="img/help/help.png" style="max-width:95%; display:block; padding: 5px; margin: 10px 0 10px 0; border: 1px solid #ebebeb; box-shadow: 0 0 5px #ebebeb;"/>
387
                             <img alt="help" src="img/help/help.png" style="max-width:95%; display:block; padding: 5px; margin: 10px 0 10px 0; border: 1px solid #ebebeb; box-shadow: 0 0 5px #ebebeb;"/>
381
                             The left column contains the menu and global settings.
388
                             The left column contains the menu and global settings.
382
                             In the middle menu, you can select and edit individual cards.
389
                             In the middle menu, you can select and edit individual cards.
464
         </div>
471
         </div>
465
     </div>
472
     </div>
466
 </body>
473
 </body>
467
-</html>
474
+</html>

+ 48
- 8
generator/js/cards.js 查看文件

7
         background_color: "white",
7
         background_color: "white",
8
         default_color: "black",
8
         default_color: "black",
9
         default_icon: "ace",
9
         default_icon: "ace",
10
-        default_title_size: "13",
10
+        default_title_size: "16",
11
         page_size: "A4",
11
         page_size: "A4",
12
-        page_rows: 3,
13
-        page_columns: 3,
12
+        page_rows: 2,
13
+        page_columns: 2,
14
         card_arrangement: "doublesided",
14
         card_arrangement: "doublesided",
15
-        card_size: "25x35",
15
+        card_size: "36x54",
16
         card_count: null,
16
         card_count: null,
17
         icon_inline: true,
17
         icon_inline: true,
18
         rounded_corners: true
18
         rounded_corners: true
32
     card.title = card.title || "";
32
     card.title = card.title || "";
33
     card.contents = card.contents || [];
33
     card.contents = card.contents || [];
34
     card.tags = card.tags || [];
34
     card.tags = card.tags || [];
35
+    card.stats = card.stats || "";
35
 }
36
 }
36
 
37
 
37
 function card_has_tag(card, tag) {
38
 function card_has_tag(card, tag) {
96
         classname = "inlineicon";
97
         classname = "inlineicon";
97
     }
98
     }
98
 
99
 
100
+    var stats = card_data.stats?card_data_split_params(card_data.stats):[];
99
     var result = "";
101
     var result = "";
100
     result += '<div class="card-title-' + classname + '-container">';
102
     result += '<div class="card-title-' + classname + '-container">';
101
-    result += '    <div class="card-title-' + classname + ' icon-' + icon + '">';
102
-    result += '    </div>';
103
+    result += '<img class="inline-logo" src="img/footprint.png">' + (stats[0]||"?");
104
+    result += '<img class="inline-logo" src="img/hearts.png">' + (stats[1]||"?");
105
+    result += '<img class="inline-logo" src="img/shield.png">' + (stats[2]||"?");
103
     result += '</div>';
106
     result += '</div>';
104
     return result;
107
     return result;
105
 }
108
 }
106
 
109
 
110
+var cr2xp = {
111
+	"1/8": "25",
112
+	"1/4": "50",
113
+	"1/2": "100",
114
+	"1": "200",
115
+	"2": "450",
116
+	"3": "700",
117
+	"4": "1,100",
118
+	"5": "1,800",
119
+	"6": "2,300",
120
+	"7": "2,900",
121
+	"8": "3,900",
122
+	"9": "5,000",
123
+	"10": "5,900",
124
+	"11": "7,200",
125
+	"12": "8,400",
126
+	"13": "10,000",
127
+	"14": "11,500",
128
+	"15": "13,000",
129
+	"16": "15,000",
130
+	"17": "18,000",
131
+	"18": "20,000",
132
+	"19": "22,000",
133
+	"20": "25,000",
134
+	"21": "33,000",
135
+	"22": "41,000",
136
+	"23": "50,000",
137
+	"24": "62,000",
138
+	"25": "75,000",
139
+	"26": "90,000",
140
+	"27": "105,000",
141
+	"28": "120,000",
142
+	"29": "135,000",
143
+	"30": "155,000"
144
+}
145
+
107
 function card_element_subtitle(params, card_data, options) {
146
 function card_element_subtitle(params, card_data, options) {
108
     var subtitle = params[0] || "";
147
     var subtitle = params[0] || "";
109
-    return '<div class="card-element card-subtitle">' + subtitle + '</div>';
148
+    var cr = params[1] || "";
149
+    return '<div class="card-element card-subtitle">' + subtitle + (cr!=""?'<div class="card-element card-challenge">CR '+cr+' ('+cr2xp[cr]+' XP)</div>':'') + '</div>';
110
 }
150
 }
111
 
151
 
112
 function card_element_inline_icon(params, card_data, options) {
152
 function card_element_inline_icon(params, card_data, options) {
347
 	{
387
 	{
348
 		background_style = 'style = "background-image: url(&quot;' + url + '&quot;); background-size: contain; background-position: center; background-repeat: no-repeat;"';
388
 		background_style = 'style = "background-image: url(&quot;' + url + '&quot;); background-size: contain; background-position: center; background-repeat: no-repeat;"';
349
 	}
389
 	}
350
-	else 
390
+	else
351
 	{
391
 	{
352
 		background_style = card_generate_color_gradient_style(color, options);
392
 		background_style = card_generate_color_gradient_style(color, options);
353
     }
393
     }

+ 4
- 2
generator/js/ui.js 查看文件

183
 		$("#card-background").val(card.background_image);
183
 		$("#card-background").val(card.background_image);
184
         $("#card-contents").val(card.contents.join("\n"));
184
         $("#card-contents").val(card.contents.join("\n"));
185
         $("#card-tags").val(card.tags.join(", "));
185
         $("#card-tags").val(card.tags.join(", "));
186
+        $("#card-stats").val(card.stats);
186
         $("#card-color").val(card.color).change();
187
         $("#card-color").val(card.color).change();
187
     } else {
188
     } else {
188
         $("#card-title").val("");
189
         $("#card-title").val("");
192
         $("#card-icon-back").val("");
193
         $("#card-icon-back").val("");
193
 		$("#card-background").val("");
194
 		$("#card-background").val("");
194
         $("#card-contents").val("");
195
         $("#card-contents").val("");
195
-        $("#card-tags").val("");
196
+        $("#card-stats").val("");
196
         $("#card-color").val("").change();
197
         $("#card-color").val("").change();
197
     }
198
     }
198
 
199
 
227
             .attr("data-color", val)
228
             .attr("data-color", val)
228
             .text(name));
229
             .text(name));
229
     });
230
     });
230
-    
231
+
231
     // Callbacks for when the user picks a color
232
     // Callbacks for when the user picks a color
232
     $('#default_color_selector').colorselector({
233
     $('#default_color_selector').colorselector({
233
         callback: function (value, color, title) {
234
         callback: function (value, color, title) {
522
 	$("#card-color").change(ui_change_card_color);
523
 	$("#card-color").change(ui_change_card_color);
523
     $("#card-contents").change(ui_change_card_contents);
524
     $("#card-contents").change(ui_change_card_contents);
524
     $("#card-tags").change(ui_change_card_tags);
525
     $("#card-tags").change(ui_change_card_tags);
526
+    $("#card-stats").change(ui_change_card_property);
525
 
527
 
526
     $("#card-contents").keyup(ui_change_card_contents_keyup);
528
     $("#card-contents").keyup(ui_change_card_contents_keyup);
527
 
529
 

Loading…
取消
儲存