-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
252 lines (244 loc) · 5.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<head>
<link
href="https://fonts.googleapis.com/css2?family=Volkhov&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css"
integrity="sha512-EZLkOqwILORob+p0BXZc+Vm3RgJBOe1Iq/0fiI7r/wJgzOFZMlsqTa29UEl6v6U6gsV4uIpsNZoV32YZqrCRCQ=="
crossorigin="anonymous"
/>
<script type="importmap">
{
"imports": {
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
"htm/preact": "https://esm.sh/[email protected]/preact?external=preact"
}
}
</script>
<title>Simple Card Prototyper</title>
<style>
body {
font-family: "Volkhov", serif;
background-color: rgb(13, 59, 80);
background: url("tess-parch-1.png");
color: cornsilk;
}
* {
box-sizing: border-box;
}
@media print {
body {
background: none;
}
.no-print,
.no-print * {
display: none !important;
}
}
/* UTILS */
.ml-8 {
margin-left: 8px;
}
/* HEADER */
.header {
padding: 1em 0 0em 2em;
}
.header h2 {
letter-spacing: 1px;
}
.flex-line {
display: flex;
align-items: baseline;
}
.header input {
margin-left: 8px;
}
.header button {
margin-left: 16px;
color: white;
background-color: rgb(95, 38, 12);
}
/* PRINT */
.a4-print {
margin-left: 2em;
margin-bottom: 2em;
width: 29.1cm;
height: 19.6cm;
border: 1px solid grey;
background-color: white;
}
@media print {
.a4-print {
margin-left: 0;
margin-bottom: 0;
}
}
.flex-wrap {
display: flex;
flex-wrap: wrap;
}
/* CARD */
.card {
border: 1px solid black;
border-radius: 5px;
}
@media print {
.card {
overflow: hidden;
}
}
.card textarea,
.card input {
background: none;
padding: 0;
border: none;
margin-bottom: 0.1em;
width: 98%;
color: inherit;
font-family: inherit;
}
.card textarea:hover,
.card input:hover {
background-color: crimson;
}
.card textarea:focus,
.card input:focus {
background-color: rgba(127, 127, 127, 0.3);
}
.c-header {
font-size: 1.3em;
font-weight: bold;
}
.c-subheader {
font-size: 1.1em;
font-weight: bold;
}
.img-wrap {
width: 98%;
position: relative;
}
.addImgBtn {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.addImgBtn > div {
cursor: pointer;
color: rgba(167, 167, 167, 0.8);
font-weight: bolder;
}
.c-image {
width: 100%;
height: 100%;
object-fit: cover;
}
.c-text {
font-size: 1em;
}
.c-footer {
font-size: 0.8em;
font-style: italic;
}
/* Footer */
.footer {
margin: 2em;
}
.footer a {
color: rgb(32, 130, 196);
}
/* loading Spinner */
.spinner {
margin: 100px auto;
width: 150px;
height: 140px;
text-align: center;
font-size: 24px;
}
.spinner > div {
background-color: rgb(75, 41, 14);
height: 100%;
width: 12px;
display: inline-block;
-webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
animation: sk-stretchdelay 1.2s infinite ease-in-out;
}
.spinner .rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.spinner .rect3 {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
.spinner .rect4 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.spinner .rect5 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
@-webkit-keyframes sk-stretchdelay {
0%,
40%,
100% {
-webkit-transform: scaleY(0.4);
}
20% {
-webkit-transform: scaleY(1);
}
}
@keyframes sk-stretchdelay {
0%,
40%,
100% {
transform: scaleY(0.4);
-webkit-transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
-webkit-transform: scaleY(1);
}
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
</style>
</head>
<main>
<body>
<div class="no-print header">
<div>
<h3>Welcome to The Simple Online Card Editor</h2>
<h6>A basic tool for quickly creating card prototypes</h4>
<p>
Edit any text by clicking in the text boxes, to add an image click in
the center of the image box & make any global changes below
</p>
</div>
</div>
<div class="spinner" id="loading-spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<div id="preact-app"></div>
</body>
<div class="footer no-print">
Links
<a href="https://github.com/aronedwards91/Simple-Card-Prototyper">Github</a>
</div>
</main>
<script defer src="file-saver.js"></script>
<script type="module" defer src="index.js"></script>