@t2ca/gatsby-theme-showcase 1.0.7 → 1.0.9
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/index.js +2 -0
- package/package.json +1 -1
- package/src/components/header.js +1 -0
- package/src/components/hero.js +10 -8
- package/src/components/layout.js +1 -1
- package/src/components/logo-banner.js +1 -1
- package/src/components/nav-link.js +12 -24
- package/src/components/project.js +7 -0
- package/src/gatsby-plugin-theme-ui/index.js +83 -0
- package/src/gatsby-plugin-theme-ui/styles.js +1 -2
- package/src/templates/project.js +9 -6
package/index.js
CHANGED
|
@@ -5,3 +5,5 @@ export { default as Card } from "./src/components/card"
|
|
|
5
5
|
export { default as Button } from "./src/components/button"
|
|
6
6
|
export { default as LogoBanner } from "./src/components/logo-banner"
|
|
7
7
|
export { default as Wave } from "./src/components/wave"
|
|
8
|
+
export { default as Hero } from "./src/components/hero"
|
|
9
|
+
|
package/package.json
CHANGED
package/src/components/header.js
CHANGED
package/src/components/hero.js
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
import React from "react"
|
|
3
3
|
import { jsx, Styled, Container } from "theme-ui"
|
|
4
4
|
import { useSpring, animated } from "react-spring"
|
|
5
|
-
import Wave from "./wave"
|
|
6
5
|
|
|
7
|
-
export default
|
|
6
|
+
export default ({
|
|
7
|
+
headingTop,
|
|
8
|
+
headingMiddle,
|
|
9
|
+
headingBottom,
|
|
10
|
+
minHeight = `100vh`,
|
|
11
|
+
}) => {
|
|
8
12
|
const titleProps = useSpring({
|
|
9
13
|
from: { opacity: 0, transform: "translate3d(0, -200px, 0)" },
|
|
10
14
|
to: { opacity: 1, transform: "translate3d(0, 0, 0)" },
|
|
@@ -18,19 +22,19 @@ export default props => {
|
|
|
18
22
|
px: [4, 5],
|
|
19
23
|
position: "relative",
|
|
20
24
|
bg: `MainHero`,
|
|
21
|
-
minHeight:
|
|
25
|
+
minHeight: minHeight, // screenHeight
|
|
22
26
|
}}
|
|
23
27
|
>
|
|
24
28
|
<Container>
|
|
25
29
|
<animated.div style={titleProps}>
|
|
26
30
|
<Styled.h1 sx={{ fontSize: [6, 7], fontWeight: `extrabold` }}>
|
|
27
|
-
{
|
|
31
|
+
{headingTop}
|
|
28
32
|
</Styled.h1>
|
|
29
33
|
<Styled.h1 sx={{ fontSize: [6, 7], fontWeight: `extrabold` }}>
|
|
30
|
-
{
|
|
34
|
+
{headingMiddle}
|
|
31
35
|
</Styled.h1>
|
|
32
36
|
<Styled.h1 sx={{ fontSize: [6, 7], fontWeight: `extrabold` }}>
|
|
33
|
-
{
|
|
37
|
+
{headingBottom}
|
|
34
38
|
</Styled.h1>
|
|
35
39
|
<div sx={{ width: [`5/6`, `2/3`] }}>
|
|
36
40
|
<Styled.p sx={{ fontSize: [1, 2], py: 4, lineHeight: 2.5 }}>
|
|
@@ -43,8 +47,6 @@ export default props => {
|
|
|
43
47
|
</animated.div>
|
|
44
48
|
</Container>
|
|
45
49
|
</div>
|
|
46
|
-
|
|
47
|
-
<Wave background="Menu" />
|
|
48
50
|
</React.Fragment>
|
|
49
51
|
)
|
|
50
52
|
}
|
package/src/components/layout.js
CHANGED
|
@@ -4,36 +4,24 @@ import { jsx } from "theme-ui"
|
|
|
4
4
|
import { Link } from "gatsby"
|
|
5
5
|
import isAbsoluteURL from "is-absolute-url"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
display: "inline-block",
|
|
9
|
-
px: 0,
|
|
10
|
-
py: 0,
|
|
11
|
-
color: "primary",
|
|
12
|
-
margin: 3,
|
|
13
|
-
textDecoration: "none",
|
|
14
|
-
borderBottom: `2px solid transparent`,
|
|
15
|
-
lineHeight: 2,
|
|
16
|
-
transition: `all .5s ease-in;`,
|
|
17
|
-
"&.active": {
|
|
18
|
-
borderBottom: `1px solid transparent`,
|
|
19
|
-
borderColor: "secondary",
|
|
20
|
-
color: "secondary",
|
|
21
|
-
cursor: "default",
|
|
22
|
-
},
|
|
23
|
-
"&:hover:not(.active)": {
|
|
24
|
-
borderColor: "primary",
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default ({ href, ...props }) => {
|
|
7
|
+
export default ({ href, type = "basic", ...props }) => {
|
|
29
8
|
const isExternal = isAbsoluteURL(href || "")
|
|
30
9
|
if (isExternal) {
|
|
31
10
|
return (
|
|
32
|
-
<a href={href} sx={styles}>
|
|
11
|
+
<a href={href} sx={props.styles}>
|
|
33
12
|
{props}
|
|
34
13
|
</a>
|
|
35
14
|
)
|
|
36
15
|
}
|
|
37
16
|
const to = props.to || href
|
|
38
|
-
return
|
|
17
|
+
return (
|
|
18
|
+
<Link
|
|
19
|
+
{...props}
|
|
20
|
+
to={to}
|
|
21
|
+
sx={{
|
|
22
|
+
variant: `links.${type}`,
|
|
23
|
+
}}
|
|
24
|
+
activeClassName="active"
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
39
27
|
}
|
|
@@ -29,6 +29,7 @@ const Project = data => {
|
|
|
29
29
|
px: ["1.5rem", "3rem"],
|
|
30
30
|
zIndex: "1",
|
|
31
31
|
position: "relative",
|
|
32
|
+
minHeight: `75vh`, // screenHeight
|
|
32
33
|
}}
|
|
33
34
|
>
|
|
34
35
|
<animated.div style={titleProps}>
|
|
@@ -55,6 +56,12 @@ const Project = data => {
|
|
|
55
56
|
</Container>
|
|
56
57
|
|
|
57
58
|
<Wave background="cBg" />
|
|
59
|
+
|
|
60
|
+
<div sx={{ bg: `mBg` }}>
|
|
61
|
+
<Container>
|
|
62
|
+
<Image fluid={data.laptop.childImageSharp.fluid} sx={{}} />
|
|
63
|
+
</Container>
|
|
64
|
+
</div>
|
|
58
65
|
</React.Fragment>
|
|
59
66
|
)
|
|
60
67
|
}
|
|
@@ -52,6 +52,89 @@ export default merge(
|
|
|
52
52
|
width: `full`,
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
|
+
links: {
|
|
56
|
+
primary: {
|
|
57
|
+
display: "inline-block",
|
|
58
|
+
px: 0,
|
|
59
|
+
py: 0,
|
|
60
|
+
color: "primary",
|
|
61
|
+
margin: 3,
|
|
62
|
+
textDecoration: "none",
|
|
63
|
+
lineHeight: 1.75,
|
|
64
|
+
position: `relative`,
|
|
65
|
+
"&.active": {
|
|
66
|
+
borderBottom: `1px solid transparent`,
|
|
67
|
+
borderColor: "secondary",
|
|
68
|
+
color: "secondary",
|
|
69
|
+
cursor: "default",
|
|
70
|
+
},
|
|
71
|
+
"&::after": {
|
|
72
|
+
content: '""',
|
|
73
|
+
position: "absolute",
|
|
74
|
+
height: "1px",
|
|
75
|
+
width: 0,
|
|
76
|
+
bottom: 0,
|
|
77
|
+
left: 0,
|
|
78
|
+
bg: "primary",
|
|
79
|
+
transition: `all .25s ease-in-out 0s`,
|
|
80
|
+
},
|
|
81
|
+
"&:hover:not(.active)::after": {
|
|
82
|
+
width: `100%`,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
secondary: {
|
|
86
|
+
display: "inline-block",
|
|
87
|
+
px: 0,
|
|
88
|
+
py: 0,
|
|
89
|
+
color: "primary",
|
|
90
|
+
margin: 3,
|
|
91
|
+
textDecoration: "none",
|
|
92
|
+
lineHeight: 1.75,
|
|
93
|
+
position: `relative`,
|
|
94
|
+
"&.active": {
|
|
95
|
+
borderBottom: `1px solid transparent`,
|
|
96
|
+
borderColor: "secondary",
|
|
97
|
+
color: "secondary",
|
|
98
|
+
cursor: "default",
|
|
99
|
+
},
|
|
100
|
+
"&::after": {
|
|
101
|
+
content: '""',
|
|
102
|
+
position: "absolute",
|
|
103
|
+
width: "100%",
|
|
104
|
+
height: "1px",
|
|
105
|
+
bottom: "0",
|
|
106
|
+
left: "0",
|
|
107
|
+
visibility: "hidden",
|
|
108
|
+
transform: "scaleX(0)",
|
|
109
|
+
transition: "all 0.25s ease-in-out 0s",
|
|
110
|
+
bg: "primary",
|
|
111
|
+
},
|
|
112
|
+
"&:hover:not(.active)::after": {
|
|
113
|
+
visibility: "visible",
|
|
114
|
+
transform: "scaleX(1)",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
basic: {
|
|
118
|
+
display: "inline-block",
|
|
119
|
+
px: 0,
|
|
120
|
+
py: 0,
|
|
121
|
+
color: "primary",
|
|
122
|
+
margin: 3,
|
|
123
|
+
textDecoration: "none",
|
|
124
|
+
borderBottom: `2px solid transparent`,
|
|
125
|
+
lineHeight: 2,
|
|
126
|
+
transition: `all .5s ease-in;`,
|
|
127
|
+
"&.active": {
|
|
128
|
+
borderBottom: `1px solid transparent`,
|
|
129
|
+
borderColor: "secondary",
|
|
130
|
+
color: "secondary",
|
|
131
|
+
cursor: "default",
|
|
132
|
+
},
|
|
133
|
+
"&:hover:not(.active)": {
|
|
134
|
+
borderColor: "primary",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
55
138
|
alerts: {
|
|
56
139
|
error: {
|
|
57
140
|
borderRadius: `sm`,
|
|
@@ -7,13 +7,12 @@ export default {
|
|
|
7
7
|
Header: {
|
|
8
8
|
primary: {
|
|
9
9
|
bg: `Menu`,
|
|
10
|
-
|
|
10
|
+
borderBottom: `1px solid transparent`,
|
|
11
11
|
// position: "fixed",
|
|
12
12
|
// top: 0,
|
|
13
13
|
// width: "100%",
|
|
14
14
|
// zIndex: 10,
|
|
15
15
|
// borderColor: `rgb(212, 212, 213)`,
|
|
16
|
-
|
|
17
16
|
// borderColor: `rgb(212, 212, 213)`,
|
|
18
17
|
},
|
|
19
18
|
secondary: {
|
package/src/templates/project.js
CHANGED
|
@@ -3,17 +3,13 @@ import { graphql } from "gatsby"
|
|
|
3
3
|
import Layout from "../components/layout"
|
|
4
4
|
import Project from "../components/project"
|
|
5
5
|
|
|
6
|
-
const ProjectTemplates = ({ data: { projectYaml }
|
|
6
|
+
const ProjectTemplates = ({ data: { projectYaml } }) => {
|
|
7
7
|
const styles = {
|
|
8
8
|
variant: "styles.Header.secondary",
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<Layout
|
|
13
|
-
main={{ ...styles, borderBottom: `inherit` }}
|
|
14
|
-
header={styles}
|
|
15
|
-
location={location}
|
|
16
|
-
>
|
|
12
|
+
<Layout main={{ ...styles, borderBottom: `inherit` }} header={styles}>
|
|
17
13
|
<Project {...projectYaml} />
|
|
18
14
|
</Layout>
|
|
19
15
|
)
|
|
@@ -32,6 +28,13 @@ export const query = graphql`
|
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
30
|
}
|
|
31
|
+
laptop {
|
|
32
|
+
childImageSharp {
|
|
33
|
+
fluid {
|
|
34
|
+
...GatsbyImageSharpFluid_withWebp_tracedSVG
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
`
|