-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsquarespace.html
110 lines (97 loc) · 2.36 KB
/
squarespace.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
<!-- Add to header -->
<script>
// Increment Toolbox.urlId with each update
window.Toolbox = {
enable: true,
evergreen: true,
url: 'https://develop.beautifultrouble.org/toolbox.js',
urlId: 2
};
</script>
<!-- Add to page -->
<script>
(() => {
/* This code expects the following in the site header:
window.Toolbox = {
enable: true,
evergreen: false,
url: 'https://example.com/toolbox.js',
urlId: 1
};
*/
if (!(window.Toolbox && window.Toolbox.enable)) return;
// Attempt to enforce a trailing slash
try {
let url = new URL(window.location);
url.pathname = url.pathname.replace(/([^/])$/, '$1/');
window.history.replaceState(null, null, url);
} catch(e) { }
// Load the script with a fixed or random id to control caching
let script = document.createElement('script');
if (window.Toolbox.evergreen) {
script.setAttribute('src', `${window.Toolbox.url}?id=${Math.random().toString(36).substring(7)}`);
console.info('Loading toolbox: evergreen');
} else {
script.setAttribute('src', `${window.Toolbox.url}?id=${window.Toolbox.urlId}`);
console.info('Loading toolbox:', window.Toolbox.urlId);
}
document.head.appendChild(script);
})();
</script>
<!-- Optional loader -->
<style>
#page :not(.has-background) .section-background {
background-color: #2b2b2b;
}
.rectangle-bounce {
position: relative;
display: flex;
justify-content: center;
height: 8rem;
transition: all 300ms ease-in-out 0s;
z-index: 1;
padding: 6rem 0;
}
.rectangle-bounce .rect-1,
.rectangle-bounce .rect-2,
.rectangle-bounce .rect-3,
.rectangle-bounce .rect-4,
.rectangle-bounce .rect-5 {
width: 1rem;
margin: 0 2px;
height: 100%;
background-color: #49adcd;
animation: rectangle-bounce 1.5s infinite ease-in-out;
}
.rectangle-bounce .rect-2 {
background-color: #67bd96;
animation-delay: -1.4s;
}
.rectangle-bounce .rect-3 {
background-color: #98be71;
animation-delay: -1.3s;
}
.rectangle-bounce .rect-4 {
background-color: #f8ab4f;
animation-delay: -1.2s;
}
.rectangle-bounce .rect-5 {
background-color: #f8bf4c;
animation-delay: -1.1s;
}
@keyframes rectangle-bounce {
0%, 40%, 100% {
transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
}
}
</style>
<div class="rectangle-bounce">
<div class="rect-1"></div>
<div class="rect-2"></div>
<div class="rect-3"></div>
<div class="rect-4"></div>
<div class="rect-5"></div>
</div>