Home

jolheiser.com @main - refs - log -
-
https://git.jolheiser.com/jolheiser.com.git
my website
tree log patch
update to tailwind v4 Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQLaxRz1zde/WPpCvZFJGmb717cQB4quUHaP+QhKt4Yl+84D4+S48s0BSb0uRWtZSQ1 Ufa2SMRtVHlzdoHd9E0As= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
5 days ago
5 changed files, 13 additions(+), 34 deletions(-)
flake.lockflake.nixmain.gosite.gotailwind.config.js
M flake.lockflake.lock
 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
diff --git a/flake.lock b/flake.lock
index 43b34a70f2dd490b351bb3bd66311533532bee78..f89538c39cf694f5c54a43ee8e3a349e4dad5dc7 100644
--- a/flake.lock
+++ b/flake.lock
@@ -18,11 +18,11 @@       }
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1695806987,
-        "narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=",
+        "lastModified": 1753399495,
+        "narHash": "sha256-7XG/QBqhrYOyA2houjRTL2NMa7IKZZ/somBqr+Q/6Wo=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57",
+        "rev": "0d00f23f023b7215b3f1035adb5247c8ec180dbc",
         "type": "github"
       },
       "original": {
@@ -60,11 +60,11 @@       "inputs": {
         "nixpkgs": "nixpkgs_2"
       },
       "locked": {
-        "lastModified": 1695841587,
-        "narHash": "sha256-fgiZd5AV+hi8Ne0bJ8SyAx5nppseW4aXJQEIDSr0VNA=",
+        "lastModified": 1753803577,
+        "narHash": "sha256-sE5IgsHacXmfsWJjVVPvb7Aa6oHElt+nfP6+3Pqa414=",
         "ref": "refs/heads/main",
-        "rev": "afca060674b20e0ccecde2d6fe88c887790219a5",
-        "revCount": 1,
+        "rev": "4ce9431cbb4e9e5dceadfbc413fbd34e7305fe8e",
+        "revCount": 3,
         "type": "git",
         "url": "https://git.jolheiser.com/tailwind-ctp"
       },
M flake.nixflake.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
diff --git a/flake.nix b/flake.nix
index c7e940181b4239d9cc36027852258e77eb879569..dd88259907bbc4b8385cf61324a3f433c1d5b26b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -30,7 +30,7 @@         );
     in
     {
       overlays.default = final: prev: {
-        tailwind-ctp = inputs.tailwind-ctp.packages.${prev.system}.default;
+        tailwind-ctp = inputs.tailwind-ctp.packages.${prev.system}.v4;
         tailwind-ctp-lsp = inputs.tailwind-ctp-lsp.packages.${prev.system}.default;
       };
       packages = forAllSystems (
M main.gomain.go
 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
diff --git a/main.go b/main.go
index 7301df3a263c5d868e9e50a9436ac1d829666d19..7df11bc4eb3f97e1006b84faf55a4c24b350570e 100644
--- a/main.go
+++ b/main.go
@@ -18,14 +18,8 @@ func (l Link) Icon() simpleicons.Icon {
 	return simpleicons.Icons[l.IconName]
 }
 
-var tailwindCSS = `
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-`
-
 //go:generate go run .
-//go:generate tailwind-ctp -i ./dist/styles.css -o ./dist/styles.css --minify
+//go:generate tailwind-ctp-mocha -o ./dist/styles.css --minify
 func main() {
 	var links struct {
 		Links []Link `json:"links"`
@@ -52,15 +46,6 @@ 	defer html.Close()
 
 	err = index(links.Links).Render(html)
 	if err != nil {
-		panic(err)
-	}
-
-	css, err := os.Create("dist/styles.css")
-	if err != nil {
-		panic(err)
-	}
-	defer css.Close()
-	if _, err := css.WriteString(tailwindCSS); err != nil {
 		panic(err)
 	}
 }
M site.gosite.go
 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
diff --git a/site.go b/site.go
index 738c3800df00d194a6a1d87ba8d08b462bdaf04b..7e640c57a0f674a2106133deae85092e4827534c 100644
--- a/site.go
+++ b/site.go
@@ -22,16 +22,16 @@ 			h.Meta(h.Name("author"), h.Content("jolheiser")),
 			h.Link(h.Rel("stylesheet"), h.Href("styles.css")),
 		},
 		Body: []g.Node{
-			h.Class("latte dark:mocha bg-base"),
+			h.Class("bg-ctp-base"),
 			h.Header(h.Class("relative w-full pt-16 pb-10"),
 				h.Img(h.Class("mx-auto rounded-full"), h.Alt("avatar"), h.Src("https://www.gravatar.com/avatar/7f4dd86f017ff289cf05a013e22357ef253d1ed6a52bdefca8f965af1080a965?s=125")),
-				h.P(h.Class("mt-2 text-xl text-center text-lavender"),
+				h.P(h.Class("mt-2 text-xl text-center text-ctp-lavender"),
 					g.Text("@jolheiser"),
 				),
 			),
 			h.Nav(h.Class("relative max-w-screen-sm mx-auto"),
 				g.Map(links, func(link Link) g.Node {
-					return h.A(h.Class("flex relative px-3 py-2 my-6 h-16 text-lg items-center justify-center text-text bg-surface0 cursor-pointer rounded border-solid border-2 border-overlay0 hover:bg-surface2 hover:border-lavender hover:text-blue transition"), h.Title(link.Name), h.Target("_blank"), h.Href(link.URL),
+					return h.A(h.Class("flex relative px-3 py-2 my-6 h-16 text-lg items-center justify-center text-ctp-text bg-ctp-surface0 cursor-pointer rounded border-solid border-2 border-overlay0 hover:bg-ctp-surface2 hover:border-ctp-lavender hover:text-ctp-blue transition"), h.Title(link.Name), h.Target("_blank"), h.Href(link.URL),
 						h.SVG(h.Class("absolute left-5 w-10 h-10"), h.Role("img"), ViewBox(0, 0, 24, 24), XMLNS(),
 							h.Title(link.Icon().Title),
 							Path(Fill("#"+link.Icon().Hex), D(link.Icon().Path)),
@@ -42,7 +42,7 @@ 				}),
 			),
 			h.Footer(h.Class("relative w-full max-w-screen-sm mx-auto mt-10 pb-8 text-center"),
 				h.Div(h.Class("flex justify-center items-center"),
-					h.Div(h.Class("bg-surface2 p-3 rounded w-1/5"),
+					h.Div(h.Class("bg-ctp-surface2 p-3 rounded w-1/5"),
 						g.Raw(qr),
 					),
 				),
D tailwind.config.js
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/tailwind.config.js b/tailwind.config.js
deleted file mode 100644
index 840ef08d281085ff048be30b84f20a932f9c8e16..0000000000000000000000000000000000000000
--- a/tailwind.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/** @type {import('tailwindcss').Config} */
-module.exports = {
-  content: ["./dist/*.html"],
-  plugins: [require("@catppuccin/tailwindcss")],
-}
-