-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
212 lines (191 loc) · 9.22 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Homalive. Architecture is evolving too</title>
<link rel="stylesheet" href="style.css?v=2" />
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,500,900" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
if (
/\bhomalive.com$/.test(window.location.host) &&
window.location.protocol != 'https:'
) {
window.location.protocol = 'https:';
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111256069-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-111256069-2', {
send_page_view: false,
});
gtag('event', 'page_view', {
event_callback: () => {
const query = location.search.replace(/^\?/, '').split('&');
const isNotUtm = parameter => !/^utm_/.test(parameter);
if (!query.every(isNotUtm)) {
const cleanQuery = query.filter(isNotUtm)
history.replaceState({}, '', String(location).replace(
/\?.*/, !!cleanQuery.length ? `?${cleanQuery.join('&')}` : ''
))
}
},
});
</script>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@homalive">
<meta name="twitter:creator" content="@architectcodes">
<meta property="og:title" content="it’s time for a change.">
<meta property="og:description" content="Building a custom home always required a ton of hassle and truckloads of money. But thanks to AI technology, that’s no longer necessary. Homalive helps you build a home at a fraction of that cost, beautifully tailored to your needs.">
<meta property="og:image" content="https://homalive.com/hero.jpg" />
</head>
<body>
<div class="background"></div>
<div class="background__loaded-image background__loaded-image--hidden"></div>
<div class="background__overlay"></div>
<div class="background__gradient"></div>
<script>
(() => {
const loadedBackground = document.querySelector('.background__loaded-image');
const finish = () => {
loadedBackground.classList.remove('background__loaded-image--hidden');
};
const loader = new Image();
Promise.all([
new Promise(resolve => loader.addEventListener('load', resolve)),
new Promise(resolve => setTimeout(resolve, 500)),
]).then(finish);
loader.src = 'background.jpg';
})();
</script>
<div class="content">
<div class="logo">
<img src="homalive-logo.svg" alt="Homalive" width="143.6" height="41.4" /> is in private alpha.
</div>
<h1>it’s time<br />for a change.</h1>
<p>Building a custom home always required a ton of hassle and truckloads of money. But thanks to AI technology, that’s no longer necessary. Homalive helps you build a home at a fraction of that cost, beautifully tailored to your needs.</p>
<p>Soon we’ll be giving out invites to the platform.<br/>Be the first to know.</p>
<p>
<form action="https://homalive.us18.list-manage.com/subscribe/post" method="POST">
<input type="hidden" name="u" value="fd6a54eed316044a17b43aaa2">
<input type="hidden" name="id" value="433a993ae1">
<div class="signup">
<div class="signup__slider">
<div class="signup__element signup__button" for="signup-show-slider">keep me informed</div>
<input class="signup__element signup__input" type="email" placeholder="enter your email" autocapitalize="off" autocorrect="off" name="MERGE0" id="MERGE0" size="25" value="">
<input class="signup__element signup__submit" type="submit" class="formEmailButton" name="submit" value="get updates">
</div>
</div>
<script>
(() => {
const signup = document.querySelector('.signup');
const slider = document.querySelector('.signup__slider');
const button = document.querySelector('.signup__button');
const input = document.querySelector('.signup__input');
const email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; // http://emailregex.com
const submit = 'signup__slider--submit';
const interacting = 'signup--interacting';
const checkEmail = () => {
if (email.test(input.value)) slider.classList.add(submit);
else slider.classList.remove(submit);
};
checkEmail();
input.addEventListener('input', checkEmail);
const startInteraction = () => {
signup.classList.add(interacting);
checkEmail();
};
button.addEventListener('click', startInteraction);
input.addEventListener('focus', startInteraction);
input.addEventListener('blur', () => signup.classList.remove(interacting));
const focusInputAfterTransition = () => {
function focusInput() {
input.focus();
slider.removeEventListener('transitionend', focusInput);
}
slider.addEventListener('transitionend', focusInput);
};
button.addEventListener('click', focusInputAfterTransition);
})();
</script>
</form>
</p>
</div>
<script>
(() => {
const backgroundGradient = document.querySelector('.background__gradient');
let currentHueBottomLeft = 0;
let currentHueTopRight = 0;
const clampPosition = position => Math.min(2.2, Math.max(-2.2, position));
const commitMovement = ({
x,
y
}) => {
const previousHueBottomLeft = currentHueBottomLeft;
currentHueBottomLeft = clampPosition(previousHueBottomLeft - x);
const previousTranslateY = currentHueTopRight;
currentHueTopRight = clampPosition(previousTranslateY - y);
backgroundGradient.style.background =
`
linear-gradient(
to top right,
hsla(${175 +
currentHueBottomLeft *
180 /
2.2}, 100%, 50%, 0.4),
hsla(${61 +
currentHueTopRight * 180 / 2.2}, 100%, 50%, 0.8)
)
`;
};
commitMovement({
x: 0,
y: 0,
});
const mouseMoveRatio = 2;
window.addEventListener('mousemove', event => {
commitMovement({
x: mouseMoveRatio *
event.movementX /
document.documentElement.clientWidth,
y: mouseMoveRatio *
event.movementY /
document.documentElement.clientHeight,
});
});
let previousScrollPosition = window.scrollY;
window.addEventListener('scroll', event => {
const movement =
(window.scrollY - previousScrollPosition) / window.innerHeight;
previousScrollPosition = window.scrollY;
commitMovement({
x: -movement,
y: movement,
});
});
let currentBeta = null;
let currentGamma = null;
const rotationRatio = 0.1;
const movementByAngle = (previous, current) =>
(rotationRatio * (previous - current)) % 360;
window.addEventListener('deviceorientation', event => {
const previousBeta = currentBeta;
const previousGamma = currentGamma;
currentBeta = event.beta;
currentGamma = event.gamma;
if (previousBeta == null || previousGamma == null) return;
commitMovement({
x: rotationRatio * (previousGamma - currentGamma),
y: rotationRatio * (previousBeta - currentBeta),
});
});
})();
</script>
</body>
</html>