Skip to content

Commit c66a106

Browse files
committed
simplify tailwind usage
1 parent fa4b84b commit c66a106

File tree

6 files changed

+23
-168
lines changed

6 files changed

+23
-168
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
resources/_gen
22
hugo_stats.json
33
assets/css/output.css
4+
public
45
# Binaries for programs and plugins
56
*.exe
67
*.exe~

assets/css/style.css

+1-131
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,9 @@
1-
/* Custom styling goes here */
2-
3-
.text-4xl {
4-
font-size: 2.25rem;
5-
line-height: 2.5rem;
6-
}
7-
8-
.text-6xl {
9-
font-size: 3.75rem;
10-
line-height: 1rem;
11-
}
12-
13-
.text-7xl {
14-
font-size: 4.5rem;
15-
line-height: 1rem;
16-
}
17-
18-
.text-8xl {
19-
font-size: 6rem;
20-
line-height: 1rem;
21-
}
22-
23-
.text-9xl {
24-
font-size: 8rem;
25-
line-height: 1rem;
26-
}
27-
28-
.font-thin {
29-
font-weight: 100;
30-
}
31-
32-
.font-extralight {
33-
font-weight: 200;
34-
}
35-
36-
.font-light {
37-
font-weight: 300;
38-
}
39-
40-
.font-normal {
41-
font-weight: 400;
42-
}
43-
44-
.font-semibold {
45-
font-weight: 600;
46-
}
47-
48-
.font-extrabold {
49-
font-weight: 800;
50-
}
51-
52-
.font-black {
53-
font-weight: 900;
54-
}
55-
56-
.leading-3 {
57-
line-height: .75rem;
58-
}
59-
60-
.leading-4 {
61-
line-height: 1rem;
62-
}
63-
64-
.leading-5 {
65-
line-height: 1.25rem;
66-
}
67-
68-
.leading-6 {
69-
line-height: 1.5rem;
70-
}
71-
72-
.leading-7 {
73-
line-height: 1.75rem;
74-
}
75-
76-
.leading-8 {
77-
line-height: 2rem;
78-
}
79-
80-
.leading-10 {
81-
line-height: 2.5rem;
82-
}
83-
84-
.leading-none {
85-
line-height: 1;
86-
}
87-
88-
.leading-snug {
89-
line-height: 1.375;
90-
}
91-
92-
.leading-relaxed {
93-
line-height: 1.625;
94-
}
95-
96-
.leading-loose {
97-
line-height: 2;
98-
}
99-
100-
.text-left {
101-
text-align: left;
102-
}
103-
104-
.text-justify {
105-
text-align: justify;
106-
}
107-
108-
.text-slate-50 {
109-
color: #f8fafc;
110-
}
111-
112-
.text-slate-100 {
113-
color: #f1f5f9;
114-
}
115-
116-
.text-slate-400 {
117-
color: #94a3b8;
118-
}
119-
1+
/* Custom styling goes here, if not in the tailwind.config.js theme */
1202

1213
.space-x-20 {
1224
margin-left: 5rem;
1235
}
1246

125-
.w-80 {
126-
width: 20rem;
127-
}
128-
1297
.w-600 {
1308
width: 28rem;
131-
}
132-
133-
.pl-11 {
134-
padding-left: 2.75rem;
135-
}
136-
137-
.pr-4 {
138-
padding-top: 1rem;
1399
}

layouts/partials/cta.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{{ if modBool .i 2 }}
2-
<div class="w-full text-gray-900 bg-gray-400 px-36 my-12 py-12">
3-
{{ else }}
4-
<div class="w-full text-gray-900 bg-white px-36 my-12 py-12">
5-
{{ end }}
2+
<div class="w-full text-gray-900 bg-gray-200 px-36 my-12 py-12">
3+
{{ else }}
4+
<div class="w-full text-gray-900 bg-white px-36 my-12 py-12">
5+
{{ end }}
66
<section class="container mx-auto text-center py-6 mb-12">
77
<h1 class="text-2xl py-4 font-medium">{{ .context.Title }}</h1>
88
{{ .context.Content }}
99
</section>
10-
</div>
10+
</div>

layouts/partials/footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<footer class="text-center p-2 fixed w-full z-30 bottom-0 h-24 bg-gray-400 text-white">
1+
<footer class="text-center p-2 fixed w-full z-30 bottom-0 h-24 bg-gray-200 text-white">
22
The footer is great
33
</footer>

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
"@babel/preset-env": "^7.12.7",
66
"autoprefixer": "^10.0.2",
77
"object-fit-images": "^3.2.4",
8-
"picoapp": "^3.6.2",
98
"postcss-cli": "^8.3.0",
109
"postcss-nested": "^5.0.1",
1110
"postcss-object-fit-images": "^1.1.2",
1211
"postcss-preset-env": "^6.7.0",
13-
"tailwindcss": "^3.0.1"
12+
"tailwindcss": "^3.0.23"
1413
},
1514
"dependencies": {
1615
"postcss": "^8.3.11",
17-
"postcss-scss": "^4.0.2"
16+
"postcss-scss": "^4.0.2",
17+
"tailwindcss": "^3.0.23"
1818
},
1919
"name": "cloudnative-pg",
2020
"description": "",
2121
"version": "1.0.0",
2222
"main": "postcss.config.js",
2323
"scripts": {
24-
"css": "tailwindcss build -i assets/css/main.css -o assets/css/output.css",
24+
"css": "npx tailwindcss build -i assets/css/main.css -o assets/css/output.css",
2525
"prod": "NODE_ENV=production npm run css && hugo server -e production",
2626
"build": "NODE_ENV=production npm run css && hugo -e production",
2727
"dev": "NODE_ENV=development npm run css && hugo server -D -e development --disableFastRender",

tailwind.config.js

+11-27
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,14 @@
1-
const { screens } = require('tailwindcss/defaultTheme')
2-
const colors = require('tailwindcss/colors');
1+
const defaultTheme = require('tailwindcss/defaultTheme')
2+
3+
// https://tailwindcss.com/docs/customizing-colors/#default-color-palette
4+
35
module.exports = {
4-
content: [
5-
"./layouts/**/*.html",
6-
"./content/**/*.md",
7-
"./content/**/*.html",
8-
"./assets/scripts/**/*.js"
9-
],
10-
variants: {},
116
plugins: [],
12-
// colors: colors,
13-
corePlugins: {
14-
textOpacity: false,
15-
float: false,
16-
clear: false,
17-
divideColor: false,
18-
divideOpacity: false,
19-
divideStyle: false,
20-
divideWidth: false,
21-
fontVariantNumeric: false,
22-
placeholderColor: false,
23-
placeholderOpacity: false,
24-
ringColor: false,
25-
ringOffsetColor: false,
26-
ringOffsetWidth: false,
27-
ringOpacity: false,
28-
ringWidth: false
29-
}
7+
theme: {
8+
extend: {}
9+
},
10+
content: [
11+
'./layouts/**/*.{html,js}',
12+
'./assets/**/*.{html,js}',
13+
]
3014
}

0 commit comments

Comments
 (0)