tailwind

Intro Example With Tailwind

This is how my main.go looks like: package main import ( "fmt" "net/http" "github.com/go-chi/chi/v5" "github.com/rabocse/lenslocked/controllers" "github.com/rabocse/lenslocked/templates" "github.com/rabocse/lenslocked/views" ) func main() { r := chi.NewRouter() r.Get("/", controllers.StaticHandler(views.Must(views.ParseFS(templates.FS, "home.gohtml", "tailwind.gohtml")))) r.Get("/contact", controllers.StaticHandler(views.Must(views.ParseFS(templates.FS, "contact.gohtml", "tailwind.gohtml")))) r.Get("/faq", controllers.FAQ(views.Must(views.ParseFS(templates.FS, "faq.gohtml", "tailwind.gohtml")))) r.NotFound(func(w http.ResponseWriter, r *http.Request) { http.Error(w, "Page Not Found", http.StatusNotFound) }) fmt.Println("Starting the server on :3000...") http.ListenAndServe(":3000", r) } Compared to the previous versions, now I am using a tailwind.gohtml instead of the layout-xxxx.gohtml files.