add:projects page

This commit is contained in:
kokopi-dev
2026-03-09 01:27:59 +09:00
parent c5c49f07e9
commit 59c4b153f8
3 changed files with 75 additions and 0 deletions

19
main.go
View File

@@ -6,6 +6,7 @@ import (
"net/http"
"os"
"os/signal"
"personal-site/constants"
"personal-site/handlers"
"personal-site/pages"
"syscall"
@@ -22,6 +23,24 @@ func setupRoutesAndMiddleware() *gin.Engine {
page := pages.Index()
page.Render(c.Request.Context(), c.Writer)
})
var projects = []constants.Project{
{
Url: "https://derrickgee.dev/projects/support-tickets",
Name: "Project One",
Description: "A simple Go Gin + Templ app demonstrating the project pattern.",
TechTags: []string{"Typescript", "Javascript", "React", "Express"},
},
{
Url: "https://derrickgee.dev/projects/support-tickets",
Name: "Project Two",
Description: "A simple Go Gin + Templ app demonstrating the project pattern.",
TechTags: []string{"Go", "Bash"},
},
}
r.GET("/projects", func(c *gin.Context) {
page := pages.ProjectPage(projects)
page.Render(c.Request.Context(), c.Writer)
})
r.NoRoute(handlers.NotFoundHandler)
return r
}