Ajouter render pour routes principales #29
6 changed files with 75 additions and 5 deletions
14
public/html/a-propos.gohtml
Normal file
14
public/html/a-propos.gohtml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{ define "a-propos-html" }}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>AGECEM | À propos</title>
|
||||||
|
{{ template "general-html" }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ template "header-html" }}
|
||||||
|
<h1>À propos</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{ end }}
|
14
public/html/actualite.gohtml
Normal file
14
public/html/actualite.gohtml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{ define "actualite-html" }}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>AGECEM | Actualité</title>
|
||||||
|
{{ template "general-html" }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ template "header-html" }}
|
||||||
|
<h1>Actualité</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{ end }}
|
14
public/html/documentation.gohtml
Normal file
14
public/html/documentation.gohtml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{ define "documentation-html" }}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>AGECEM | Documentation</title>
|
||||||
|
{{ template "general-html" }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ template "header-html" }}
|
||||||
|
<h1>Documentation</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{ end }}
|
14
public/html/formulaires.gohtml
Normal file
14
public/html/formulaires.gohtml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{ define "formulaires-html" }}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>AGECEM | Formulaires</title>
|
||||||
|
{{ template "general-html" }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ template "header-html" }}
|
||||||
|
<h1>Formulaires</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{ end }}
|
14
public/html/vie-etudiante.gohtml
Normal file
14
public/html/vie-etudiante.gohtml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{ define "vie-etudiante-html" }}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>AGECEM | Vie étudiante</title>
|
||||||
|
{{ template "general-html" }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ template "header-html" }}
|
||||||
|
<h1>Vie étudiante</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{ end }}
|
10
server.go
10
server.go
|
@ -92,11 +92,11 @@ func handleIndex(c echo.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAPropos(c echo.Context) error {
|
func handleAPropos(c echo.Context) error {
|
||||||
return c.String(http.StatusOK, "À Propos")
|
return c.Render(http.StatusOK, "a-propos-html", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleActualite(c echo.Context) error {
|
func handleActualite(c echo.Context) error {
|
||||||
return c.String(http.StatusOK, "Actualité")
|
return c.Render(http.StatusOK, "actualite-html", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleActualiteArticle(c echo.Context) error {
|
func handleActualiteArticle(c echo.Context) error {
|
||||||
|
@ -104,17 +104,17 @@ func handleActualiteArticle(c echo.Context) error {
|
||||||
return c.String(http.StatusOK, fmt.Sprintf("Article: %s", article))
|
return c.String(http.StatusOK, fmt.Sprintf("Article: %s", article))
|
||||||
}
|
}
|
||||||
func handleVieEtudiante(c echo.Context) error {
|
func handleVieEtudiante(c echo.Context) error {
|
||||||
return c.String(http.StatusOK, "Vie Étudiante")
|
return c.Render(http.StatusOK, "vie-etudiante-html", nil)
|
||||||
}
|
}
|
||||||
func handleVieEtudianteOrganisme(c echo.Context) error {
|
func handleVieEtudianteOrganisme(c echo.Context) error {
|
||||||
organisme := c.Param("organisme")
|
organisme := c.Param("organisme")
|
||||||
return c.String(http.StatusOK, fmt.Sprintf("Organisme: %s", organisme))
|
return c.String(http.StatusOK, fmt.Sprintf("Organisme: %s", organisme))
|
||||||
}
|
}
|
||||||
func handleDocumentation(c echo.Context) error {
|
func handleDocumentation(c echo.Context) error {
|
||||||
return c.String(http.StatusOK, "Documentation")
|
return c.Render(http.StatusOK, "documentation-html", nil)
|
||||||
}
|
}
|
||||||
func handleFormulaires(c echo.Context) error {
|
func handleFormulaires(c echo.Context) error {
|
||||||
return c.String(http.StatusOK, "Formulaires")
|
return c.Render(http.StatusOK, "formulaires-html", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSS Handlers
|
// CSS Handlers
|
||||||
|
|
Loading…
Reference in a new issue