-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
173 lines (167 loc) · 4.46 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./images/favicon-32x32.png"
/>
<title>Frontend Mentor | Base Apparel coming soon page</title>
<!-- FONT -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600&display=swap"
rel="stylesheet"
/>
<!-- STYLE -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@unocss/reset/tailwind.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/@unocss/runtime/attributify.global.js"></script>
<script>
const config = window.__unocss_runtime.uno.config
const configColor = config.theme.colors
const configFamily = config.theme.fontFamily
configColor.primaryDesRed = "#ce9797"
configColor.primarySoftRed = "#f96262"
configColor.neutralGrayRed = "#413a3a"
configFamily.josefinSans = '"Josefin Sans",' + configFamily.sans
</script>
<style>
[un-cloak] {
display: none;
}
input:focus {
outline-style: none;
border-color: #f96262;
}
.linear-gradient-1 {
background: linear-gradient(
135deg,
hsl(0, 0%, 100%),
hsl(0, 100%, 98%)
);
}
.linear-gradient-2 {
background: linear-gradient(
135deg,
hsl(0, 80%, 86%),
hsl(0, 74%, 74%)
);
}
.sr-only {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
</style>
<!-- JS -->
<script
defer
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"
></script>
<script>
document.addEventListener("alpine:init", () => {
Alpine.data("comingSoon", () => ({
email: "",
isValidEmail: true,
validateEmail() {
var regexMail = /\S+@\S+\.\S+/
this.isValidEmail = regexMail.test(this.email)
},
}))
})
</script>
</head>
<body
class="font-josefinSans text-primary-des-red text-3.5 leading-5.5"
md="text-4 tracking-0.02 leading-6.8"
un-cloak
>
<section
class="pb-15 pt-7.75 max-w-360 mx-auto"
md="relative pb-0 pt-16.25 h-200 bg-no-repeat bg-[url(images/bg-pattern-desktop.svg)] bg-cover"
x-data="comingSoon"
>
<img
src="images/logo.svg"
alt=""
class="ml-8 h-5.25"
md="ml-41.25 h-8.25"
/>
<div
class="h-62.5 bg-[url(images/hero-mobile.jpg)] bg-no-repeat bg-cover w-full mt-8"
md="bg-[url(images/hero-desktop.jpg)] absolute right-0 top-0 w-1/2 max-w-152.5 h-full mt-0"
></div>
<div
class="px-8 mt-16 text-center"
md="px-0 mt-33.5 ml-41.25 text-left w-1/3 max-w-111.25"
>
<h1
class="mx-auto flex flex-col text-10.25 tracking-2.5 leading-10.5"
md="text-16 tracking-4.25 leading-17"
>
<span class="font-300">WE'RE</span
><span class="font-600 text-neutral-gray-red"
>COMING SOON</span
>
</h1>
<p class="mt-4" md="mt-5.75">
Hello fellow shoppers! We're currently building our new
fashion store. Add your email below to stay up-to-date with
announcements and our launch deals.
</p>
<form
@submit.prevent="validateEmail"
action=""
class="relative mt-8"
md="mt-10.25"
>
<label for="email" class="sr-only">Email</label>
<input
type="text"
name="email"
placeholder="Email Address"
id="email"
maxlength="40"
aria-label="Email"
class="py-2.75 pl-5.5 pr-28 rounded-full w-full border-2 placeholder-primary-des-red transition-all bg-transparent"
md="py-3.25 pl-7.5 pr-37"
hover="border-primary-des-red"
:class="!isValidEmail && 'border-2 border-primary-soft-red'"
x-model="email"
/>
<div x-show="!isValidEmail">
<img
src="images/icon-error.svg"
alt=""
class="absolute top-3.25 right-20"
md="top-4.25 right-29.25"
/>
<p
class="text-left text-3 mt-2 ml-8 tracking-0.12 text-primary-soft-red"
>
Please provide a valid email
</p>
</div>
<button
class="absolute right-0 top-0 linear-gradient-2 py-3.5 px-6.5 rounded-full shadow-2xl shadow-primary-des-red transition-all"
hover="opacity-80"
active="opacity-60"
md="py-4.5 px-11"
>
<img src="images/icon-arrow.svg" alt="" />
</button>
</form>
</div>
</section>
</body>
</html>