@t2ca/gatsby-theme-showcase 1.0.10 → 1.0.12
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2ca/gatsby-theme-showcase",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
@@ -23,23 +23,22 @@
|
|
|
23
23
|
"react-dom": "^16.9.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@emotion/core": "^10.0.14",
|
|
27
26
|
"@emotion/styled": "^10.0.17",
|
|
28
27
|
"@hot-loader/react-dom": "^16.9.0",
|
|
29
28
|
"@mdx-js/mdx": "^1.4.0",
|
|
30
|
-
"@
|
|
31
|
-
"@theme-ui/components": "^0.
|
|
32
|
-
"@theme-ui/preset-bootstrap": "^0.
|
|
33
|
-
"@theme-ui/preset-tailwind": "^0.
|
|
34
|
-
"@theme-ui/sidenav": "^0.
|
|
35
|
-
"@theme-ui/typography": "^0.
|
|
29
|
+
"@theme-ui/color-modes": "^0.3.0-alpha.4",
|
|
30
|
+
"@theme-ui/components": "^0.3.0-alpha.4",
|
|
31
|
+
"@theme-ui/preset-bootstrap": "^0.3.0-alpha.4",
|
|
32
|
+
"@theme-ui/preset-tailwind": "^0.3.0-alpha.4",
|
|
33
|
+
"@theme-ui/sidenav": "^0.3.0-alpha.4",
|
|
34
|
+
"@theme-ui/typography": "^0.3.0-alpha.4",
|
|
36
35
|
"deepmerge": "^4.0.0",
|
|
37
36
|
"gatsby": "^2.13.3",
|
|
38
37
|
"gatsby-image": "^2.2.7",
|
|
39
38
|
"gatsby-plugin-emotion": "^4.1.2",
|
|
40
39
|
"gatsby-plugin-mdx": "^1.0.33",
|
|
41
40
|
"gatsby-plugin-sharp": "^2.2.9",
|
|
42
|
-
"gatsby-plugin-theme-ui": "^0.
|
|
41
|
+
"gatsby-plugin-theme-ui": "^0.3.0-alpha.4",
|
|
43
42
|
"gatsby-remark-images": "^3.1.7",
|
|
44
43
|
"gatsby-source-filesystem": "^2.1.4",
|
|
45
44
|
"gatsby-transformer-json": "^2.2.2",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"react-spring": "^8.0.27",
|
|
52
51
|
"react-switch": "^5.0.0",
|
|
53
52
|
"remark-slug": "^5.1.2",
|
|
54
|
-
"theme-ui": "^0.
|
|
53
|
+
"theme-ui": "^0.3.0-alpha.4"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
56
|
"build": "gatsby build",
|
package/src/components/footer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from "react"
|
|
3
|
-
import { jsx,
|
|
3
|
+
import { jsx, Flex, Container } from "theme-ui"
|
|
4
4
|
|
|
5
5
|
export default ({ name }) => {
|
|
6
6
|
return (
|
|
7
|
-
<
|
|
7
|
+
<Flex sx={{ backgroundColor: "#1b1c1d", color: "white" }}>
|
|
8
8
|
<Container sx={{ px: 3, py: 4 }}>{name}</Container>
|
|
9
|
-
</
|
|
9
|
+
</Flex>
|
|
10
10
|
)
|
|
11
11
|
}
|
package/src/components/header.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from "react"
|
|
3
3
|
import { Link } from "gatsby"
|
|
4
|
-
import { jsx,
|
|
4
|
+
import { jsx, Container, Flex } from "theme-ui"
|
|
5
5
|
|
|
6
6
|
import MenuButton from "./menu-button"
|
|
7
7
|
import NavLink from "./nav-link"
|
|
@@ -9,10 +9,10 @@ import ColorModeToggle from "./color-mode-toggle"
|
|
|
9
9
|
|
|
10
10
|
export default ({ setMenuOpen, styles, menuOpen, nav, name, menuList }) => {
|
|
11
11
|
return (
|
|
12
|
-
<
|
|
12
|
+
<Flex
|
|
13
13
|
sx={{ ...styles, position: `fixed`, zIndex: `100`, width: `100%`, py: 2 }}
|
|
14
14
|
>
|
|
15
|
-
<Container sx={{ py: 0 }}>
|
|
15
|
+
<Container sx={{ py: 0, px: `2rem` }}>
|
|
16
16
|
<div
|
|
17
17
|
sx={{
|
|
18
18
|
display: `flex`,
|
|
@@ -21,7 +21,6 @@ export default ({ setMenuOpen, styles, menuOpen, nav, name, menuList }) => {
|
|
|
21
21
|
}}
|
|
22
22
|
>
|
|
23
23
|
<MenuButton
|
|
24
|
-
disabled={menuOpen}
|
|
25
24
|
onClick={e => {
|
|
26
25
|
setMenuOpen(!menuOpen)
|
|
27
26
|
// if (!props.menuOpen) return props.setMenuOpen(!props.menuOpen)
|
|
@@ -64,6 +63,6 @@ export default ({ setMenuOpen, styles, menuOpen, nav, name, menuList }) => {
|
|
|
64
63
|
</div>
|
|
65
64
|
</div>
|
|
66
65
|
</Container>
|
|
67
|
-
</
|
|
66
|
+
</Flex>
|
|
68
67
|
)
|
|
69
68
|
}
|
package/src/components/layout.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useState, useRef } from "react"
|
|
3
|
-
import {
|
|
4
|
-
jsx,
|
|
5
|
-
Layout as DefaultLayout,
|
|
6
|
-
Main,
|
|
7
|
-
Styled,
|
|
8
|
-
useColorMode,
|
|
9
|
-
} from "theme-ui"
|
|
3
|
+
import { jsx, Styled, useColorMode } from "theme-ui"
|
|
10
4
|
import { Global } from "@emotion/core"
|
|
11
5
|
|
|
12
6
|
import {
|
|
@@ -53,97 +47,85 @@ const Layout = ({ header, main, location, children }) => {
|
|
|
53
47
|
|
|
54
48
|
return (
|
|
55
49
|
<Styled.root>
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
html: {
|
|
70
|
-
fontSize: `16px`,
|
|
71
|
-
boxSizing: `border-box`,
|
|
72
|
-
WebkitFontSmoothing: `antialiased`,
|
|
73
|
-
MozOsxFontSmoothing: `grayscale`,
|
|
74
|
-
},
|
|
75
|
-
".mapElement > div": {
|
|
76
|
-
backgroundColor: "transparent !important",
|
|
77
|
-
},
|
|
78
|
-
}}
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
<Header
|
|
82
|
-
styles={header}
|
|
83
|
-
menuOpen={menuOpen}
|
|
84
|
-
setMenuOpen={setMenuOpen}
|
|
85
|
-
nav={nav}
|
|
86
|
-
/>
|
|
50
|
+
<Global
|
|
51
|
+
styles={{
|
|
52
|
+
body: { margin: 0 },
|
|
53
|
+
html: {
|
|
54
|
+
fontSize: `16px`,
|
|
55
|
+
WebkitFontSmoothing: `antialiased`,
|
|
56
|
+
MozOsxFontSmoothing: `grayscale`,
|
|
57
|
+
},
|
|
58
|
+
".mapElement > div": {
|
|
59
|
+
backgroundColor: "transparent !important",
|
|
60
|
+
},
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
87
63
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
onBlur={e => {
|
|
95
|
-
setMenuOpen(false)
|
|
96
|
-
}}
|
|
97
|
-
onClick={e => {
|
|
98
|
-
setMenuOpen(false)
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
<Sidebar
|
|
102
|
-
open={menuOpen}
|
|
103
|
-
sx={{
|
|
104
|
-
display: [null, "none"],
|
|
105
|
-
}}
|
|
106
|
-
/>
|
|
107
|
-
</div>
|
|
64
|
+
<Header
|
|
65
|
+
styles={header}
|
|
66
|
+
menuOpen={menuOpen}
|
|
67
|
+
setMenuOpen={setMenuOpen}
|
|
68
|
+
nav={nav}
|
|
69
|
+
/>
|
|
108
70
|
|
|
109
|
-
|
|
71
|
+
<div>
|
|
72
|
+
<div
|
|
73
|
+
ref={nav}
|
|
74
|
+
onFocus={e => {
|
|
75
|
+
setMenuOpen(true)
|
|
76
|
+
}}
|
|
77
|
+
onBlur={e => {
|
|
78
|
+
setMenuOpen(false)
|
|
79
|
+
}}
|
|
80
|
+
onClick={e => {
|
|
81
|
+
setMenuOpen(false)
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<Sidebar
|
|
85
|
+
open={menuOpen}
|
|
110
86
|
sx={{
|
|
111
|
-
|
|
112
|
-
pt: `4.75rem`,
|
|
87
|
+
display: [null, "none"],
|
|
113
88
|
}}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div
|
|
93
|
+
sx={{
|
|
94
|
+
...main,
|
|
95
|
+
pt: `4.75rem`,
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
{children}
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
118
101
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
102
|
+
{location && location.pathname === "/contact/" ? (
|
|
103
|
+
<div sx={{ display: ["none", "initial"] }}>
|
|
104
|
+
<WrapperMap
|
|
105
|
+
googleMapURL={`https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=AIzaSyBOY0sT1quks122bprrLM_0wrWLDWyVnMQ`}
|
|
106
|
+
loadingElement={<div sx={{ height: `350px` }} />}
|
|
107
|
+
containerElement={
|
|
108
|
+
<div
|
|
109
|
+
sx={{
|
|
110
|
+
height: `350px`,
|
|
111
|
+
backgroundColor: colorMode === "light" ? "#f8f9fa" : "#333",
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
114
|
+
}
|
|
115
|
+
mapElement={
|
|
116
|
+
<div
|
|
117
|
+
sx={{
|
|
118
|
+
height: `100%`,
|
|
119
|
+
}}
|
|
120
|
+
className="mapElement"
|
|
121
|
+
/>
|
|
122
|
+
}
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
) : null}
|
|
143
126
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
</DefaultLayout>
|
|
127
|
+
<Footer />
|
|
128
|
+
<MobileNavigation />
|
|
147
129
|
</Styled.root>
|
|
148
130
|
)
|
|
149
131
|
}
|
|
@@ -10,8 +10,8 @@ export default merge(
|
|
|
10
10
|
{
|
|
11
11
|
// breakpoints: ["768px", "992px", "1200px"],
|
|
12
12
|
breakpoints: ["768px", "1024px", "1280px"],
|
|
13
|
-
initialColorMode: `light`,
|
|
14
|
-
useCustomProperties: true,
|
|
13
|
+
// initialColorMode: `light`,
|
|
14
|
+
// useCustomProperties: true,
|
|
15
15
|
textStyles: {
|
|
16
16
|
heading: {
|
|
17
17
|
fontFamily: "heading",
|