moved styles css from main to handlers

This commit is contained in:
ladddder
2023-12-05 16:39:30 +01:00
parent 7fd2b2b3c3
commit eef6061d93
4 changed files with 26 additions and 313 deletions

1
handlers/styles.css Normal file

File diff suppressed because one or more lines are too long

23
handlers/styles.go Normal file
View File

@@ -0,0 +1,23 @@
package handlers
import (
"embed"
"github.com/gofiber/fiber/v2"
)
//go:embed styles.css
var cssData embed.FS
func Styles(c *fiber.Ctx) error {
cssData, err := cssData.ReadFile("styles.css")
if err != nil {
return c.Status(fiber.StatusInternalServerError).SendString("Internal Server Error")
}
c.Set("Content-Type", "text/css")
return c.Send(cssData)
}