@t2ca/gatsby-theme-showcase 1.2.3 → 1.2.5
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/gatsby-config.js +0 -16
- package/index.js +0 -2
- package/package.json +2 -5
- package/src/components/color-mode-toggle.js +158 -158
- package/src/components/logo-banner.js +0 -67
package/gatsby-config.js
CHANGED
|
@@ -22,22 +22,6 @@ module.exports = {
|
|
|
22
22
|
},
|
|
23
23
|
`gatsby-plugin-sharp`,
|
|
24
24
|
`gatsby-transformer-sharp`,
|
|
25
|
-
{
|
|
26
|
-
resolve: `gatsby-transformer-remark`,
|
|
27
|
-
options: {
|
|
28
|
-
plugins: [
|
|
29
|
-
{
|
|
30
|
-
resolve: `gatsby-remark-images`,
|
|
31
|
-
options: {
|
|
32
|
-
// It's important to specify the maxWidth (in pixels) of
|
|
33
|
-
// the content container as this plugin uses this as the
|
|
34
|
-
// base for generating different widths of each image.
|
|
35
|
-
maxWidth: 1200,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
25
|
`gatsby-transformer-yaml`,
|
|
42
26
|
`gatsby-transformer-json`,
|
|
43
27
|
`gatsby-plugin-react-helmet`,
|
package/index.js
CHANGED
|
@@ -3,7 +3,5 @@ export { default as Layout } from "./src/components/layout"
|
|
|
3
3
|
export { default as Alert } from "./src/components/alert"
|
|
4
4
|
export { default as Card } from "./src/components/card"
|
|
5
5
|
export { default as Button } from "./src/components/button"
|
|
6
|
-
export { default as LogoBanner } from "./src/components/logo-banner"
|
|
7
6
|
export { default as Wave } from "./src/components/wave"
|
|
8
7
|
export { default as Hero } from "./src/components/hero"
|
|
9
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2ca/gatsby-theme-showcase",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
@@ -28,15 +28,12 @@
|
|
|
28
28
|
"@theme-ui/sidenav": "^0.9.1",
|
|
29
29
|
"@theme-ui/typography": "^0.9.1",
|
|
30
30
|
"framer-motion": "^4.0.0",
|
|
31
|
-
"gatsby": "^3.
|
|
32
|
-
"gatsby-image": "^3.0.0",
|
|
31
|
+
"gatsby": "^3.0.0",
|
|
33
32
|
"gatsby-plugin-react-helmet": "^4.0.0",
|
|
34
33
|
"gatsby-plugin-sharp": "^3.0.0",
|
|
35
34
|
"gatsby-plugin-theme-ui": "^0.9.1",
|
|
36
|
-
"gatsby-remark-images": "^5.0.0",
|
|
37
35
|
"gatsby-source-filesystem": "^3.0.0",
|
|
38
36
|
"gatsby-transformer-json": "^3.0.0",
|
|
39
|
-
"gatsby-transformer-remark": "^4.0.0",
|
|
40
37
|
"gatsby-transformer-sharp": "^3.0.0",
|
|
41
38
|
"gatsby-transformer-yaml": "^3.0.0",
|
|
42
39
|
"react-helmet": "^6.0.0",
|
|
@@ -1,91 +1,91 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useState, useEffect } from "react"
|
|
3
|
-
|
|
3
|
+
import styled from "@emotion/styled"
|
|
4
4
|
import { jsx, useThemeUI } from "theme-ui"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
6
|
+
const IconWrapper = styled.button`
|
|
7
|
+
padding: 0;
|
|
8
|
+
appearance: none;
|
|
9
|
+
outline: none;
|
|
10
|
+
align-items: center;
|
|
11
|
+
background: transparent;
|
|
12
|
+
border-radius: 5px;
|
|
13
|
+
border: 0;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
height: 40px;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
opacity: 0.75;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
position: relative;
|
|
21
|
+
transform: scale(0.75);
|
|
22
|
+
transition: opacity 0.3s ease;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
width: 40px;
|
|
25
|
+
&:hover {
|
|
26
|
+
opacity: 1;
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
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
|
-
|
|
30
|
+
const MoonOrSun = styled.div`
|
|
31
|
+
border: ${(p) => (p.isDark ? `4px` : `2px`)} solid
|
|
32
|
+
${(p) => p.theme.colors.toggleIcon};
|
|
33
|
+
background: ${(p) => p.theme.colors.toggleIcon};
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
height: 24px;
|
|
36
|
+
overflow: ${(p) => (p.isDark ? `visible` : `hidden`)};
|
|
37
|
+
position: relative;
|
|
38
|
+
transform: scale(${(p) => (p.isDark ? 0.55 : 1)});
|
|
39
|
+
transition: all 0.45s ease;
|
|
40
|
+
width: 24px;
|
|
41
|
+
&::before {
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
border: 2px solid ${(p) => p.theme.colors.toggleIcon};
|
|
44
|
+
content: "";
|
|
45
|
+
height: 24px;
|
|
46
|
+
opacity: ${(p) => (p.isDark ? 0 : 1)};
|
|
47
|
+
position: absolute;
|
|
48
|
+
right: -9px;
|
|
49
|
+
top: -9px;
|
|
50
|
+
transform: translate(${(p) => (p.isDark ? `14px, -14px` : `0, 0`)});
|
|
51
|
+
transition: transform 0.45s ease;
|
|
52
|
+
width: 24px;
|
|
53
|
+
}
|
|
54
|
+
&::after {
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
box-shadow: 0 -23px 0 ${(p) => p.theme.colors.toggleIcon},
|
|
57
|
+
0 23px 0 ${(p) => p.theme.colors.toggleIcon},
|
|
58
|
+
23px 0 0 ${(p) => p.theme.colors.toggleIcon},
|
|
59
|
+
-23px 0 0 ${(p) => p.theme.colors.toggleIcon},
|
|
60
|
+
15px 15px 0 ${(p) => p.theme.colors.toggleIcon},
|
|
61
|
+
-15px 15px 0 ${(p) => p.theme.colors.toggleIcon},
|
|
62
|
+
15px -15px 0 ${(p) => p.theme.colors.toggleIcon},
|
|
63
|
+
-15px -15px 0 ${(p) => p.theme.colors.toggleIcon};
|
|
64
|
+
content: "";
|
|
65
|
+
height: 8px;
|
|
66
|
+
left: 50%;
|
|
67
|
+
margin: -4px 0 0 -4px;
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 50%;
|
|
70
|
+
width: 8px;
|
|
71
|
+
transform: scale(${(p) => (p.isDark ? 1 : 0)});
|
|
72
|
+
transition: all 0.35s ease;
|
|
73
|
+
}
|
|
74
|
+
`
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
const MoonMask = styled.div`
|
|
77
|
+
background: ${(p) => p.theme.colors.MoonMask};
|
|
78
|
+
border-radius: 50%;
|
|
79
|
+
border: 0;
|
|
80
|
+
height: 24px;
|
|
81
|
+
opacity: ${(p) => (p.isDark ? 0 : 1)};
|
|
82
|
+
position: absolute;
|
|
83
|
+
right: 0;
|
|
84
|
+
top: 0;
|
|
85
|
+
transform: translate(${(p) => (p.isDark ? `14px, -14px` : `0, 0`)});
|
|
86
|
+
transition: background 0.25s ease, transform 0.45s ease;
|
|
87
|
+
width: 24px;
|
|
88
|
+
`
|
|
89
89
|
|
|
90
90
|
const ColorModeToggle = () => {
|
|
91
91
|
const [hasMounted, setHasMounted] = useState(false)
|
|
@@ -107,84 +107,84 @@ const ColorModeToggle = () => {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
return (
|
|
110
|
-
|
|
111
|
-
// onClick={toggleColorMode}
|
|
112
|
-
// aria-label={isDark ? `Activate light mode` : `Activate dark mode`}
|
|
113
|
-
// title={isDark ? `Activate light mode` : `Activate dark mode`}
|
|
114
|
-
// >
|
|
115
|
-
// <MoonOrSun isDark={isDark} theme={theme} />
|
|
116
|
-
// <MoonMask isDark={isDark} theme={theme} />
|
|
117
|
-
// </IconWrapper>
|
|
118
|
-
|
|
119
|
-
<button
|
|
110
|
+
<IconWrapper
|
|
120
111
|
onClick={toggleColorMode}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
title={isDark ? `Activate Light mode` : `Activate Dark mode`}
|
|
124
|
-
sx={{
|
|
125
|
-
opacity: 0.65,
|
|
126
|
-
position: `relative`,
|
|
127
|
-
borderRadius: `5px`,
|
|
128
|
-
width: `40px`,
|
|
129
|
-
height: `25px`,
|
|
130
|
-
display: `flex`,
|
|
131
|
-
alignItems: `center`,
|
|
132
|
-
justifyContent: `center`,
|
|
133
|
-
transition: `opacity 0.3s ease`,
|
|
134
|
-
border: `none`,
|
|
135
|
-
outline: `none`,
|
|
136
|
-
background: `none`,
|
|
137
|
-
cursor: `pointer`,
|
|
138
|
-
transform: `scale(0.75)`,
|
|
139
|
-
padding: 0,
|
|
140
|
-
appearance: `none`,
|
|
141
|
-
"&:hover, &:focus": { opacity: 1 },
|
|
142
|
-
}}
|
|
112
|
+
aria-label={isDark ? `Activate light mode` : `Activate dark mode`}
|
|
113
|
+
title={isDark ? `Activate light mode` : `Activate dark mode`}
|
|
143
114
|
>
|
|
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
|
-
|
|
115
|
+
<MoonOrSun isDark={isDark} />
|
|
116
|
+
<MoonMask isDark={isDark} />
|
|
117
|
+
</IconWrapper>
|
|
118
|
+
|
|
119
|
+
// <button
|
|
120
|
+
// onClick={toggleColorMode}
|
|
121
|
+
// type="button"
|
|
122
|
+
// aria-label={isDark ? `Activate Light mode` : `Activate Dark mode`}
|
|
123
|
+
// title={isDark ? `Activate Light mode` : `Activate Dark mode`}
|
|
124
|
+
// sx={{
|
|
125
|
+
// opacity: 0.65,
|
|
126
|
+
// position: `relative`,
|
|
127
|
+
// borderRadius: `5px`,
|
|
128
|
+
// width: `40px`,
|
|
129
|
+
// height: `25px`,
|
|
130
|
+
// display: `flex`,
|
|
131
|
+
// alignItems: `center`,
|
|
132
|
+
// justifyContent: `center`,
|
|
133
|
+
// transition: `opacity 0.3s ease`,
|
|
134
|
+
// border: `none`,
|
|
135
|
+
// outline: `none`,
|
|
136
|
+
// background: `none`,
|
|
137
|
+
// cursor: `pointer`,
|
|
138
|
+
// transform: `scale(0.75)`,
|
|
139
|
+
// padding: 0,
|
|
140
|
+
// appearance: `none`,
|
|
141
|
+
// "&:hover, &:focus": { opacity: 1 },
|
|
142
|
+
// }}
|
|
143
|
+
// >
|
|
144
|
+
// <div
|
|
145
|
+
// sx={{
|
|
146
|
+
// position: `relative`,
|
|
147
|
+
// width: `24px`,
|
|
148
|
+
// height: `24px`,
|
|
149
|
+
// borderRadius: `50%`,
|
|
150
|
+
// border: (t) => (isDark ? `4px solid ${t.colors.toggleIcon}` : `none`),
|
|
151
|
+
// backgroundColor: isDark ? `toggleIcon` : `transparent`,
|
|
152
|
+
// transform: isDark ? `scale(0.55)` : `scale(1)`,
|
|
153
|
+
// transition: `all 0.45s ease`,
|
|
154
|
+
// overflow: isDark ? `visible` : `hidden`,
|
|
155
|
+
// boxShadow: (t) =>
|
|
156
|
+
// isDark ? `none` : `inset 8px -8px 0px 0px ${t.colors.toggleIcon}`,
|
|
157
|
+
// "&:before": {
|
|
158
|
+
// content: `""`,
|
|
159
|
+
// position: `absolute`,
|
|
160
|
+
// right: `-9px`,
|
|
161
|
+
// top: `-9px`,
|
|
162
|
+
// height: `24px`,
|
|
163
|
+
// width: `24px`,
|
|
164
|
+
// border: (t) =>
|
|
165
|
+
// isDark ? `2px solid ${t.colors.toggleIcon}` : `none`,
|
|
166
|
+
// borderRadius: `50%`,
|
|
167
|
+
// transform: isDark ? `translate(14px, -14px)` : `translate(0, 0)`,
|
|
168
|
+
// opacity: isDark ? 0 : 1,
|
|
169
|
+
// transition: `transform 0.45s ease`,
|
|
170
|
+
// },
|
|
171
|
+
// "&:after": {
|
|
172
|
+
// content: `""`,
|
|
173
|
+
// width: `8px`,
|
|
174
|
+
// height: `8px`,
|
|
175
|
+
// borderRadius: `50%`,
|
|
176
|
+
// margin: `-4px 0 0 -4px`,
|
|
177
|
+
// position: `absolute`,
|
|
178
|
+
// top: `50%`,
|
|
179
|
+
// left: `50%`,
|
|
180
|
+
// boxShadow: (t) =>
|
|
181
|
+
// `0 -23px 0 ${t.colors.toggleIcon}, 0 23px 0 ${t.colors.toggleIcon}, 23px 0 0 ${t.colors.toggleIcon}, -23px 0 0 ${t.colors.toggleIcon}, 15px 15px 0 ${t.colors.toggleIcon}, -15px 15px 0 ${t.colors.toggleIcon}, 15px -15px 0 ${t.colors.toggleIcon}, -15px -15px 0 ${t.colors.toggleIcon}`,
|
|
182
|
+
// transform: isDark ? `scale(1)` : `scale(0)`,
|
|
183
|
+
// transition: `all 0.35s ease`,
|
|
184
|
+
// },
|
|
185
|
+
// }}
|
|
186
|
+
// />
|
|
187
|
+
// </button>
|
|
188
188
|
)
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { useStaticQuery, graphql } from "gatsby"
|
|
3
|
-
import { jsx } from "theme-ui"
|
|
4
|
-
import Img from "gatsby-image"
|
|
5
|
-
|
|
6
|
-
const LogoBanner = () => {
|
|
7
|
-
const data = useStaticQuery(graphql`
|
|
8
|
-
query {
|
|
9
|
-
allFile(
|
|
10
|
-
filter: {
|
|
11
|
-
extension: { regex: "/(jpg)|(png)|(jpeg)/" }
|
|
12
|
-
relativeDirectory: { eq: "tech-logos" }
|
|
13
|
-
}
|
|
14
|
-
sort: { fields: publicURL }
|
|
15
|
-
) {
|
|
16
|
-
edges {
|
|
17
|
-
node {
|
|
18
|
-
base
|
|
19
|
-
childImageSharp {
|
|
20
|
-
fixed(quality: 75, height: 42, grayscale: true) {
|
|
21
|
-
...GatsbyImageSharpFixed
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`)
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<section
|
|
32
|
-
sx={{
|
|
33
|
-
overflow: ` hidden`,
|
|
34
|
-
padding: 3,
|
|
35
|
-
width: `100%`,
|
|
36
|
-
borderBottom: `1px solid transparent`,
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<div>{/*<div>Technologies we use</div>*/}</div>
|
|
40
|
-
<div
|
|
41
|
-
sx={{
|
|
42
|
-
position: "relative",
|
|
43
|
-
display: "grid",
|
|
44
|
-
gridAutoFlow: "column",
|
|
45
|
-
gridAutoColumns: "auto",
|
|
46
|
-
gridGap: 4,
|
|
47
|
-
alignItems: "center",
|
|
48
|
-
overflowX: "scroll",
|
|
49
|
-
paddingLeft: 2,
|
|
50
|
-
paddingBottom: 1,
|
|
51
|
-
"&::-webkit-scrollbar": { display: "none" },
|
|
52
|
-
}}
|
|
53
|
-
>
|
|
54
|
-
{data.allFile.edges.map(({ node: image }) => (
|
|
55
|
-
<Img
|
|
56
|
-
alt={`${image.base.split(`.`)[0]}`}
|
|
57
|
-
fixed={image.childImageSharp.fixed}
|
|
58
|
-
key={image.base}
|
|
59
|
-
style={{ opacity: 0.5 }}
|
|
60
|
-
/>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
</section>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export default LogoBanner
|