chore: clean up flake and update templ
Signed-off-by: jolheiser <john.olheiser@gmail.com>main
parent
695d1f16e4
commit
472a3ee037
160
flake.lock
160
flake.lock
|
@ -18,6 +18,82 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694529238,
|
||||||
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"templ",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694102001,
|
||||||
|
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gomod2nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"templ",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705314449,
|
||||||
|
"narHash": "sha256-yfQQ67dLejP0FLK76LKHbkzcQqNIrux6MFe32MMFGNQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "gomod2nix",
|
||||||
|
"rev": "30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "gomod2nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705718568,
|
"lastModified": 1705718568,
|
||||||
|
@ -33,33 +109,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1700580516,
|
|
||||||
"narHash": "sha256-h72i6afGKreU+DjpZ6+qersarYYp4YjX+DBQ+MQkOG4=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "a68a81cbc743e84aaee331ae7e58699398dd732d",
|
|
||||||
"revCount": 167,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.jojodev.com/jolheiser/nur"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.jojodev.com/jolheiser/nur"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur",
|
|
||||||
"tailwind-ctp": "tailwind-ctp",
|
"tailwind-ctp": "tailwind-ctp",
|
||||||
"tailwind-ctp-lsp": "tailwind-ctp-lsp"
|
"tailwind-ctp-lsp": "tailwind-ctp-lsp",
|
||||||
|
"templ": "templ"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
@ -77,6 +133,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tailwind-ctp": {
|
"tailwind-ctp": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -116,6 +187,51 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.jojodev.com/jolheiser/tailwind-ctp-intellisense"
|
"url": "https://git.jojodev.com/jolheiser/tailwind-ctp-intellisense"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"templ": {
|
||||||
|
"inputs": {
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"gomod2nix": "gomod2nix",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"xc": "xc"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709917943,
|
||||||
|
"narHash": "sha256-zDQxUFSmG/VX+xtK+nZ3ObRMVcMjjx+EUAxHLNcHHF8=",
|
||||||
|
"owner": "a-h",
|
||||||
|
"repo": "templ",
|
||||||
|
"rev": "df2a32403bb4a8e4745ac10ddc8b3e77386d8045",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "a-h",
|
||||||
|
"repo": "templ",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xc": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"nixpkgs": [
|
||||||
|
"templ",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1703164129,
|
||||||
|
"narHash": "sha256-kCcCqqwvjN07H8FPG4tXsRVRcMqT8dUNt9pwW1kKAe8=",
|
||||||
|
"owner": "joerdav",
|
||||||
|
"repo": "xc",
|
||||||
|
"rev": "0655cccfcf036556aeaddfb8f45dc7e8dd1b3680",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "joerdav",
|
||||||
|
"repo": "xc",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
14
flake.nix
14
flake.nix
|
@ -2,8 +2,8 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs";
|
nixpkgs.url = "github:nixos/nixpkgs";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
nur = {
|
templ = {
|
||||||
url = "git+https://git.jojodev.com/jolheiser/nur";
|
url = "github:a-h/templ";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
tailwind-ctp = {
|
tailwind-ctp = {
|
||||||
|
@ -20,23 +20,23 @@
|
||||||
self,
|
self,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nur,
|
templ,
|
||||||
tailwind-ctp,
|
tailwind-ctp,
|
||||||
tailwind-ctp-lsp,
|
tailwind-ctp-lsp,
|
||||||
} @ inputs:
|
} @ inputs:
|
||||||
flake-utils.lib.eachDefaultSystem (
|
flake-utils.lib.eachDefaultSystem (
|
||||||
system: let
|
system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
nur = inputs.nur.packages.${system};
|
|
||||||
tailwind-ctp = inputs.tailwind-ctp.packages.${system}.default;
|
tailwind-ctp = inputs.tailwind-ctp.packages.${system}.default;
|
||||||
tailwind-ctp-lsp = inputs.tailwind-ctp-lsp.packages.${system}.default;
|
tailwind-ctp-lsp = inputs.tailwind-ctp-lsp.packages.${system}.default;
|
||||||
|
templ = inputs.templ.packages.${system}.templ;
|
||||||
in {
|
in {
|
||||||
packages.default = pkgs.buildGoModule {
|
packages.default = pkgs.buildGoModule {
|
||||||
pname = "jolheiser.com";
|
pname = "jolheiser.com";
|
||||||
version = "site";
|
version = "site";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
vendorHash = "sha256-i/A6k0xaIPuWCfK6pm7TczkRaIWXzAjOGTXLIeDbxRw=";
|
vendorHash = nixpkgs.lib.fileContents ./go.mod.sri;
|
||||||
nativeBuildInputs = [nur.templ tailwind-ctp];
|
nativeBuildInputs = [templ tailwind-ctp];
|
||||||
excludedPackages = ".";
|
excludedPackages = ".";
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
go generate
|
go generate
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
go
|
go
|
||||||
nur.templ
|
templ
|
||||||
tailwind-ctp
|
tailwind-ctp
|
||||||
tailwind-ctp-lsp
|
tailwind-ctp-lsp
|
||||||
vscode-langservers-extracted
|
vscode-langservers-extracted
|
||||||
|
|
4
go.mod
4
go.mod
|
@ -1,9 +1,9 @@
|
||||||
module jolheiser.com
|
module jolheiser.com
|
||||||
|
|
||||||
go 1.20
|
go 1.21
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.jojodev.com/jolheiser/simpleicons v0.0.3
|
git.jojodev.com/jolheiser/simpleicons v0.0.3
|
||||||
github.com/a-h/templ v0.2.334
|
github.com/a-h/templ v0.2.598
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
sha256-SYSzOO6M83uojEalPUe58FqkGYhUQASum9cZs7Kcng4=
|
7
go.sum
7
go.sum
|
@ -1,8 +1,9 @@
|
||||||
git.jojodev.com/jolheiser/simpleicons v0.0.3 h1:R/UEcl6L6wAScHKu/oYyB0jY62inYes56aM91YlTfqE=
|
git.jojodev.com/jolheiser/simpleicons v0.0.3 h1:R/UEcl6L6wAScHKu/oYyB0jY62inYes56aM91YlTfqE=
|
||||||
git.jojodev.com/jolheiser/simpleicons v0.0.3/go.mod h1:NIhFsYI7rALmUX37teVRzf8BJAv1XtZC1OGeVjmB/No=
|
git.jojodev.com/jolheiser/simpleicons v0.0.3/go.mod h1:NIhFsYI7rALmUX37teVRzf8BJAv1XtZC1OGeVjmB/No=
|
||||||
github.com/a-h/templ v0.2.334 h1:/mKupkgHGeSSeC0KiGRvmUoRGQJuku9VGVhRP1CeWgY=
|
github.com/a-h/templ v0.2.598 h1:6jMIHv6wQZvdPxTuv87erW4RqN/FPU0wk7ZHN5wVuuo=
|
||||||
github.com/a-h/templ v0.2.334/go.mod h1:6Lfhsl3Z4/vXl7jjEjkJRCqoWDGjDnuKgzjYMDSddas=
|
github.com/a-h/templ v0.2.598/go.mod h1:SA7mtYwVEajbIXFRh3vKdYm/4FYyLQAtPH1+KxzGPA8=
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
|
Binary file not shown.
236
site_templ.go
236
site_templ.go
|
@ -1,5 +1,6 @@
|
||||||
// Code generated by templ@(devel) DO NOT EDIT.
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
|
// templ: version: v0.2.608
|
||||||
package main
|
package main
|
||||||
|
|
||||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||||
|
@ -10,35 +11,26 @@ import "io"
|
||||||
import "bytes"
|
import "bytes"
|
||||||
|
|
||||||
func head() templ.Component {
|
func head() templ.Component {
|
||||||
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
|
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||||
templBuffer, templIsBuffer := w.(*bytes.Buffer)
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||||
if !templIsBuffer {
|
if !templ_7745c5c3_IsBuffer {
|
||||||
templBuffer = templ.GetBuffer()
|
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||||
defer templ.ReleaseBuffer(templBuffer)
|
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||||
}
|
}
|
||||||
ctx = templ.InitializeContext(ctx)
|
ctx = templ.InitializeContext(ctx)
|
||||||
var_1 := templ.GetChildren(ctx)
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||||
if var_1 == nil {
|
if templ_7745c5c3_Var1 == nil {
|
||||||
var_1 = templ.NopComponent
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, err = templBuffer.WriteString("<head><title>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<head><title>jolheiser</title><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><link rel=\"shortcut icon\" href=\"https://www.gravatar.com/avatar/7f4dd86f017ff289cf05a013e22357ef253d1ed6a52bdefca8f965af1080a965?s=16\"><meta name=\"author\" content=\"jolheiser\"><link rel=\"stylesheet\" href=\"styles.css\"></head>")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var_2 := `jolheiser`
|
if !templ_7745c5c3_IsBuffer {
|
||||||
_, err = templBuffer.WriteString(var_2)
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("</title><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><link rel=\"shortcut icon\" href=\"https://www.gravatar.com/avatar/7f4dd86f017ff289cf05a013e22357ef253d1ed6a52bdefca8f965af1080a965?s=16\"><meta name=\"author\" content=\"jolheiser\"><link rel=\"stylesheet\" href=\"styles.css\"></head>")
|
return templ_7745c5c3_Err
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if !templIsBuffer {
|
|
||||||
_, err = templBuffer.WriteTo(w)
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,128 +39,150 @@ func fill(hex string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func body(links []Link) templ.Component {
|
func body(links []Link) templ.Component {
|
||||||
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
|
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||||
templBuffer, templIsBuffer := w.(*bytes.Buffer)
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||||
if !templIsBuffer {
|
if !templ_7745c5c3_IsBuffer {
|
||||||
templBuffer = templ.GetBuffer()
|
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||||
defer templ.ReleaseBuffer(templBuffer)
|
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||||
}
|
}
|
||||||
ctx = templ.InitializeContext(ctx)
|
ctx = templ.InitializeContext(ctx)
|
||||||
var_3 := templ.GetChildren(ctx)
|
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
|
||||||
if var_3 == nil {
|
if templ_7745c5c3_Var2 == nil {
|
||||||
var_3 = templ.NopComponent
|
templ_7745c5c3_Var2 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, err = templBuffer.WriteString("<body class=\"latte dark:mocha bg-base\"><header class=\"relative w-full pt-16 pb-10\"><img class=\"mx-auto rounded-full\" alt=\"avatar\" src=\"https://www.gravatar.com/avatar/7f4dd86f017ff289cf05a013e22357ef253d1ed6a52bdefca8f965af1080a965?s=125\"><p class=\"mt-2 text-xl text-center text-lavender\">")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<body class=\"latte dark:mocha bg-base\"><header class=\"relative w-full pt-16 pb-10\"><img class=\"mx-auto rounded-full\" alt=\"avatar\" src=\"https://www.gravatar.com/avatar/7f4dd86f017ff289cf05a013e22357ef253d1ed6a52bdefca8f965af1080a965?s=125\"><p class=\"mt-2 text-xl text-center text-lavender\">")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var var_4 string = `@`
|
var templ_7745c5c3_Var3 string
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(var_4))
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(`@`)
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 22, Col: 58}
|
||||||
}
|
}
|
||||||
var_5 := `jolheiser`
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||||
_, err = templBuffer.WriteString(var_5)
|
if templ_7745c5c3_Err != nil {
|
||||||
if err != nil {
|
return templ_7745c5c3_Err
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("</p></header><nav class=\"relative max-w-screen-sm mx-auto\">")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("jolheiser</p></header><nav class=\"relative max-w-screen-sm mx-auto\">")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
for _, link := range links {
|
for _, link := range links {
|
||||||
_, err = templBuffer.WriteString("<a 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\" href=\"")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a 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\" href=\"")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var var_6 templ.SafeURL = templ.SafeURL(link.URL)
|
var templ_7745c5c3_Var4 templ.SafeURL = templ.SafeURL(link.URL)
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(string(var_6)))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var4)))
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("\" rel=\"me noopener noreferrer\" title=\"")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" rel=\"me noopener noreferrer\" title=\"")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(link.Name))
|
var templ_7745c5c3_Var5 string
|
||||||
if err != nil {
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(link.Name)
|
||||||
return err
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 314}
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("\" target=\"_blank\"><svg class=\"absolute left-5 w-10 h-10\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var var_7 string = link.Icon().Title
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" target=\"_blank\"><svg class=\"absolute left-5 w-10 h-10\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>")
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(var_7))
|
if templ_7745c5c3_Err != nil {
|
||||||
if err != nil {
|
return templ_7745c5c3_Err
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("</title><path fill=\"")
|
var templ_7745c5c3_Var6 string
|
||||||
if err != nil {
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(link.Icon().Title)
|
||||||
return err
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 464}
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(fill(link.Icon().Hex)))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("\" d=\"")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><path fill=\"")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(link.Icon().Path))
|
var templ_7745c5c3_Var7 string
|
||||||
if err != nil {
|
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(fill(link.Icon().Hex))
|
||||||
return err
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 508}
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("\"></path></svg><span>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var var_8 string = link.Name
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" d=\"")
|
||||||
_, err = templBuffer.WriteString(templ.EscapeString(var_8))
|
if templ_7745c5c3_Err != nil {
|
||||||
if err != nil {
|
return templ_7745c5c3_Err
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("</span></a>")
|
var templ_7745c5c3_Var8 string
|
||||||
if err != nil {
|
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(link.Icon().Path)
|
||||||
return err
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 531}
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"></path></svg><span>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var9 string
|
||||||
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(link.Name)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 564}
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</span></a>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_, err = templBuffer.WriteString("</nav></body>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</nav></body>")
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
if !templIsBuffer {
|
if !templ_7745c5c3_IsBuffer {
|
||||||
_, err = templBuffer.WriteTo(w)
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||||
}
|
}
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func index(links []Link) templ.Component {
|
func index(links []Link) templ.Component {
|
||||||
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
|
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||||
templBuffer, templIsBuffer := w.(*bytes.Buffer)
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||||
if !templIsBuffer {
|
if !templ_7745c5c3_IsBuffer {
|
||||||
templBuffer = templ.GetBuffer()
|
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||||
defer templ.ReleaseBuffer(templBuffer)
|
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||||
}
|
}
|
||||||
ctx = templ.InitializeContext(ctx)
|
ctx = templ.InitializeContext(ctx)
|
||||||
var_9 := templ.GetChildren(ctx)
|
templ_7745c5c3_Var10 := templ.GetChildren(ctx)
|
||||||
if var_9 == nil {
|
if templ_7745c5c3_Var10 == nil {
|
||||||
var_9 = templ.NopComponent
|
templ_7745c5c3_Var10 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
err = head().Render(ctx, templBuffer)
|
templ_7745c5c3_Err = head().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
err = body(links).Render(ctx, templBuffer)
|
templ_7745c5c3_Err = body(links).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
if err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
if !templIsBuffer {
|
if !templ_7745c5c3_IsBuffer {
|
||||||
_, err = templBuffer.WriteTo(w)
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||||
}
|
}
|
||||||
return err
|
return templ_7745c5c3_Err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue