-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.js
108 lines (104 loc) · 2.28 KB
/
theme.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { extendTheme } from "@chakra-ui/react";
import { mode } from "@chakra-ui/theme-tools";
const colors = {
yellow: {
50: "#fffef6",
100: "#fef7b9",
200: "#fff189",
300: "#ffeb5a",
400: "#ffe635",
500: "#e6cc26",
600: "#b39f1d",
700: "#807113",
800: "#4d4407",
900: "#1a1700",
},
};
const styles = {
global: (props) => {
return {
body: {
bg: mode("yellow.50", "gray.800")(props),
},
".user-content": {
">": {
"h2, p, ul, blockquote, figure": {
marginBottom: props.theme.space[4],
},
},
ul: {
marginInlineStart: props.theme.space[10],
listStyleType: "square",
},
"figure img": {
borderRadius: props.theme.radii.md,
},
figcaption: {
textAlign: "center",
},
".blocks-gallery-grid": {
marginInlineStart: 0,
},
".wp-block-image, .wp-block-image figure": {
marginTop: 0,
marginBottom: 0,
},
".wp-block-image img": {
marginBottom: 2,
borderRadius: props.theme.radii.md,
},
[`@media screen and (max-width: ${props.theme.breakpoints.sm})`]: {
".blocks-gallery-item": {
width: "100%",
marginRight: 0,
},
},
[`@media screen and (max-width: ${props.theme.breakpoints.md})`]: {
"figure.alignleft": {
width: "100%",
marginRight: 0,
},
img: {
width: "100%",
},
},
},
};
},
};
const components = {
Link: {
baseStyle: {
textUnderlineOffset: "6px",
_hover: {
textDecorationThickness: "2px",
},
_focus: {
textDecoration: "underline",
textDecorationThickness: "2px",
boxShadow: "none",
},
},
},
Button: {
variants: {
link: {
color: "gray.800",
textUnderlineOffset: "6px",
_hover: {
textDecorationThickness: "2px",
},
_focus: {
textDecoration: "underline",
textDecorationThickness: "2px",
boxShadow: "none",
},
},
},
},
};
export default extendTheme({
components,
colors,
styles,
});