parent
82a84f0c62
commit
16603d9f93
|
@ -2,7 +2,7 @@
|
|||
|
||||
My [personal website](https://jolheiser.com).
|
||||
|
||||
Uses [tailwind](https://tailwindcss.com/) (with [catppuccin btw](https://github.com/catppuccin/tailwindcss)) and [templ](https://github.com/a-h/templ) as a simple static page generator.
|
||||
Uses [tailwind](https://tailwindcss.com/) (with [catppuccin btw](https://github.com/catppuccin/tailwindcss)) and [gomponents](https://gomponents.com) as a simple static page generator.
|
||||
|
||||
Links are sourced from [links.jsonnet](links.jsonnet).
|
||||
|
||||
|
@ -18,7 +18,6 @@ If nix isn't available:
|
|||
|
||||
#### Build Deps
|
||||
- [Go](https://go.dev)
|
||||
- [templ](https://github.com/a-h/templ)
|
||||
- [tailwind-ctp](https://git.jojodev.com/jolheiser/tailwind-ctp) (TailwindCSS standalone CLI with Catppuccin support)
|
||||
|
||||
#### Dev Deps
|
||||
|
|
139
flake.lock
139
flake.lock
|
@ -18,82 +18,6 @@
|
|||
"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": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gomod2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"templ",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722589758,
|
||||
"narHash": "sha256-sbbA8b6Q2vB/t/r1znHawoXLysCyD4L/6n6/RykiSnA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "gomod2nix",
|
||||
"rev": "4e08ca09253ef996bd4c03afa383b23e35fe28a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "gomod2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1728680019,
|
||||
|
@ -114,8 +38,7 @@
|
|||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"tailwind-ctp": "tailwind-ctp",
|
||||
"tailwind-ctp-lsp": "tailwind-ctp-lsp",
|
||||
"templ": "templ"
|
||||
"tailwind-ctp-lsp": "tailwind-ctp-lsp"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -133,21 +56,6 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -187,51 +95,6 @@
|
|||
"type": "git",
|
||||
"url": "https://git.jojodev.com/jolheiser/tailwind-ctp-intellisense"
|
||||
}
|
||||
},
|
||||
"templ": {
|
||||
"inputs": {
|
||||
"gitignore": "gitignore",
|
||||
"gomod2nix": "gomod2nix",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"xc": "xc"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728028863,
|
||||
"narHash": "sha256-NEkcOnjMN+fI9/Lejy6As3/Cd0rxqU4c4Dwt7OYiiLM=",
|
||||
"owner": "a-h",
|
||||
"repo": "templ",
|
||||
"rev": "318249d145b66fe1d66e34abf2321c86e1dfbc52",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "a-h",
|
||||
"repo": "templ",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xc": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": [
|
||||
"templ",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724404748,
|
||||
"narHash": "sha256-p6rXzNiDm2uBvO1MLzC5pJp/0zRNzj/snBzZI0ce62s=",
|
||||
"owner": "joerdav",
|
||||
"repo": "xc",
|
||||
"rev": "960ff9f109d47a19122cfb015721a76e3a0f23a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "joerdav",
|
||||
"repo": "xc",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -2,10 +2,6 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
templ = {
|
||||
url = "github:a-h/templ";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
tailwind-ctp = {
|
||||
url = "git+https://git.jojodev.com/jolheiser/tailwind-ctp";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -16,27 +12,28 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
flake-utils,
|
||||
nixpkgs,
|
||||
templ,
|
||||
tailwind-ctp,
|
||||
tailwind-ctp-lsp,
|
||||
}@inputs:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
tailwind-ctp = inputs.tailwind-ctp.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 {
|
||||
pname = "jolheiser.com";
|
||||
version = "site";
|
||||
src = ./.;
|
||||
vendorHash = nixpkgs.lib.fileContents ./go.mod.sri;
|
||||
nativeBuildInputs = [templ tailwind-ctp];
|
||||
nativeBuildInputs = [ tailwind-ctp ];
|
||||
excludedPackages = ".";
|
||||
postBuild = ''
|
||||
go generate
|
||||
|
@ -46,7 +43,6 @@
|
|||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
go
|
||||
templ
|
||||
tailwind-ctp
|
||||
tailwind-ctp-lsp
|
||||
vscode-langservers-extracted
|
||||
|
|
2
go.mod
2
go.mod
|
@ -4,8 +4,8 @@ go 1.21
|
|||
|
||||
require (
|
||||
git.jojodev.com/jolheiser/simpleicons v0.0.3
|
||||
github.com/a-h/templ v0.2.778
|
||||
github.com/google/go-jsonnet v0.20.0
|
||||
maragu.dev/gomponents v1.0.0
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
|
@ -1 +1 @@
|
|||
sha256-LCjIObTQdTuKwkM+0DESmaC5gWlbX8rGQkL1hn6Iy8Q=
|
||||
sha256-e8dPVJnc7J9+9xGo+l1ccCzyF+iqOEGyRhRmdazmgCQ=
|
6
go.sum
6
go.sum
|
@ -1,9 +1,5 @@
|
|||
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=
|
||||
github.com/a-h/templ v0.2.778 h1:VzhOuvWECrwOec4790lcLlZpP4Iptt5Q4K9aFxQmtaM=
|
||||
github.com/a-h/templ v0.2.778/go.mod h1:lq48JXoUvuQrU0VThrK31yFwdRjTCnIE5bcPCM9IP1w=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-jsonnet v0.20.0 h1:WG4TTSARuV7bSm4PMB4ohjxe33IHT5WVTrJSU33uT4g=
|
||||
github.com/google/go-jsonnet v0.20.0/go.mod h1:VbgWF9JX7ztlv770x/TolZNGGFfiHEVx9G6ca2eUmeA=
|
||||
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
||||
|
@ -12,5 +8,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
|
|||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
maragu.dev/gomponents v1.0.0 h1:eeLScjq4PqP1l+r5z/GC+xXZhLHXa6RWUWGW7gSfLh4=
|
||||
maragu.dev/gomponents v1.0.0/go.mod h1:oEDahza2gZoXDoDHhw8jBNgH+3UR5ni7Ur648HORydM=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
|
4
main.go
4
main.go
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
|
@ -25,7 +24,6 @@ var tailwindCSS = `
|
|||
@tailwind utilities;
|
||||
`
|
||||
|
||||
//go:generate templ generate
|
||||
//go:generate go run .
|
||||
//go:generate tailwind-ctp -i ./dist/styles.css -o ./dist/styles.css --minify
|
||||
func main() {
|
||||
|
@ -52,7 +50,7 @@ func main() {
|
|||
}
|
||||
defer html.Close()
|
||||
|
||||
err = index(links.Links).Render(context.Background(), html)
|
||||
err = index(links.Links).Render(html)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
g "maragu.dev/gomponents"
|
||||
c "maragu.dev/gomponents/components"
|
||||
h "maragu.dev/gomponents/html"
|
||||
)
|
||||
|
||||
func index(links []Link) g.Node {
|
||||
return c.HTML5(c.HTML5Props{
|
||||
Title: "jolheiser",
|
||||
Head: []g.Node{
|
||||
// title, charset, and viewport are already set by HTML5
|
||||
h.Link(h.Rel("shortcut icon"), h.Href("https://www.gravatar.com/avatar/7f4dd86f017ff289cf05a013e22357ef253d1ed6a52bdefca8f965af1080a965?s=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.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"),
|
||||
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),
|
||||
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)),
|
||||
),
|
||||
h.Span(g.Text(link.Name)),
|
||||
)
|
||||
}),
|
||||
),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func ViewBox(minX, minY, width, height int) g.Node {
|
||||
return g.Attr("viewBox", fmt.Sprintf("%d %d %d %d", minX, minY, width, height))
|
||||
}
|
||||
|
||||
func XMLNS() g.Node {
|
||||
return g.Attr("xmlns", "http://www.w3.org/2000/svg")
|
||||
}
|
||||
|
||||
func Path(children ...g.Node) g.Node {
|
||||
return g.El("path", children...)
|
||||
}
|
||||
|
||||
func Fill(fill string) g.Node {
|
||||
return g.Attr("fill", fill)
|
||||
}
|
||||
|
||||
func D(d string) g.Node {
|
||||
return g.Attr("d", d)
|
||||
}
|
36
site.templ
36
site.templ
|
@ -1,36 +0,0 @@
|
|||
package main
|
||||
|
||||
templ head() {
|
||||
<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>
|
||||
}
|
||||
|
||||
func fill(hex string) string {
|
||||
return "#" + hex
|
||||
}
|
||||
|
||||
templ body(links []Link) {
|
||||
<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">{ `@` }jolheiser</p>
|
||||
</header>
|
||||
<nav class="relative max-w-screen-sm mx-auto">
|
||||
for _, link := range links {
|
||||
<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.SafeURL(link.URL) } rel="me noopener noreferrer" title={ link.Name } 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>{ link.Icon().Title }</title><path fill={ fill(link.Icon().Hex) } d={ link.Icon().Path }></path></svg><span>{ link.Name }</span></a>
|
||||
}
|
||||
</nav>
|
||||
</body>
|
||||
}
|
||||
|
||||
templ index(links []Link) {
|
||||
@head()
|
||||
@body(links)
|
||||
}
|
||||
|
203
site_templ.go
203
site_templ.go
|
@ -1,203 +0,0 @@
|
|||
// Code generated by templ - DO NOT EDIT.
|
||||
|
||||
// templ: version: v0.2.786
|
||||
package main
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func head() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var1 == nil {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, 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 templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func fill(hex string) string {
|
||||
return "#" + hex
|
||||
}
|
||||
|
||||
func body(links []Link) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var2 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var2 == nil {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, 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 templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(`@`)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 22, Col: 58}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("jolheiser</p></header><nav class=\"relative max-w-screen-sm mx-auto\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, link := range links {
|
||||
_, 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 templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var4 templ.SafeURL = templ.SafeURL(link.URL)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var4)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" rel=\"me noopener noreferrer\" title=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, 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: 314}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, 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>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(link.Icon().Title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 464}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><path fill=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(fill(link.Icon().Hex))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `site.templ`, Line: 26, Col: 508}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" d=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(link.Icon().Path)
|
||||
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
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</nav></body>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
func index(links []Link) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||
return templ_7745c5c3_CtxErr
|
||||
}
|
||||
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||
if !templ_7745c5c3_IsBuffer {
|
||||
defer func() {
|
||||
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err == nil {
|
||||
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||
}
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Var10 := templ.GetChildren(ctx)
|
||||
if templ_7745c5c3_Var10 == nil {
|
||||
templ_7745c5c3_Var10 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
templ_7745c5c3_Err = head().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = body(links).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
return templ_7745c5c3_Err
|
||||
})
|
||||
}
|
||||
|
||||
var _ = templruntime.GeneratedTemplate
|
|
@ -1,6 +1,6 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ["./dist/*.html", "*.templ"],
|
||||
content: ["./dist/*.html"],
|
||||
plugins: [require("@catppuccin/tailwindcss")],
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue