-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.js
More file actions
149 lines (135 loc) · 4.85 KB
/
Copy pathsignup.js
File metadata and controls
149 lines (135 loc) · 4.85 KB
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
class SignupForm extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
const container = document.createElement("div");
container.classList.add("signup-container");
container.innerHTML = `
<div class="left-section">
<h2>Capturing Moments, Creating Memories</h2>
</div>
<div class="right-section">
<h2>Create an account</h2>
<p>Already have an account? <a href="#">Log in</a></p>
<form>
<div class="name-fields">
<input type="text" placeholder="First Name">
<input type="text" placeholder="Last Name">
</div>
<input type="email" placeholder="Email">
<input type="password" placeholder="Enter your password">
<div class="terms">
<input type="checkbox" id="terms">
<label for="terms">I agree to the <a href="#">Terms & Conditions</a></label>
</div>
<button type="submit">Create Account</button>
</form>
<p>Or register with</p>
<button class="google-btn">
<text class = "google-text" x="10" y="30" font-family="Poppins, Arial, sans-serif" font-weight="bold">
<span class="blue">G</span>
<span class="red">o</span>
<span class="yellow">o</span>
<span class="blue">g</span>
<span class="green">l</span>
<span class="red">e</span>
</text>
</button>
</div>
`;
const style = document.createElement("style");
style.textContent = `
.signup-container {
display: flex;
max-width: 900px;
width: 100%;
background:var(bg-color);
border-radius: 10px;
overflow: hidden;
}
.left-section {
width: 50%;
background: url('https://images.unsplash.com/photo-1734531352669-11c2b2ddea3a?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1yZWxhdGVkfDExNXx8fGVufDB8fHx8fA%3D%3D') no-repeat center;
background-size: cover;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 20px;
}
.right-section {
width: 50%;
padding: 40px;
background-color:var(--text-color);
}
input, button {
width: 100%;
margin: 10px 0;
padding: 10px;
border-radius: 5px;
border: 1px solid var(--input-border);
background: var(--bd-color);
color: var(--bg-color);
}
button {
background: var(--primary-color);
cursor: pointer;
}
.google-text {
font-family: Poppins, Arial, sans-serif;
font-size: 23px;
font-weight: bold;
}
.blue { color: #4285F4; }
.red { color: #EA4335; }
.yellow { color: #FBBC05; }
.green { color: #34A853; }
.terms {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
}
.terms input {
width: 16px;
height: 16px;
}
.google-btn {
background: white;
color: black;
}
@media (max-width: 768px) {
.signup-container {
flex-direction: column;
height: auto;
text-align: center;
padding: 20px;
}
.left-section {
width: 100%;
height: 200px;
}
.right-section {
width: 100%;
padding: 20px;
}
.name-fields {
display: flex;
flex-direction: column;
}
}
@media (max-width: 480px) {
.signup-container {
width: 95%;
}
.right-section {
padding: 15px;
}
input, button {
padding: 8px;
}
}
`;
this.shadowRoot.append(style, container);
}
}
customElements.define("signup-form", SignupForm);