Séparer templates de public/ -> templates/
Séparer embedFS en publicFS et templatesFS
This commit is contained in:
parent
129e8fbf1b
commit
2eee1f2fd2
14 changed files with 26 additions and 9 deletions
|
@ -1,14 +0,0 @@
|
|||
{{ 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 }}
|
|
@ -1,14 +0,0 @@
|
|||
{{ 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 }}
|
|
@ -1,28 +0,0 @@
|
|||
{{ define "admin-upload-html" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>AGECEM</title>
|
||||
{{ template "general-html" }}
|
||||
</head>
|
||||
<body>
|
||||
{{ template "header-html" }}
|
||||
<h1>Upload</h1>
|
||||
<form action="/admin/documents/upload" method="post" enctype="multipart/form-data">
|
||||
<label for="bucket">Type de document:</label>
|
||||
|
||||
<select name="bucket" id="bucket">
|
||||
<option value="proces-verbaux">Procès verbaux</option>
|
||||
<option value="politiques-et-reglements">Politiques et Règlements</option>
|
||||
</select>
|
||||
<br>
|
||||
Document: <input type="file" name="document">
|
||||
<br>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<p>{{ .Message }}</p>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
|
@ -1,17 +0,0 @@
|
|||
{{ define "admin-html" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>AGECEM</title>
|
||||
{{ template "general-html" }}
|
||||
</head>
|
||||
<body>
|
||||
{{ template "header-html" }}
|
||||
<h1>Admin</h1>
|
||||
<ul>
|
||||
<li><a href="/admin/documents/upload">Ajout de document</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
|
@ -1,26 +0,0 @@
|
|||
{{ 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>
|
||||
<p>
|
||||
{{ range . }}
|
||||
{{ $bucket_name := .Name }}
|
||||
<h2>{{ $bucket_name }}</h2>
|
||||
|
||||
<ul>
|
||||
{{ range .Documents }}
|
||||
<li> <a href="/public/documentation/{{ $bucket_name }}/{{ . }}">{{ . }}</a></li>
|
||||
{{ end}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
|
@ -1,14 +0,0 @@
|
|||
{{ 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 }}
|
|
@ -1,3 +0,0 @@
|
|||
{{ define "general-html" }}
|
||||
<link rel="stylesheet" href="/static/general.css">
|
||||
{{ end }}
|
|
@ -1,16 +0,0 @@
|
|||
{{ define "header-html" }}
|
||||
|
||||
<ul>
|
||||
<li><a href="/">index</a></li>
|
||||
<li><a href="/a-propos">À propos</a></li>
|
||||
<li><a href="/actualite">Actualité</a></li>
|
||||
<li><a href="/vie-etudiante">Vie étudiante</a></li>
|
||||
<li><a href="/documentation">Documentation</a></li>
|
||||
<li><a href="/formulaires">Formulaires</a></li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li><a href="/admin">admin</a></li>
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
|
@ -1,15 +0,0 @@
|
|||
{{ define "index-html" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>AGECEM</title>
|
||||
{{ template "general-html" }}
|
||||
<link rel="stylesheet" href="static/index.css">
|
||||
</head>
|
||||
<body>
|
||||
{{ template "header-html" }}
|
||||
<h1>Association Générale Étudiante du Cégep Édouard-Montpetit</h1>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
|
@ -1,14 +0,0 @@
|
|||
{{ 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 }}
|
|
@ -2,9 +2,9 @@ package public
|
|||
|
||||
import "embed"
|
||||
|
||||
//go:embed html/* css/* js/*
|
||||
var embedFS embed.FS
|
||||
//go:embed css/*.css js/*.js
|
||||
var publicFS embed.FS
|
||||
|
||||
func GetEmbedFS() embed.FS {
|
||||
return embedFS
|
||||
func GetPublicFS() embed.FS {
|
||||
return publicFS
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue