Skip to content

Commit a426b26

Browse files
timothyiskodiakhq[bot]
authored andcommitted
Add quickstarts page (#1411)
* Add quickstarts page * Disable amp but make quickstarts amp-ready * Update button component from front and create new deploy-button * Remove old code * Add spacing between header and quickstarts * Fix text changes * Fix text, fix link * Update icons, ensure all links are correct, add missing guides, add height to icons, improve method of listing quickstarts
1 parent be628dc commit a426b26

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1360
-772
lines changed

Diff for: components/buttons/button-animation.js

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { PureComponent } from 'react'
2+
3+
export default class Animation extends PureComponent {
4+
constructor(props) {
5+
super(props)
6+
this.el = null
7+
}
8+
9+
onElement = el => {
10+
this.el = el
11+
if (el) {
12+
el.addEventListener('animationend', this.onAnimationEnd)
13+
}
14+
}
15+
16+
onAnimationEnd = () => {
17+
if (this.props.onComplete) {
18+
this.props.onComplete()
19+
}
20+
}
21+
22+
render() {
23+
return (
24+
<div ref={this.onElement}>
25+
<svg
26+
style={{
27+
top: this.props.y - 10,
28+
left: this.props.x - 10
29+
}}
30+
width="20"
31+
height="20"
32+
viewBox="0 0 20 20"
33+
>
34+
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
35+
<g fill="var(--accents-2)">
36+
<rect width="100%" height="100%" rx="10" />
37+
</g>
38+
</g>
39+
</svg>
40+
41+
<style jsx>{`
42+
div {
43+
position: absolute;
44+
top: 0;
45+
left: 0;
46+
right: 0;
47+
bottom: 0;
48+
}
49+
50+
svg {
51+
position: absolute;
52+
animation: 400ms ease-in expand;
53+
animation-fill-mode: forwards;
54+
width: 20px;
55+
height: 20px;
56+
}
57+
58+
@keyframes expand {
59+
0% {
60+
opacity: 0;
61+
transform: scale(1);
62+
}
63+
64+
30% {
65+
opacity: 1;
66+
}
67+
68+
80% {
69+
opacity: 0.5;
70+
}
71+
72+
100% {
73+
transform: scale(25);
74+
opacity: 0;
75+
}
76+
}
77+
`}</style>
78+
</div>
79+
)
80+
}
81+
}

0 commit comments

Comments
 (0)