diff --git a/public/css/index.css b/public/css/index.css
new file mode 100644
index 0000000..e28c912
--- /dev/null
+++ b/public/css/index.css
@@ -0,0 +1,3 @@
+body {
+ text-align: center;
+}
diff --git a/public/html/index.gohtml b/public/html/index.gohtml
index 329c882..ca20955 100644
--- a/public/html/index.gohtml
+++ b/public/html/index.gohtml
@@ -4,9 +4,7 @@
AGECEM
-
+
Association Générale Étudiante du Cégep Édouard-Montpetit
diff --git a/public/public.go b/public/public.go
index 92df5a0..60d9fe6 100644
--- a/public/public.go
+++ b/public/public.go
@@ -2,7 +2,7 @@ package public
import "embed"
-//go:embed html/* scss/* js/*
+//go:embed html/* css/* js/*
var embedFS embed.FS
func GetEmbedFS() embed.FS {
diff --git a/public/scss/index.scss b/public/scss/index.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/server.go b/server.go
index 93861fe..09cebfb 100644
--- a/server.go
+++ b/server.go
@@ -46,6 +46,7 @@ func Execute() {
// HTML Routes
e.GET("/", handleIndex)
+ e.GET("/static/index.css", handleStaticCSSIndex)
e.Logger.Fatal(e.Start(":8080"))
}
@@ -69,3 +70,12 @@ func handleV1(c echo.Context) error {
func handleIndex(c echo.Context) error {
return c.Render(http.StatusOK, "index-html", nil)
}
+
+// CSS Handlers
+
+func handleStaticCSSIndex(c echo.Context) error {
+ // TODO Ajouter gestion d'erreurs
+ // TODO Ajouter support pour fichiers SCSS
+ data, _ := embedFS.ReadFile("css/index.css")
+ return c.Blob(http.StatusOK, "text/css", data)
+}