@t2ca/gatsby-theme-showcase 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/components/hero.js +7 -8
- package/src/components/project.js +27 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2ca/gatsby-theme-showcase",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@theme-ui/sidenav": "^0.3.0",
|
|
32
32
|
"@theme-ui/typography": "^0.3.0",
|
|
33
33
|
"deepmerge": "^4.0.0",
|
|
34
|
+
"framer-motion": "^1.10.3",
|
|
34
35
|
"gatsby": "^2.13.3",
|
|
35
36
|
"gatsby-image": "^2.2.7",
|
|
36
37
|
"gatsby-plugin-emotion": "^4.1.2",
|
|
@@ -46,7 +47,6 @@
|
|
|
46
47
|
"gatsby-transformer-yaml": "^2.2.1",
|
|
47
48
|
"react-helmet": "^6.0.0",
|
|
48
49
|
"react-icons": "^3.7.0",
|
|
49
|
-
"react-spring": "^8.0.27",
|
|
50
50
|
"remark-slug": "^6.0.0",
|
|
51
51
|
"theme-ui": "^0.3.0"
|
|
52
52
|
},
|
package/src/components/hero.js
CHANGED
|
@@ -3,7 +3,7 @@ import React from "react"
|
|
|
3
3
|
// import { useStaticQuery, graphql } from "gatsby"
|
|
4
4
|
// import Img from "gatsby-image"
|
|
5
5
|
import { jsx, Styled, Container, Flex, Box } from "theme-ui"
|
|
6
|
-
import {
|
|
6
|
+
import { motion } from "framer-motion"
|
|
7
7
|
|
|
8
8
|
export default ({
|
|
9
9
|
headingTop,
|
|
@@ -14,11 +14,6 @@ export default ({
|
|
|
14
14
|
minHeight = `100vh`,
|
|
15
15
|
svg,
|
|
16
16
|
}) => {
|
|
17
|
-
const titleProps = useSpring({
|
|
18
|
-
from: { opacity: 0, transform: "translate3d(0, -200px, 0)" },
|
|
19
|
-
to: { opacity: 1, transform: "translate3d(0, 0, 0)" },
|
|
20
|
-
})
|
|
21
|
-
|
|
22
17
|
return (
|
|
23
18
|
<React.Fragment>
|
|
24
19
|
<div
|
|
@@ -31,7 +26,11 @@ export default ({
|
|
|
31
26
|
}}
|
|
32
27
|
>
|
|
33
28
|
<Container sx={{ py: 3, px: 4 }}>
|
|
34
|
-
<
|
|
29
|
+
<motion.div
|
|
30
|
+
initial={{ opacity: 0, y: -200 }}
|
|
31
|
+
animate={{ opacity: 1, y: 0 }}
|
|
32
|
+
transition={{ duration: 0.5 }}
|
|
33
|
+
>
|
|
35
34
|
<Flex
|
|
36
35
|
sx={{
|
|
37
36
|
display: [`block`, `flex`],
|
|
@@ -86,7 +85,7 @@ export default ({
|
|
|
86
85
|
competitors.
|
|
87
86
|
</Styled.p>
|
|
88
87
|
</div>
|
|
89
|
-
</
|
|
88
|
+
</motion.div>
|
|
90
89
|
</Container>
|
|
91
90
|
</div>
|
|
92
91
|
</React.Fragment>
|
|
@@ -3,23 +3,12 @@ import React from "react"
|
|
|
3
3
|
import { Styled, jsx, Container } from "theme-ui"
|
|
4
4
|
import { Link } from "gatsby"
|
|
5
5
|
import Img from "gatsby-image"
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import { motion } from "framer-motion"
|
|
7
8
|
import { FaArrowLeft } from "react-icons/fa"
|
|
8
9
|
import Wave from "./wave"
|
|
9
10
|
|
|
10
|
-
const Project = data => {
|
|
11
|
-
const Image = animated(Img)
|
|
12
|
-
const titleProps = useSpring({
|
|
13
|
-
from: { opacity: 0, transform: "translate3d(0, -150px, 0)" },
|
|
14
|
-
to: { opacity: 1, transform: "translate3d(0, 0, 0)" },
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const imgProps = useSpring({
|
|
18
|
-
delay: 600,
|
|
19
|
-
from: { opacity: 0, transform: "translate3d(0, 0, 0)" },
|
|
20
|
-
to: { opacity: 1, transform: "translate3d(0, 0, 0)" },
|
|
21
|
-
})
|
|
22
|
-
|
|
11
|
+
const Project = (data) => {
|
|
23
12
|
return (
|
|
24
13
|
<React.Fragment>
|
|
25
14
|
<Container sx={{ px: [0, 4], py: 0 }}>
|
|
@@ -32,26 +21,35 @@ const Project = data => {
|
|
|
32
21
|
minHeight: `75vh`, // screenHeight
|
|
33
22
|
}}
|
|
34
23
|
>
|
|
35
|
-
<
|
|
24
|
+
<motion.div
|
|
25
|
+
initial={{ opacity: 0, y: -150 }}
|
|
26
|
+
animate={{ opacity: 1, y: 0 }}
|
|
27
|
+
transition={{ duration: 0.5 }}
|
|
28
|
+
>
|
|
36
29
|
<Styled.a as={Link} to="/projects/">
|
|
37
30
|
<FaArrowLeft size={12} sx={{ marginRight: ".25rem" }} />
|
|
38
31
|
Back to showcase
|
|
39
32
|
</Styled.a>
|
|
40
33
|
<Styled.h1>{data.title}</Styled.h1>
|
|
41
|
-
</
|
|
34
|
+
</motion.div>
|
|
42
35
|
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
<motion.div
|
|
37
|
+
initial={{ opacity: 0, y: 0 }}
|
|
38
|
+
animate={{ opacity: 1, y: 0 }}
|
|
39
|
+
transition={{ delay: 0.5 }}
|
|
40
|
+
>
|
|
41
|
+
<Img
|
|
42
|
+
fluid={data.hero.childImageSharp.fluid}
|
|
43
|
+
sx={{
|
|
44
|
+
position: "absolute !important",
|
|
45
|
+
top: "0",
|
|
46
|
+
left: "10vw",
|
|
47
|
+
right: "0",
|
|
48
|
+
bottom: "0",
|
|
49
|
+
zIndex: "-1",
|
|
50
|
+
}}
|
|
51
|
+
/>
|
|
52
|
+
</motion.div>
|
|
55
53
|
</div>
|
|
56
54
|
</Container>
|
|
57
55
|
|
|
@@ -60,7 +58,7 @@ const Project = data => {
|
|
|
60
58
|
<div sx={{ bg: `mBg` }}>
|
|
61
59
|
<Container>
|
|
62
60
|
<div sx={{ width: `2/3`, m: `0 auto` }}>
|
|
63
|
-
<
|
|
61
|
+
<Img fluid={data.laptop.childImageSharp.fluid} sx={{}} />
|
|
64
62
|
</div>
|
|
65
63
|
</Container>
|
|
66
64
|
</div>
|