-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
107 lines (101 loc) · 2.13 KB
/
tailwind.config.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
const plugin = require('tailwindcss/plugin')
module.exports = {
content: [
"content/**/*.md",
"layouts/**/*.html",
"assets/js/**/*.js",
"./node_modules/flowbite/**/*.js",
],
theme: {
extend: {
colors: {
azur: azur_colors(),
blue: azur_colors(),
primary: azur_colors(),
},
textShadow: {
sm: '0 1px 2px #000',
DEFAULT: '0 2px 4px #000',
lg: '0 8px 16px #000',
},
},
},
plugins: [
require("@tailwindcss/typography"),
require("flowbite/plugin"),
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{
'text-shadow': (value) => ({
textShadow: value,
}),
},
{ values: theme('textShadow') }
)
}),
],
};
// Azur (blueish) colors for Etheria Magazine. See https://palettte.app for
// further color customizations. 600 variant corresponds to the logo.
function azur_colors() {
let colorsJSON = `
[
{
"paletteName": "azur",
"swatches": [
{
"name": "50",
"color": "f0fbff"
},
{
"name": "100",
"color": "e0f6fe"
},
{
"name": "200",
"color": "baedfd"
},
{
"name": "300",
"color": "7ddafc"
},
{
"name": "400",
"color": "38c8f8"
},
{
"name": "500",
"color": "0eb6e9"
},
{
"name": "600",
"color": "009ed0"
},
{
"name": "700",
"color": "0377a1"
},
{
"name": "800",
"color": "076185"
},
{
"name": "900",
"color": "0c516e"
},
{
"name": "950",
"color": "083449"
}
]
}
]
`;
// transform to tailwind format
return JSON.parse(colorsJSON)
.at(0)
.swatches.reduce(
(acc, item) => ({ ...acc, [item.name]: `#${item.color}` }),
{}
);
}