create-template-html-css 1.9.0 → 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.
- package/CHANGELOG.md +80 -0
- package/README.md +179 -2
- package/bin/cli.js +15 -3
- package/package.json +1 -1
- package/templates/blackjack/index.html +97 -0
- package/templates/blackjack/script.js +381 -0
- package/templates/blackjack/style.css +452 -0
- package/templates/breakout/index.html +56 -0
- package/templates/breakout/script.js +387 -0
- package/templates/breakout/style.css +239 -0
- package/templates/connect-four/index.html +78 -0
- package/templates/connect-four/script.js +413 -0
- package/templates/connect-four/style.css +426 -0
- package/templates/dice-game/index.html +99 -0
- package/templates/dice-game/script.js +291 -0
- package/templates/dice-game/style.css +403 -0
- package/templates/flappy-bird/index.html +47 -0
- package/templates/flappy-bird/script.js +394 -0
- package/templates/flappy-bird/style.css +243 -0
- package/templates/game-2048/index.html +59 -0
- package/templates/game-2048/script.js +269 -0
- package/templates/game-2048/style.css +281 -0
- package/templates/pong/index.html +90 -0
- package/templates/pong/script.js +364 -0
- package/templates/pong/style.css +371 -0
- package/templates/rock-paper-scissors/index.html +84 -0
- package/templates/rock-paper-scissors/script.js +199 -0
- package/templates/rock-paper-scissors/style.css +295 -0
- package/templates/simon-says/index.html +64 -0
- package/templates/simon-says/script.js +206 -0
- package/templates/simon-says/style.css +250 -0
- package/templates/slot-machine/index.html +112 -0
- package/templates/slot-machine/script.js +238 -0
- package/templates/slot-machine/style.css +464 -0
- package/templates/tetris/index.html +84 -0
- package/templates/tetris/script.js +447 -0
- package/templates/tetris/style.css +286 -0
- package/templates/whack-a-mole/index.html +85 -0
- package/templates/whack-a-mole/script.js +172 -0
- package/{demo-games/snake-game → templates/whack-a-mole}/style.css +114 -97
- package/COMPONENTS-GALLERY.html +0 -773
- package/PUBLISH-GUIDE.md +0 -112
- package/create-template-html-css-1.8.0.tgz +0 -0
- package/demo-games/guess-number/index.html +0 -71
- package/demo-games/guess-number/script.js +0 -216
- package/demo-games/guess-number/style.css +0 -337
- package/demo-games/memory-game/index.html +0 -50
- package/demo-games/memory-game/script.js +0 -216
- package/demo-games/memory-game/style.css +0 -288
- package/demo-games/snake-game/index.html +0 -61
- package/demo-games/snake-game/script.js +0 -360
- package/demo-games/tic-tac-toe/index.html +0 -57
- package/demo-games/tic-tac-toe/script.js +0 -156
- package/demo-games/tic-tac-toe/style.css +0 -244
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
body {
|
|
8
8
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
9
|
-
background: linear-gradient(135deg, #
|
|
9
|
+
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
|
|
10
10
|
min-height: 100vh;
|
|
11
11
|
display: flex;
|
|
12
12
|
justify-content: center;
|
|
@@ -16,7 +16,7 @@ body {
|
|
|
16
16
|
|
|
17
17
|
.container {
|
|
18
18
|
width: 100%;
|
|
19
|
-
max-width:
|
|
19
|
+
max-width: 600px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.game-card {
|
|
@@ -33,113 +33,146 @@ body {
|
|
|
33
33
|
font-size: 2.5rem;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.game-
|
|
36
|
+
.game-stats {
|
|
37
37
|
display: flex;
|
|
38
|
-
justify-content: space-
|
|
38
|
+
justify-content: space-around;
|
|
39
39
|
padding: 15px;
|
|
40
40
|
background: #f3f4f6;
|
|
41
41
|
border-radius: 12px;
|
|
42
42
|
margin-bottom: 20px;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
align-items: center;
|
|
45
|
+
.stat {
|
|
46
|
+
text-align: center;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
.label {
|
|
49
|
+
.stat-label {
|
|
52
50
|
font-size: 0.9rem;
|
|
53
51
|
color: #6b7280;
|
|
54
52
|
margin-bottom: 5px;
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
.value {
|
|
58
|
-
font-size: 1.
|
|
55
|
+
.stat-value {
|
|
56
|
+
font-size: 1.5rem;
|
|
59
57
|
font-weight: bold;
|
|
60
58
|
color: #333;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
margin:
|
|
61
|
+
.difficulty-selector {
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: 10px;
|
|
66
|
+
margin-bottom: 20px;
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
color: #555;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#difficulty {
|
|
72
|
+
padding: 8px 15px;
|
|
73
|
+
border: 2px solid #e5e7eb;
|
|
69
74
|
border-radius: 8px;
|
|
70
|
-
|
|
75
|
+
font-size: 1rem;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
background: white;
|
|
71
78
|
}
|
|
72
79
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
#difficulty:disabled {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.game-board {
|
|
86
|
+
display: grid;
|
|
87
|
+
grid-template-columns: repeat(3, 1fr);
|
|
88
|
+
gap: 15px;
|
|
89
|
+
margin: 20px 0;
|
|
90
|
+
padding: 20px;
|
|
91
|
+
background: #f9fafb;
|
|
92
|
+
border-radius: 12px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hole {
|
|
96
|
+
aspect-ratio: 1;
|
|
97
|
+
background: linear-gradient(to bottom, #8b4513 0%, #654321 100%);
|
|
98
|
+
border-radius: 50% 50% 0 0;
|
|
99
|
+
position: relative;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mole {
|
|
106
|
+
position: absolute;
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 100%;
|
|
109
|
+
bottom: -100%;
|
|
78
110
|
display: flex;
|
|
79
111
|
justify-content: center;
|
|
80
112
|
align-items: center;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
transition: opacity 0.3s ease;
|
|
113
|
+
font-size: 3rem;
|
|
114
|
+
transition: bottom 0.3s ease;
|
|
115
|
+
user-select: none;
|
|
85
116
|
}
|
|
86
117
|
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
animation: pulse 1.5s ease-in-out infinite;
|
|
118
|
+
.mole.up {
|
|
119
|
+
bottom: 0;
|
|
90
120
|
}
|
|
91
121
|
|
|
92
|
-
.
|
|
93
|
-
|
|
94
|
-
font-size: 1.2rem;
|
|
122
|
+
.mole.whacked {
|
|
123
|
+
animation: whack 0.3s ease;
|
|
95
124
|
}
|
|
96
125
|
|
|
97
|
-
@keyframes
|
|
98
|
-
0
|
|
99
|
-
|
|
126
|
+
@keyframes whack {
|
|
127
|
+
0% {
|
|
128
|
+
transform: scale(1) rotate(0deg);
|
|
100
129
|
}
|
|
101
130
|
50% {
|
|
102
|
-
|
|
131
|
+
transform: scale(1.2) rotate(10deg);
|
|
132
|
+
}
|
|
133
|
+
100% {
|
|
134
|
+
transform: scale(0.8) rotate(-10deg);
|
|
135
|
+
bottom: -100%;
|
|
103
136
|
}
|
|
104
137
|
}
|
|
105
138
|
|
|
106
|
-
|
|
107
|
-
|
|
139
|
+
@keyframes shake {
|
|
140
|
+
0%, 100% {
|
|
141
|
+
transform: translateX(0);
|
|
142
|
+
}
|
|
143
|
+
25% {
|
|
144
|
+
transform: translateX(-5px);
|
|
145
|
+
}
|
|
146
|
+
75% {
|
|
147
|
+
transform: translateX(5px);
|
|
148
|
+
}
|
|
108
149
|
}
|
|
109
150
|
|
|
110
|
-
.
|
|
151
|
+
.message {
|
|
152
|
+
text-align: center;
|
|
153
|
+
font-size: 1.2rem;
|
|
154
|
+
font-weight: bold;
|
|
155
|
+
height: 35px;
|
|
111
156
|
display: flex;
|
|
112
|
-
|
|
157
|
+
justify-content: center;
|
|
113
158
|
align-items: center;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
.arrow-row {
|
|
118
|
-
display: flex;
|
|
119
|
-
gap: 5px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.arrow-btn {
|
|
123
|
-
width: 60px;
|
|
124
|
-
height: 60px;
|
|
125
|
-
border: 2px solid #e5e7eb;
|
|
126
|
-
border-radius: 8px;
|
|
127
|
-
background: white;
|
|
128
|
-
font-size: 1.5rem;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
transition: all 0.2s ease;
|
|
131
|
-
color: #333;
|
|
159
|
+
margin-bottom: 20px;
|
|
160
|
+
color: #10b981;
|
|
132
161
|
}
|
|
133
162
|
|
|
134
|
-
.
|
|
135
|
-
|
|
136
|
-
border-color: #9ca3af;
|
|
137
|
-
transform: scale(1.05);
|
|
163
|
+
.message.show {
|
|
164
|
+
animation: slideDown 0.4s ease;
|
|
138
165
|
}
|
|
139
166
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
167
|
+
@keyframes slideDown {
|
|
168
|
+
from {
|
|
169
|
+
transform: translateY(-20px);
|
|
170
|
+
opacity: 0;
|
|
171
|
+
}
|
|
172
|
+
to {
|
|
173
|
+
transform: translateY(0);
|
|
174
|
+
opacity: 1;
|
|
175
|
+
}
|
|
143
176
|
}
|
|
144
177
|
|
|
145
178
|
.button-group {
|
|
@@ -150,7 +183,7 @@ body {
|
|
|
150
183
|
|
|
151
184
|
.btn {
|
|
152
185
|
flex: 1;
|
|
153
|
-
padding: 12px
|
|
186
|
+
padding: 12px 24px;
|
|
154
187
|
border: none;
|
|
155
188
|
border-radius: 8px;
|
|
156
189
|
font-size: 1rem;
|
|
@@ -184,26 +217,22 @@ body {
|
|
|
184
217
|
box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
|
|
185
218
|
}
|
|
186
219
|
|
|
187
|
-
.btn-danger {
|
|
188
|
-
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
|
|
189
|
-
color: white;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.btn-danger:hover:not(:disabled) {
|
|
193
|
-
transform: translateY(-2px);
|
|
194
|
-
box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
220
|
.instructions {
|
|
198
221
|
background: #f9fafb;
|
|
199
222
|
border-radius: 8px;
|
|
200
223
|
padding: 15px;
|
|
201
|
-
|
|
202
|
-
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.instructions h3 {
|
|
227
|
+
color: #333;
|
|
228
|
+
margin-bottom: 10px;
|
|
229
|
+
font-size: 1.1rem;
|
|
203
230
|
}
|
|
204
231
|
|
|
205
232
|
.instructions p {
|
|
206
|
-
|
|
233
|
+
color: #6b7280;
|
|
234
|
+
font-size: 0.9rem;
|
|
235
|
+
margin-bottom: 5px;
|
|
207
236
|
}
|
|
208
237
|
|
|
209
238
|
.instructions p:last-child {
|
|
@@ -219,28 +248,16 @@ body {
|
|
|
219
248
|
font-size: 2rem;
|
|
220
249
|
}
|
|
221
250
|
|
|
222
|
-
.
|
|
223
|
-
|
|
224
|
-
gap: 10px;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.info-item {
|
|
228
|
-
flex-direction: row;
|
|
229
|
-
justify-content: space-between;
|
|
230
|
-
width: 100%;
|
|
251
|
+
.mole {
|
|
252
|
+
font-size: 2rem;
|
|
231
253
|
}
|
|
232
254
|
|
|
233
|
-
.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
font-size: 1.2rem;
|
|
255
|
+
.game-board {
|
|
256
|
+
gap: 10px;
|
|
257
|
+
padding: 15px;
|
|
237
258
|
}
|
|
238
259
|
|
|
239
260
|
.button-group {
|
|
240
261
|
flex-direction: column;
|
|
241
262
|
}
|
|
242
|
-
|
|
243
|
-
.instructions {
|
|
244
|
-
font-size: 0.85rem;
|
|
245
|
-
}
|
|
246
263
|
}
|