create-template-html-css 1.8.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +179 -2
  3. package/bin/cli.js +20 -2
  4. package/package.json +1 -1
  5. package/templates/blackjack/index.html +97 -0
  6. package/templates/blackjack/script.js +381 -0
  7. package/templates/blackjack/style.css +452 -0
  8. package/templates/breakout/index.html +56 -0
  9. package/templates/breakout/script.js +387 -0
  10. package/templates/breakout/style.css +239 -0
  11. package/templates/connect-four/index.html +78 -0
  12. package/templates/connect-four/script.js +413 -0
  13. package/templates/connect-four/style.css +426 -0
  14. package/templates/dice-game/index.html +99 -0
  15. package/templates/dice-game/script.js +291 -0
  16. package/templates/dice-game/style.css +403 -0
  17. package/templates/flappy-bird/index.html +47 -0
  18. package/templates/flappy-bird/script.js +394 -0
  19. package/templates/flappy-bird/style.css +243 -0
  20. package/templates/game-2048/index.html +59 -0
  21. package/templates/game-2048/script.js +269 -0
  22. package/templates/game-2048/style.css +281 -0
  23. package/templates/guess-number/index.html +71 -0
  24. package/templates/guess-number/script.js +216 -0
  25. package/templates/guess-number/style.css +337 -0
  26. package/templates/memory-game/index.html +50 -0
  27. package/templates/memory-game/script.js +216 -0
  28. package/templates/memory-game/style.css +288 -0
  29. package/templates/pong/index.html +90 -0
  30. package/templates/pong/script.js +364 -0
  31. package/templates/pong/style.css +371 -0
  32. package/templates/rock-paper-scissors/index.html +84 -0
  33. package/templates/rock-paper-scissors/script.js +199 -0
  34. package/templates/rock-paper-scissors/style.css +295 -0
  35. package/templates/simon-says/index.html +64 -0
  36. package/templates/simon-says/script.js +206 -0
  37. package/templates/simon-says/style.css +250 -0
  38. package/templates/slot-machine/index.html +112 -0
  39. package/templates/slot-machine/script.js +238 -0
  40. package/templates/slot-machine/style.css +464 -0
  41. package/templates/snake-game/index.html +61 -0
  42. package/templates/snake-game/script.js +360 -0
  43. package/templates/snake-game/style.css +246 -0
  44. package/templates/tetris/index.html +84 -0
  45. package/templates/tetris/script.js +447 -0
  46. package/templates/tetris/style.css +286 -0
  47. package/templates/tic-tac-toe/index.html +57 -0
  48. package/templates/tic-tac-toe/script.js +156 -0
  49. package/templates/tic-tac-toe/style.css +244 -0
  50. package/templates/whack-a-mole/index.html +85 -0
  51. package/templates/whack-a-mole/script.js +172 -0
  52. package/templates/whack-a-mole/style.css +263 -0
  53. package/COMPONENTS-GALLERY.html +0 -773
  54. package/PUBLISH-GUIDE.md +0 -112
  55. package/create-template-html-css-1.8.0.tgz +0 -0
