@t2ca/gatsby-theme-showcase 1.0.0 → 1.0.2
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 +27 -5
- package/gatsby-node.js +6 -10
- package/index.js +3 -1
- package/package.json +24 -12
- package/src/components/alert.js +23 -0
- package/src/components/button.js +5 -18
- package/src/components/card.js +23 -0
- package/src/components/cards.js +13 -0
- package/src/components/color-mode-toggle.js +75 -0
- package/src/components/header.js +42 -51
- package/src/components/hero.js +61 -0
- package/src/components/icon.js +15 -0
- package/src/components/layout.js +92 -51
- package/src/components/map-styles-dark.js +32 -0
- package/src/components/menu-button.js +32 -30
- package/src/components/nav-link.js +2 -0
- package/src/components/navigation-mobile.js +74 -0
- package/src/components/project-list.js +4 -5
- package/src/components/project.js +50 -16
- package/src/components/sidebar.js +27 -36
- package/src/gatsby-plugin-theme-ui/colors.js +28 -0
- package/src/gatsby-plugin-theme-ui/index.js +48 -20
- package/src/gatsby-plugin-theme-ui/styles.js +30 -9
- package/src/menu.mdx +1 -0
- package/src/templates/project.js +12 -11
- package/src/templates/projects.js +7 -12
- package/src/assets/moon.png +0 -0
- package/src/assets/sun.png +0 -0
- package/src/components/switch.js +0 -19
- package/src/components/tiles.js +0 -32
|
@@ -6,25 +6,46 @@ export default {
|
|
|
6
6
|
},
|
|
7
7
|
Header: {
|
|
8
8
|
primary: {
|
|
9
|
-
bg: `
|
|
10
|
-
borderBottom: `1px solid transparent`,
|
|
11
|
-
|
|
9
|
+
bg: `Menu`,
|
|
10
|
+
// borderBottom: `1px solid transparent`,
|
|
11
|
+
// position: "fixed",
|
|
12
|
+
// top: 0,
|
|
13
|
+
// width: "100%",
|
|
14
|
+
// zIndex: 10,
|
|
15
|
+
// borderColor: `rgb(212, 212, 213)`,
|
|
16
|
+
|
|
17
|
+
// borderColor: `rgb(212, 212, 213)`,
|
|
12
18
|
},
|
|
13
19
|
secondary: {
|
|
14
20
|
bg: `cBg`,
|
|
15
21
|
borderBottom: `1px solid transparent`,
|
|
22
|
+
// position: "fixed",
|
|
23
|
+
// top: 0,
|
|
24
|
+
// width: "100%",
|
|
25
|
+
// zIndex: 10,
|
|
26
|
+
// borderColor: `rgb(212, 212, 213)`,
|
|
16
27
|
},
|
|
17
28
|
},
|
|
18
29
|
p: {
|
|
19
|
-
fontSize: [
|
|
30
|
+
fontSize: [1],
|
|
20
31
|
},
|
|
21
32
|
h1: {
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
fontSize: [4, 6, 7],
|
|
34
|
+
fontWeight: `bold`,
|
|
24
35
|
},
|
|
25
36
|
h2: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
fontSize: [3, 4, 5],
|
|
38
|
+
fontWeight: `semibold`,
|
|
39
|
+
},
|
|
40
|
+
input: {
|
|
41
|
+
fontSize: [1],
|
|
29
42
|
},
|
|
43
|
+
// project: {
|
|
44
|
+
// primary: {
|
|
45
|
+
// bg: "cBg",
|
|
46
|
+
// },
|
|
47
|
+
// secondary: {
|
|
48
|
+
// bg: "sBg",
|
|
49
|
+
// },
|
|
50
|
+
// },
|
|
30
51
|
}
|
package/src/menu.mdx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- [Showcase](/projects/)
|
package/src/templates/project.js
CHANGED
|
@@ -3,18 +3,14 @@ import { graphql } from "gatsby"
|
|
|
3
3
|
import Layout from "../components/layout"
|
|
4
4
|
import Project from "../components/project"
|
|
5
5
|
|
|
6
|
-
const ProjectTemplates = ({ data: {
|
|
7
|
-
const
|
|
6
|
+
const ProjectTemplates = ({ data: { projectYaml }, location }) => {
|
|
7
|
+
const styles = {
|
|
8
8
|
variant: "styles.Header.secondary",
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const headRoomStyles = {
|
|
12
|
-
borderColor: `rgb(212, 212, 213)`,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
11
|
return (
|
|
16
|
-
<Layout
|
|
17
|
-
<Project {...
|
|
12
|
+
<Layout main={styles} header={styles} location={location}>
|
|
13
|
+
<Project {...projectYaml} />
|
|
18
14
|
</Layout>
|
|
19
15
|
)
|
|
20
16
|
}
|
|
@@ -23,10 +19,15 @@ export default ProjectTemplates
|
|
|
23
19
|
|
|
24
20
|
export const query = graphql`
|
|
25
21
|
query($projectID: String!) {
|
|
26
|
-
|
|
22
|
+
projectYaml(id: { eq: $projectID }) {
|
|
27
23
|
title
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
hero {
|
|
25
|
+
childImageSharp {
|
|
26
|
+
fluid {
|
|
27
|
+
...GatsbyImageSharpFluid_withWebp_tracedSVG
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
`
|
|
@@ -3,34 +3,29 @@ import { graphql, useStaticQuery } from "gatsby"
|
|
|
3
3
|
import Layout from "../components/layout"
|
|
4
4
|
import ProjectList from "../components/project-list"
|
|
5
5
|
|
|
6
|
-
const ProjectsTemplates =
|
|
6
|
+
const ProjectsTemplates = props => {
|
|
7
7
|
const data = useStaticQuery(graphql`
|
|
8
8
|
query {
|
|
9
|
-
|
|
10
|
-
sort: { fields: date, order: ASC }
|
|
11
|
-
filter: { date: { ne: null } }
|
|
12
|
-
) {
|
|
9
|
+
allProjectYaml(sort: { fields: slug, order: ASC }) {
|
|
13
10
|
nodes {
|
|
14
11
|
id
|
|
15
12
|
title
|
|
16
|
-
address
|
|
17
|
-
notes
|
|
18
|
-
date
|
|
19
|
-
dateTime
|
|
20
13
|
slug
|
|
21
14
|
}
|
|
22
15
|
}
|
|
23
16
|
}
|
|
24
17
|
`)
|
|
25
18
|
|
|
26
|
-
const projects = data.
|
|
19
|
+
const projects = data.allProjectYaml.nodes
|
|
27
20
|
|
|
28
21
|
const styles = {
|
|
29
|
-
|
|
22
|
+
bg: `Menu`,
|
|
23
|
+
borderBottom: `1px solid transparent`,
|
|
24
|
+
borderColor: `MenuBorder`,
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
return (
|
|
33
|
-
<Layout
|
|
28
|
+
<Layout header={styles} location={props.location}>
|
|
34
29
|
<ProjectList projects={projects} />
|
|
35
30
|
</Layout>
|
|
36
31
|
)
|
package/src/assets/moon.png
DELETED
|
Binary file
|
package/src/assets/sun.png
DELETED
|
Binary file
|
package/src/components/switch.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import ReactSwitch from "react-switch"
|
|
3
|
-
import { css } from "theme-ui"
|
|
4
|
-
|
|
5
|
-
export const Switch = props => <ReactSwitch {...props} />
|
|
6
|
-
|
|
7
|
-
Switch.defaultProps = {
|
|
8
|
-
checkedIcon: false,
|
|
9
|
-
uncheckedIcon: false,
|
|
10
|
-
height: 24,
|
|
11
|
-
width: 48,
|
|
12
|
-
handleDiameter: 16,
|
|
13
|
-
offColor: `#00bfff`,
|
|
14
|
-
onColor: `#000`,
|
|
15
|
-
|
|
16
|
-
// boxShadow: `inset 0 0 0 1px #000`,
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default Switch
|
package/src/components/tiles.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { ThemeProvider } from "theme-ui"
|
|
3
|
-
|
|
4
|
-
export default props => (
|
|
5
|
-
<ThemeProvider
|
|
6
|
-
theme={{
|
|
7
|
-
styles: {
|
|
8
|
-
ul: {
|
|
9
|
-
listStyle: `none`,
|
|
10
|
-
display: [`block`, `flex`],
|
|
11
|
-
margin: [`0`, `0 -16px`],
|
|
12
|
-
p: 0,
|
|
13
|
-
m: 0,
|
|
14
|
-
},
|
|
15
|
-
li: {
|
|
16
|
-
bg: `cBg`,
|
|
17
|
-
boxShadow: `0 1px 2px 0 rgba(34,36,38,.15)`,
|
|
18
|
-
borderRadius: `.125rem`,
|
|
19
|
-
border: `1px solid rgba(34,36,38,.15)`,
|
|
20
|
-
textAlign: `center`,
|
|
21
|
-
// fontSize: `.875rem`,
|
|
22
|
-
mx: [0, 3],
|
|
23
|
-
mb: 4,
|
|
24
|
-
mt: 2,
|
|
25
|
-
p: 3,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}}
|
|
29
|
-
>
|
|
30
|
-
<div {...props} />
|
|
31
|
-
</ThemeProvider>
|
|
32
|
-
)
|