Bladeren bron

Generator-next

crobi 10 jaren geleden
bovenliggende
commit
d795f9b5a8

+ 1
- 0
.gitignore Bestand weergeven

@@ -0,0 +1 @@
1
+/node_modules

+ 164
- 0
generator-next/components-test.html Bestand weergeven

@@ -0,0 +1,164 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+    <title>RPG cards</title>
5
+    <!-- Components -->
6
+    <link rel="import" href="components/card.html">
7
+    <style type="text/css">
8
+
9
+        rpg-card {
10
+            margin: 4px;
11
+        }
12
+
13
+        body {
14
+            display: flex;
15
+            flex-direction: column;
16
+            justify-content: center;
17
+            align-content: center;
18
+            background: rgb(204,204,204);
19
+        }
20
+
21
+        card-page {
22
+            width: 210mm;
23
+            height: 296mm;
24
+        }
25
+
26
+        @media print {
27
+            html, body {
28
+                width: 210mm;
29
+            }
30
+            body {
31
+                margin: 0;
32
+                padding: 0;
33
+                border: 0;
34
+            }
35
+        }
36
+
37
+        @page {
38
+            size: A4;
39
+            margin: 0;
40
+        }
41
+    </style>
42
+
43
+</head>
44
+<body>
45
+    <card-page>
46
+        <rpg-card class="card-size-25x35" color="maroon">
47
+            <card-title>
48
+                <h1>Burning Hands</h1>
49
+                <h2>1</h2>
50
+                <card-icon src="/icons/book-cover.svg"></card-icon>
51
+            </card-title>
52
+            <card-contents>
53
+                <card-subtitle>1st level evocation</card-subtitle>
54
+                <card-rule></card-rule>
55
+                <card-property>
56
+                    <h4>Casting time</h4>
57
+                    <p>1 action</p></card-property>
58
+                <card-property>
59
+                    <h4>Range</h4>
60
+                    <p>Self (15ft cone)</p></card-property>
61
+                <card-property>
62
+                    <h4>Components</h4>
63
+                    <p>V,S,Some obscure long named material</p></card-property>
64
+                <card-rule></card-rule>
65
+                <card-fill size="1"></card-fill>
66
+                <card-description>
67
+                    <h4>Mechanics</h4>
68
+                    <p>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.</p></card-description>
69
+                <card-description>
70
+                    <h4>Ignite</h4>
71
+                    <p>The fire ignites any flammable objects in the area that aren't being worn or carried.</p></card-description>
72
+                <card-fill size="2"></card-fill>
73
+                <card-section>At higher levels</card-section>
74
+                <card-description><p>+1d6 damage for each slot above 1st</p></card-description>
75
+            </card-contents>
76
+        </rpg-card>
77
+        <rpg-card class="card-size-25x35" color="maroon">
78
+            <card-title>
79
+                <h1>Burning Hands</h1>
80
+            </card-title>
81
+            <card-contents>
82
+                <card-subtitle>1st level evocation</card-subtitle>
83
+                <card-rule></card-rule>
84
+                <card-fill size="1"></card-fill>
85
+                <card-description>
86
+                    <h4>Mechanics</h4>
87
+                    <p>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.</p>
88
+                </card-description>
89
+                <card-description>
90
+                    <h4>Ignite</h4>
91
+                    <p>The fire ignites any flammable objects in the area that aren't being worn or carried.</p>
92
+                </card-description>
93
+                <card-fill size="2"></card-fill>
94
+                <card-section>At higher levels</card-section>
95
+                <card-description><p>+1d6 damage for each slot above 1st</p></card-description>
96
+            </card-contents>
97
+            <card-title>
98
+                <card-icon src="/icons/gears.svg" style="float: left"></card-icon>
99
+                <h1 style="text-align: center;">Evocation 1</h1>
100
+                <card-icon src="/icons/stopwatch.svg"></card-icon>
101
+            </card-title>
102
+        </rpg-card>
103
+        <rpg-card class="card-size-25x35" color="saddlebrown">
104
+            <card-title>
105
+                <h1>Brown bear</h1>
106
+                <h2>2</h2>
107
+                <card-icon src="/icons/pawprint.svg"></card-icon>
108
+            </card-title>
109
+            <card-contents>
110
+                <card-subtitle>Medium beast</card-subtitle>
111
+                <card-rule></card-rule>
112
+                <card-dndstats mode="both" str="13" dex="10" con="15" int="-" wis="-" cha="-"></card-dndstats>
113
+                <card-rule></card-rule>
114
+                <card-property><h4>Armor class</h4><p>12 (natural armor)</p></card-property>
115
+                <card-property><h4>Hit points</h4><p>7 (2d6)</p></card-property>
116
+                <card-rule></card-rule>
117
+                <card-description>
118
+                    <h4>Multiattack</h4>
119
+                    <p>One bite and one claw.</p></card-description>
120
+                <card-fill size="2"></card-fill>
121
+                <card-section>Actions</card-section>
122
+                <card-description>
123
+                    <h4>Bite</h4>
124
+                    <p>+4 to hit, 2d6+2 piercing damage.</p></card-description>
125
+                <card-description>
126
+                    <h4>Claw</h4>
127
+                    <p>+4 to hit, 1d8+2 piercing damage.</p></card-description>
128
+            </card-contents>
129
+            <card-title>
130
+                <h1>Druid thingy</h1>
131
+                <card-icon src="/icons/stag-head.svg"></card-icon>
132
+            </card-title>
133
+        </rpg-card>
134
+        <rpg-card class="card-size-25x35" color="indigo">
135
+            <card-title size="12">
136
+                <h1>Wand of Magic Missile</h1>
137
+                <card-icon src="/icons/crossed-swords.svg"></card-icon>
138
+            </card-title>
139
+            <card-contents>
140
+                <card-subtitle>Wondrous item</card-subtitle>
141
+                <card-rule></card-rule>
142
+                <card-property><h4>Maximum charges</h4><p>7</p></card-property>
143
+                <card-property><h4>Recharge</h4><p>1d6+1</p></card-property>
144
+                <card-rule></card-rule>
145
+                <card-fill size="2"></card-fill>
146
+                <card-description><h4>Spells</h4><p>You can use your action to cast the following spells:</p></card-description>
147
+                <card-bullet>Magic missile</card-bullet>
148
+                <card-bullet>Magic missile</card-bullet>
149
+                <card-bullet>Magic missile</card-bullet>
150
+                <card-fill size="3"></card-fill>
151
+                <card-boxes size="2.5" count="7"></card-boxes>
152
+                <card-boxes size="2.5" count="7"></card-boxes>
153
+            </card-contents>
154
+        </rpg-card>
155
+        <rpg-card class="card-size-25x35" color="forestgreen">
156
+            <card-back>
157
+                <card-icon src="/icons/robe.svg"></card-icon>
158
+            </card-back>
159
+        </rpg-card>
160
+    </card-page>
161
+    <card-page>
162
+    </card-page>
163
+</body>
164
+</html>

