-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
242 lines (238 loc) · 5.38 KB
/
style.css
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
@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
:root {
--gradient-bg: linear-gradient(
50deg,
rgb(234, 0, 255),
rgb(153, 0, 255),
rgb(0, 89, 255),
rgb(129, 168, 253)
);
--text-gradient: linear-gradient(
50deg,
rgb(244, 126, 255),
rgb(209, 140, 255),
rgb(118, 166, 255),
rgb(129, 168, 253)
);
}
/* reset */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "Work Sans", sans-serif;
font-size: 16pt;
background: hsl(0, 0%, 0%);
}
/* specifics */
.landing-page {
display: flex;
align-items: flex-start;
justify-content: center;
height: 90vh;
background: hsl(240, 6%, 6%);
}
/* the main box */
.box {
margin: 40px 10px 0px 10px;
display: flex;
align-items: center;
flex-direction: column;
width: 700px;
min-width: 200px;
min-height: 350px;
color: hsl(224, 60%, 95%);
border-radius: 8px;
background: hsl(225, 8%, 20%);
}
/* add gradient bg to h3 */
h1,
h2,
h3,
h4 {
margin: 20px 0;
background-image: var(--text-gradient);
background-clip: text;
-webkit-background-clip: text;
-moz-background-clip: text;
-webkit-text-fill-color: transparent;
-moz-text-fill-color: transparent;
}
/* drag area */
.drag {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 200px;
min-width: 300px;
max-width: 600px;
border: 1px dashed hsl(225, 8%, 40%);
border-radius: 5px;
}
/* style when drag area is triggerd/dragover event */
.triggered {
background: hsl(225, 28%, 40%);
}
/* all elements in drag area */
.drag > * {
margin: 10px 0;
}
.drag > p {
text-align: center;
font-family: "Poppins", sans-serif;
color: hsl(225, 8%, 60%);
}
.drag img {
height: 100%;
width: 100%;
object-fit: cover;
border-radius: 5px;
margin: 0;
}
/* button upload */
.btn-upload {
font-family: "Poppins", sans-serif;
border: none;
padding: 8px 15px;
cursor: pointer;
border-radius: 5px;
background: hsl(224, 60%, 95%);
}
#texts {
outline: none;
resize: none;
overflow: auto;
padding: 5px;
background: hsl(225, 8%, 30%);
color: hsl(224, 60%, 95%);
width: 300px;
border: 1px solid hsl(225, 8%, 30%);
}
#repeat {
outline: none;
width: 50px;
background: hsl(225, 8%, 30%);
padding: 4px 2px;
border: none;
color: hsl(224, 60%, 95%);
}
label[for="repeat"] {
font-size: 0.8rem;
}
.texts {
margin-top: 10px;
display: flex;
flex-direction: column;
}
.repeat {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 5px;
}
label[for="texts"] {
align-self: flex-start;
font-size: 0.8rem;
}
.inline {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 20px;
}
/* generate button add gradient background image */
.btn-generate {
margin: 20px 0;
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: 1.3rem;
color: hsl(224, 60%, 95%);
background-image: var(--gradient-bg);
background-size: 300%;
transition: background-position 0.3s linear, opacity 0.3s linear;
background-position: left;
border-radius: 50px;
-moz-transition: background-position 0.3s cubic-bezier(0.14, 0.46, 0.7, 0.93); /* Firefox 4 */
-webkit-transition: background-position 0.3s
cubic-bezier(0.14, 0.46, 0.7, 0.93); /* Safari and Chrome */
-o-transition: background-position 0.3s cubic-bezier(0.14, 0.46, 0.7, 0.93); /* Opera */
-ms-transition: background-position 0.3s cubic-bezier(0.14, 0.46, 0.7, 0.93); /* Explorer 10 */
/* border: 2px solid hsl(219, 100%, 50%); */
}
.clicked {
opacity: 0.7;
}
/* add moving effect to bg of generate button */
.btn-generate:hover {
background-position: right;
}
/* add a glowing/breathe style if an image is successfully uploaded */
.ready {
animation: breathe 1.3s infinite;
}
/* breathe/glowing effect animation for button generate */
@keyframes breathe {
0% {
box-shadow: 2px 2px 13px 2px rgba(44, 192, 255, 0.48);
-webkit-box-shadow: 2px 2px 13px 2px rgba(44, 192, 255, 0.48);
-moz-box-shadow: 2px 2px 13px 2px rgba(44, 192, 255, 0.48);
}
50% {
box-shadow: 2px 2px 29px 2px rgba(44, 192, 255, 0.55);
-webkit-box-shadow: 2px 2px 29px 2px rgba(44, 192, 255, 0.55);
-moz-box-shadow: 2px 2px 29px 2px rgba(44, 192, 255, 0.55);
}
100% {
box-shadow: 2px 2px 13px 2px rgba(44, 192, 255, 0.48);
-webkit-box-shadow: 2px 2px 13px 2px rgba(44, 192, 255, 0.48);
-moz-box-shadow: 2px 2px 13px 2px rgba(44, 192, 255, 0.48);
}
}
/* this is the nextpage/ where the photo with fill text will be generated */
.output-page {
height: 100vh;
width: 100%;
background: black;
}
.output-page h3 {
text-align: center;
}
/* canvas area where the photo with fill text will be generated */
.canvas {
overflow: hidden;
width: 80%;
height: 85%;
margin: 20px auto;
color: white;
}
/* fill text image */
#text {
background-repeat: no-repeat;
background-position: bottom;
background-size: contain;
background-clip: text;
-webkit-text-fill-color: rgba(255, 255, 255, 0);
-webkit-background-clip: text;
font-size: 0.6rem;
line-height: 0.8;
max-height: 100vh;
word-break: break-all;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: white;
}
/* media queries */
@media (max-width: 376px) {
.landing-page {
height: 70vh;
}
.box {
margin-top: 10px;
}
}