@@ -0,0 +1,426 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
9
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
10
+ min-height: 100vh;
11
+ display: flex;
12
+ justify-content: center;
13
+ align-items: center;
14
+ padding: 20px;
15
+ }
16
+
17
+ .container {
18
+ background: white;
19
+ border-radius: 20px;
20
+ padding: 30px;
21
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
22
+ max-width: 700px;
23
+ width: 100%;
24
+ }
25
+
26
+ .header {
27
+ text-align: center;
28
+ margin-bottom: 25px;
29
+ }
30
+
31
+ .header h1 {
32
+ color: #2d3748;
33
+ font-size: 2.5rem;
34
+ margin-bottom: 5px;
35
+ }
36
+
37
+ .subtitle {
38
+ color: #718096;
39
+ font-size: 1.1rem;
40
+ }
41
+
42
+ .game-status {
43
+ display: flex;
44
+ justify-content: space-between;
45
+ align-items: center;
46
+ gap: 20px;
47
+ margin-bottom: 25px;
48
+ flex-wrap: wrap;
49
+ }
50
+
51
+ .player-info {
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ gap: 8px;
56
+ padding: 15px;
57
+ border-radius: 12px;
58
+ min-width: 140px;
59
+ }
60
+
61
+ .player-info.player1 {
62
+ background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
63
+ }
64
+
65
+ .player-info.player2 {
66
+ background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
67
+ }
68
+
69
+ .player-indicator {
70
+ width: 40px;
71
+ height: 40px;
72
+ border-radius: 50%;
73
+ border: 3px solid white;
74
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
75
+ }
76
+
77
+ .player1 .player-indicator {
78
+ background: #FF1744;
79
+ }
80
+
81
+ .player2 .player-indicator {
82
+ background: #FFD600;
83
+ }
84
+
85
+ .player-info span {
86
+ color: white;
87
+ font-weight: 600;
88
+ font-size: 0.9rem;
89
+ }
90
+
91
+ .score {
92
+ color: white;
93
+ font-size: 1.8rem;
94
+ font-weight: bold;
95
+ }
96
+
97
+ .current-turn {
98
+ flex: 1;
99
+ text-align: center;
100
+ padding: 15px 25px;
101
+ background: #f7fafc;
102
+ border-radius: 12px;
103
+ border: 3px solid #e2e8f0;
104
+ min-width: 200px;
105
+ }
106
+
107
+ #turnIndicator {
108
+ font-size: 1.2rem;
109
+ font-weight: bold;
110
+ color: #2d3748;
111
+ }
112
+
113
+ .player1-turn {
114
+ color: #FF1744 !important;
115
+ }
116
+
117
+ .player2-turn {
118
+ color: #FFD600 !important;
119
+ }
120
+
121
+ .message {
122
+ animation: pulse 1s ease-in-out;
123
+ }
124
+
125
+ .message.player1 {
126
+ color: #FF1744 !important;
127
+ }
128
+
129
+ .message.player2 {
130
+ color: #FFD600 !important;
131
+ }
132
+
133
+ .message.draw {
134
+ color: #667eea !important;
135
+ }
136
+
137
+ .game-board-container {
138
+ margin-bottom: 25px;
139
+ display: flex;
140
+ justify-content: center;
141
+ }
142
+
143
+ .game-board {
144
+ display: flex;
145
+ gap: 8px;
146
+ padding: 20px;
147
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
148
+ border-radius: 15px;
149
+ box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
150
+ }
151
+
152
+ .column {
153
+ display: flex;
154
+ flex-direction: column;
155
+ gap: 8px;
156
+ cursor: pointer;
157
+ transition: transform 0.2s ease;
158
+ }
159
+
160
+ .column.hover {
161
+ transform: translateY(-5px);
162
+ }
163
+
164
+ .cell {
165
+ width: 60px;
166
+ height: 60px;
167
+ background: rgba(255, 255, 255, 0.9);
168
+ border-radius: 50%;
169
+ padding: 4px;
170
+ box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
171
+ }
172
+
173
+ .disc {
174
+ width: 100%;
175
+ height: 100%;
176
+ border-radius: 50%;
177
+ background: transparent;
178
+ transition: all 0.3s ease;
179
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
180
+ }
181
+
182
+ .disc.player1 {
183
+ background: radial-gradient(circle at 30% 30%, #FF4569, #FF1744);
184
+ }
185
+
186
+ .disc.player2 {
187
+ background: radial-gradient(circle at 30% 30%, #FFEB3B, #FFD600);
188
+ }
189
+
190
+ .disc.dropping {
191
+ animation: drop 0.5s cubic-bezier(0.5, 0, 0.5, 1);
192
+ }
193
+
194
+ .disc.winning {
195
+ animation: winning 0.6s ease-in-out infinite;
196
+ }
197
+
198
+ @keyframes drop {
199
+ from {
200
+ transform: translateY(calc(-1 * var(--drop-distance)));
201
+ }
202
+ to {
203
+ transform: translateY(0);
204
+ }
205
+ }
206
+
207
+ @keyframes winning {
208
+ 0%, 100% {
209
+ transform: scale(1);
210
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
211
+ }
212
+ 50% {
213
+ transform: scale(1.15);
214
+ box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
215
+ }
216
+ }
217
+
218
+ @keyframes pulse {
219
+ 0%, 100% {
220
+ transform: scale(1);
221
+ }
222
+ 50% {
223
+ transform: scale(1.1);
224
+ }
225
+ }
226
+
227
+ .controls {
228
+ display: flex;
229
+ flex-direction: column;
230
+ gap: 15px;
231
+ margin-bottom: 20px;
232
+ }
233
+
234
+ .mode-selector {
235
+ display: flex;
236
+ justify-content: center;
237
+ gap: 20px;
238
+ flex-wrap: wrap;
239
+ }
240
+
241
+ .mode-selector label {
242
+ display: flex;
243
+ align-items: center;
244
+ gap: 8px;
245
+ padding: 10px 20px;
246
+ background: #f7fafc;
247
+ border: 2px solid #e2e8f0;
248
+ border-radius: 8px;
249
+ cursor: pointer;
250
+ transition: all 0.3s ease;
251
+ }
252
+
253
+ .mode-selector label:hover {
254
+ background: #edf2f7;
255
+ border-color: #667eea;
256
+ }
257
+
258
+ .mode-selector input[type="radio"] {
259
+ cursor: pointer;
260
+ }
261
+
262
+ .mode-selector input[type="radio"]:checked + span {
263
+ color: #667eea;
264
+ font-weight: bold;
265
+ }
266
+
267
+ .difficulty-selector {
268
+ display: flex;
269
+ justify-content: center;
270
+ align-items: center;
271
+ gap: 10px;
272
+ }
273
+
274
+ .difficulty-selector label {
275
+ font-weight: 600;
276
+ color: #2d3748;
277
+ }
278
+
279
+ .difficulty-selector select {
280
+ padding: 8px 15px;
281
+ border: 2px solid #e2e8f0;
282
+ border-radius: 8px;
283
+ background: white;
284
+ font-size: 1rem;
285
+ cursor: pointer;
286
+ transition: border-color 0.3s ease;
287
+ }
288
+
289
+ .difficulty-selector select:focus {
290
+ outline: none;
291
+ border-color: #667eea;
292
+ }
293
+
294
+ .game-controls {
295
+ display: flex;
296
+ gap: 15px;
297
+ justify-content: center;
298
+ margin-bottom: 25px;
299
+ flex-wrap: wrap;
300
+ }
301
+
302
+ .btn {
303
+ padding: 12px 30px;
304
+ font-size: 1rem;
305
+ font-weight: 600;
306
+ border: none;
307
+ border-radius: 8px;
308
+ cursor: pointer;
309
+ transition: all 0.3s ease;
310
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
311
+ min-width: 140px;
312
+ }
313
+
314
+ .btn:hover {
315
+ transform: translateY(-2px);
316
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
317
+ }
318
+
319
+ .btn:active {
320
+ transform: translateY(0);
321
+ }
322
+
323
+ .btn-primary {
324
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
325
+ color: white;
326
+ }
327
+
328
+ .btn-secondary {
329
+ background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
330
+ color: white;
331
+ }
332
+
333
+ .instructions {
334
+ background: #f7fafc;
335
+ padding: 20px;
336
+ border-radius: 10px;
337
+ border: 2px solid #e2e8f0;
338
+ }
339
+
340
+ .instructions h3 {
341
+ color: #2d3748;
342
+ margin-bottom: 12px;
343
+ font-size: 1.1rem;
344
+ }
345
+
346
+ .instructions ul {
347
+ list-style: none;
348
+ padding-right: 0;
349
+ }
350
+
351
+ .instructions li {
352
+ color: #4a5568;
353
+ margin-bottom: 8px;
354
+ padding-right: 20px;
355
+ position: relative;
356
+ line-height: 1.6;
357
+ }
358
+
359
+ .instructions li:before {
360
+ content: "•";
361
+ color: #667eea;
362
+ font-weight: bold;
363
+ position: absolute;
364
+ right: 0;
365
+ font-size: 1.2rem;
366
+ }
367
+
368
+ /* Responsive */
369
+ @media (max-width: 768px) {
370
+ .container {
371
+ padding: 20px;
372
+ }
373
+
374
+ .header h1 {
375
+ font-size: 2rem;
376
+ }
377
+
378
+ .game-status {
379
+ flex-direction: column;
380
+ }
381
+
382
+ .player-info {
383
+ min-width: unset;
384
+ width: 100%;
385
+ }
386
+
387
+ .cell {
388
+ width: 45px;
389
+ height: 45px;
390
+ }
391
+
392
+ .game-board {
393
+ gap: 6px;
394
+ padding: 15px;
395
+ }
396
+
397
+ .btn {
398
+ padding: 10px 20px;
399
+ min-width: 120px;
400
+ font-size: 0.9rem;
401
+ }
402
+ }
403
+
404
+ @media (max-width: 480px) {
405
+ .header h1 {
406
+ font-size: 1.5rem;
407
+ }
408
+
409
+ .cell {
410
+ width: 38px;
411
+ height: 38px;
412
+ }
413
+
414
+ .game-board {
415
+ gap: 4px;
416
+ padding: 12px;
417
+ }
418
+
419
+ .score {
420
+ font-size: 1.5rem;
421
+ }
422
+
423
+ #turnIndicator {
424
+ font-size: 1rem;
425
+ }
426
+ }
@@ -0,0 +1,99 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Dice Game</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ </head>
9
+ <body>
10
+ <div class="container">
11
+ <div class="header">
12
+ <h1>🎲 Dice Game</h1>
13
+ <p class="subtitle">Be the first to reach 100 points!</p>
14
+ </div>
15
+
16
+ <div class="game-mode">
17
+ <button class="mode-btn active" data-mode="pvp">👥 Player vs Player</button>
18
+ <button class="mode-btn" data-mode="pvc">🤖 vs Computer</button>
19
+ </div>
20
+
21
+ <div class="players-section">
22
+ <!-- Player 1 -->
23
+ <div class="player-card player1-card active" id="player1Card">
24
+ <div class="player-header">
25
+ <h3>👤 Player 1</h3>
26
+ <div class="current-turn">Your turn!</div>
27
+ </div>
28
+ <div class="player-stats">
29
+ <div class="stat">
30
+ <span class="stat-label">Total Score:</span>
31
+ <span id="player1Total" class="stat-value">0</span>
32
+ </div>
33
+ <div class="stat">
34
+ <span class="stat-label">Current Turn:</span>
35
+ <span id="player1Current" class="stat-value">0</span>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
40
+ <!-- Player 2 -->
41
+ <div class="player-card player2-card" id="player2Card">
42
+ <div class="player-header">
43
+ <h3>👤 Player 2</h3>
44
+ <div class="current-turn">Waiting...</div>
45
+ </div>
46
+ <div class="player-stats">
47
+ <div class="stat">
48
+ <span class="stat-label">Total Score:</span>
49
+ <span id="player2Total" class="stat-value">0</span>
50
+ </div>
51
+ <div class="stat">
52
+ <span class="stat-label">Current Turn:</span>
53
+ <span id="player2Current" class="stat-value">0</span>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="dice-container">
60
+ <div class="dice" id="dice">
61
+ <div class="dice-face">
62
+ <span class="dot"></span>
63
+ </div>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="controls">
68
+ <button id="rollBtn" class="btn btn-roll">
69
+ <span class="btn-icon">🎲</span>
70
+ Roll Dice
71
+ </button>
72
+ <button id="holdBtn" class="btn btn-hold">
73
+ <span class="btn-icon">✋</span>
74
+ Hold
75
+ </button>
76
+ <button id="newGameBtn" class="btn btn-new">
77
+ <span class="btn-icon">🔄</span>
78
+ New Game
79
+ </button>
80
+ </div>
81
+
82
+ <div id="resultMessage" class="result-message"></div>
83
+
84
+ <div class="instructions">
85
+ <h3>📖 Game Rules:</h3>
86
+ <ul>
87
+ <li>Each player takes turns rolling the dice as many times as they want</li>
88
+ <li>Score accumulates in the current turn</li>
89
+ <li>If the dice shows 1 - you lose all turn score!</li>
90
+ <li>Click "Hold" to add the score to your total</li>
91
+ <li>First player to reach 100 wins!</li>
92
+ <li>Strategy: When to take risks and when to hold?</li>
93
+ </ul>
94
+ </div>
95
+ </div>
96
+
97
+ <script src="script.js"></script>
98
+ </body>
99
+ </html>