+ 1
- 1
generator-next/js/card.js Bestand weergeven

@@ -228,7 +228,7 @@ var RpgCards;
228 228
         }
229 229
         CardHtmlGenerator.prototype._icon = function (src, ind, ind0) {
230 230
             if (src.length > 0) {
231
-                return ind + '<card-icon src="/icons/' + src + '.svg"></card-icon>\n';
231
+                return ind + '<card-icon src="./icons/' + src + '.svg"></card-icon>\n';
232 232
             }
233 233
             else {
234 234
                 return "";

+ 1
- 1
generator-next/js/card.js.map
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1
- 1
generator-next/js/card.ts Bestand weergeven

@@ -282,7 +282,7 @@ module RpgCards {
282 282
 
283 283
         private _icon(src: string, ind: string, ind0: string): string {
284 284
             if (src.length > 0) {
285
-                return ind + '<card-icon src="/icons/' + src + '.svg"></card-icon>\n';
285
+                return ind + '<card-icon src="./icons/' + src + '.svg"></card-icon>\n';
286 286
             } else {
287 287
                 return "";
288 288
             }

+ 1
- 1
generator-next/js/ui.js Bestand weergeven

@@ -228,7 +228,7 @@ var RpgCards;
228 228
         }
229 229
         CardHtmlGenerator.prototype._icon = function (src, ind, ind0) {
230 230
             if (src.length > 0) {
231
-                return ind + '<card-icon src="/icons/' + src + '.svg"></card-icon>\n';
231
+                return ind + '<card-icon src="./icons/' + src + '.svg"></card-icon>\n';
232 232
             }
233 233
             else {
234 234
                 return "";

+ 1
- 1
generator-next/js/ui.js.map
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


Laden…
Annuleren
Opslaan