Application de l'autoformat sur les templates html

This commit is contained in:
Alexel 2024-09-16 16:07:38 -04:00
parent cb2aedc7ff
commit fc7f861cc5
11 changed files with 398 additions and 380 deletions

View file

@ -1,41 +1,40 @@
{{ define "admin-upload-html" }} {{ define "admin-upload-html" }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head>
<meta charset="utf-8"> <head>
<title>AGECEM</title> <meta charset="utf-8">
{{ template "general-html" }} <title>AGECEM</title>
<link rel="stylesheet" href="/public/css/admin-upload.css"> {{ template "general-html" }}
</head> <link rel="stylesheet" href="/public/css/admin-upload.css">
<body> </head>
{{ template "header-html" }}
<div class="wrapper adminUploadWrapper"> <body>
<h1 class="heading1">Ajouter un document</h1> {{ template "header-html" }}
<form class="form adminUploadForm" action="/admin/documents/upload" method="post" enctype="multipart/form-data"> <div class="wrapper adminUploadWrapper">
<div class="formContent"> <h1 class="heading1">Ajouter un document</h1>
<div class="formDocUploadDiv"> <form class="form adminUploadForm" action="/admin/documents/upload" method="post" enctype="multipart/form-data">
<p class="formLabel">Document à téléverser</p> <div class="formContent">
<input class="formDocUpload" <div class="formDocUploadDiv">
type="file" <p class="formLabel">Document à téléverser</p>
name="documents" <input class="formDocUpload" type="file" name="documents"
accept="application/pdf,.md,text/markdown;charset=UTF-8,text/plain" accept="application/pdf,.md,text/markdown;charset=UTF-8,text/plain" multiple />
multiple </div>
/> <div class="formSelectDiv">
</div> <label class="formLabel" for="bucket">Type de document</label>
<div class="formSelectDiv"> <select class="formSelect" name="bucket" id="bucket">
<label class="formLabel" for="bucket">Type de document</label> {{ range .Data.Buckets }}
<select class="formSelect" name="bucket" id="bucket"> <option class="formOption" value="{{ .Name }}">{{ .DisplayName }}</option>
{{ range .Data.Buckets }} {{ end }}
<option class="formOption" value="{{ .Name }}">{{ .DisplayName }}</option> </select>
{{ end }} </div>
</select>
</div>
</div>
<input class="formSubmit" type="submit" value="Ajouter le document">
</form>
<p class="confirmationMessage">{{ .Message }}</p>
</div> </div>
{{ template "footer-html" }} <input class="formSubmit" type="submit" value="Ajouter le document">
</body> </form>
</html> <p class="confirmationMessage">{{ .Message }}</p>
{{ end }} </div>
{{ template "footer-html" }}
</body>
</html>
{{ end }}

View file

@ -1,21 +1,24 @@
{{ define "admin-html" }} {{ define "admin-html" }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head>
<meta charset="utf-8"> <head>
<title>AGECEM</title> <meta charset="utf-8">
{{ template "general-html" }} <title>AGECEM</title>
<link rel="stylesheet" href="/public/css/admin.css"> {{ template "general-html" }}
</head> <link rel="stylesheet" href="/public/css/admin.css">
<body> </head>
{{ template "header-html" }}
<div class="wrapper adminWrapper"> <body>
<h1 class="heading1">Admin</h1> {{ template "header-html" }}
<div class="adminOptions"> <div class="wrapper adminWrapper">
<button class="adminOption" onclick="location.href = '/admin/documents/upload'">Ajout de documents</a> <h1 class="heading1">Admin</h1>
</div> <div class="adminOptions">
</div> <button class="adminOption" onclick="location.href = '/admin/documents/upload'">Ajout de documents</a>
{{ template "footer-html" }} </div>
</body> </div>
</html> {{ template "footer-html" }}
{{ end }} </body>
</html>
{{ end }}

View file

@ -1,40 +1,45 @@
{{ define "documentation-html" }} {{ define "documentation-html" }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head>
<meta charset="utf-8"> <head>
<title>AGECEM | Documentation</title> <meta charset="utf-8">
<link rel="stylesheet" href="/public/css/documentation.css"> <title>AGECEM | Documentation</title>
{{ template "general-html" }} <link rel="stylesheet" href="/public/css/documentation.css">
</head> {{ template "general-html" }}
<body> </head>
{{ template "header-html" }}
<div class="wrapper documentationWrapper"> <body>
<h1 class="heading1">Documentation</h1> {{ template "header-html" }}
<p> <div class="wrapper documentationWrapper">
{{ if not .Data.Buckets }} <h1 class="heading1">Documentation</h1>
Documentation non-accessible pour l'instant, merci de votre patience <p>
{{ else }} {{ if not .Data.Buckets }}
{{ range .Data.Buckets }} Documentation non-accessible pour l'instant, merci de votre patience
{{ $bucket_name := .Name }} {{ else }}
{{ $bucket_display_name := .DisplayName }} {{ range .Data.Buckets }}
<details class="documentationCategorie"> {{ $bucket_name := .Name }}
<summary class="documentationDescription">{{ $bucket_display_name }}</summary> {{ $bucket_display_name := .DisplayName }}
<ul class="documentationListe"> <details class="documentationCategorie">
{{ range .Documents }} <summary class="documentationDescription">{{ $bucket_display_name }}</summary>
<a class ="documentationLien" href="/public/documentation/{{ $bucket_name }}/{{ . }}"><li class="documentationDocument">{{ . }}</li></a> <ul class="documentationListe">
{{ end}} {{ range .Documents }}
</ul> <a class="documentationLien" href="/public/documentation/{{ $bucket_name }}/{{ . }}">
</details> <li class="documentationDocument">{{ . }}</li>
{{ end }} </a>
{{ end }} {{ end}}
</p> </ul>
<p> </details>
{{ .Message }} {{ end }}
</p> {{ end }}
</div> </p>
<!-- {{ template "snackbar-html" }} --> <p>
{{ template "footer-html" }} {{ .Message }}
</body> </p>
</html> </div>
{{ end }} <!-- {{ template "snackbar-html" }} -->
{{ template "footer-html" }}
</body>
</html>
{{ end }}

View file

@ -1,10 +1,10 @@
{{ define "footer-html" }} {{ define "footer-html" }}
<footer class="pageFooter"> <footer class="pageFooter">
<small> <small>
<ul> <ul>
<li><a href="/public/images/header_agecem.png">en-tête de documents</a></li> <li><a href="/public/images/header_agecem.png">en-tête de documents</a></li>
<li><a href="/admin">panneau d'administration</a></li> <li><a href="/admin">panneau d'administration</a></li>
</ul> </ul>
</small> </small>
</footer> </footer>
{{ end }} {{ end }}

View file

@ -1,15 +1,18 @@
{{ define "formulaires-html" }} {{ define "formulaires-html" }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head>
<meta charset="utf-8"> <head>
<title>AGECEM | Formulaires</title> <meta charset="utf-8">
{{ template "general-html" }} <title>AGECEM | Formulaires</title>
</head> {{ template "general-html" }}
<body> </head>
{{ template "header-html" }}
<h1 class="heading1">Formulaires</h1> <body>
{{ template "footer-html" }} {{ template "header-html" }}
</body> <h1 class="heading1">Formulaires</h1>
</html> {{ template "footer-html" }}
{{ end }} </body>
</html>
{{ end }}

View file

@ -1,11 +1,11 @@
{{ define "general-html" }} {{ define "general-html" }}
<link rel="stylesheet" href="/public/css/general.css"> <link rel="stylesheet" href="/public/css/general.css">
<link rel="stylesheet" href="/public/css/fonts.css"> <link rel="stylesheet" href="/public/css/fonts.css">
<link rel="stylesheet" href="/public/css/header.css"> <link rel="stylesheet" href="/public/css/header.css">
<script> <script>
function onToggleNav() { function onToggleNav() {
var menu = document.querySelector(".headerMenuMobile"); var menu = document.querySelector(".headerMenuMobile");
menu.classList.toggle('nav-is-active'); menu.classList.toggle('nav-is-active');
} }
</script> </script>
{{ end }} {{ end }}

View file

@ -1,12 +1,13 @@
{{ define "header-html" }} {{ define "header-html" }}
<div class="header"> <div class="header">
<div class="wrapper headerWrapper"> <div class="wrapper headerWrapper">
<a class="headerLink" href="/"><img class="headerMenuLogo" src="/public/icones/agecem-logo.svg"></img></a> <a class="headerLink" href="/"><img class="headerMenuLogo" src="/public/icones/agecem-logo.svg"></img></a>
<ul class="headerMenu"> <ul class="headerMenu">
<li class="headerMenuElement"><a class="headerMenuElementLink" href="/vie-etudiante">Vie étudiante</a></li> <li class="headerMenuElement"><a class="headerMenuElementLink" href="/vie-etudiante">Vie étudiante</a></li>
<li class="headerMenuElement"><a class="headerMenuElementLink" href="/documentation">Documentation</a></li> <li class="headerMenuElement"><a class="headerMenuElementLink" href="/documentation">Documentation</a></li>
<li class="headerMenuElement"><a class="headerMenuElementLink" href="/proces-verbaux">Procès-Verbaux</a></li> <li class="headerMenuElement"><a class="headerMenuElementLink" href="/proces-verbaux">Procès-Verbaux</a>
<!--<li class="headerMenuElement"><a class="headerMenuElementLink" href="/admin">admin</a></li>--!> </li>
<!--<li class="headerMenuElement"><a class="headerMenuElementLink" href="/admin">admin</a></li>--!>
</ul> </ul>
<img class="headerMenuHamburger" src="/public/icones/hamburger-menu.svg" onclick="onToggleNav()"></img> <img class="headerMenuHamburger" src="/public/icones/hamburger-menu.svg" onclick="onToggleNav()"></img>
</div> </div>
@ -17,4 +18,4 @@
<!--<li class="headerMenuElement"><a class="headerMenuElementLink" href="/admin">admin</a></li>--!> <!--<li class="headerMenuElement"><a class="headerMenuElementLink" href="/admin">admin</a></li>--!>
</ul> </ul>
</div> </div>
{{ end }} {{ end }}

View file

@ -44,4 +44,4 @@
</body> </body>
</html> </html>
{{ end }} {{ end }}

View file

@ -1,19 +1,23 @@
{{ define "procesverbaux-html" }} {{ define "procesverbaux-html" }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head>
<meta charset="utf-8"> <head>
<title>AGECEM | Procès-Verbaux</title> <meta charset="utf-8">
{{ template "general-html" }} <title>AGECEM | Procès-Verbaux</title>
<link rel="stylesheet" href="/public/css/proces-verbaux.css"> {{ template "general-html" }}
</head> <link rel="stylesheet" href="/public/css/proces-verbaux.css">
<body> </head>
{{ template "header-html" }}
<div class="wrapper"> <body>
<h1 class="heading1">Procès-Verbaux</h1> {{ template "header-html" }}
<p class="procesVerbauxP">Les procès-verbaux des différentes instances de l'AGECEM sont disponibles sur demande à la permanence au local B-31 ou par courriel à permanence@agecem.org</p> <div class="wrapper">
</div> <h1 class="heading1">Procès-Verbaux</h1>
{{ template "footer-html" }} <p class="procesVerbauxP">Les procès-verbaux des différentes instances de l'AGECEM sont disponibles sur demande
</body> à la permanence au local B-31 ou par courriel à permanence@agecem.org</p>
</html> </div>
{{ end }} {{ template "footer-html" }}
</body>
</html>
{{ end }}

View file

@ -1,15 +1,15 @@
{{ define "snackbar-html" }} {{ define "snackbar-html" }}
<link rel="stylesheet" href="/public/css/snackbar.css"> <link rel="stylesheet" href="/public/css/snackbar.css">
<script> <script>
function closeSnackbar() { function closeSnackbar() {
var snackbar = document.querySelector(".snackbar"); var snackbar = document.querySelector(".snackbar");
snackbar.classList.add('snackbar-is-closed'); snackbar.classList.add('snackbar-is-closed');
} }
</script> </script>
<div class="snackbar"> <div class="snackbar">
<div class="wrapper snackbarWrapper"> <div class="wrapper snackbarWrapper">
<span class="snackbarTexte">Ce site web est présentement en construction.</span> <span class="snackbarTexte">Ce site web est présentement en construction.</span>
<img src="/public/icones/fermer.svg" class="snackbarFermer" onclick="closeSnackbar()"></img> <img src="/public/icones/fermer.svg" class="snackbarFermer" onclick="closeSnackbar()"></img>
</div>
</div> </div>
</div>
{{ end }} {{ end }}

View file

@ -1,210 +1,213 @@
{{ define "vie-etudiante-html" }} {{ define "vie-etudiante-html" }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head>
<meta charset="utf-8"> <head>
<title>AGECEM | Vie étudiante</title> <meta charset="utf-8">
{{ template "general-html" }} <title>AGECEM | Vie étudiante</title>
<link rel="stylesheet" href="/public/css/vie-etudiante.css"> {{ template "general-html" }}
</head> <link rel="stylesheet" href="/public/css/vie-etudiante.css">
<body> </head>
{{ template "header-html" }}
<div class="wrapper vieEtudianteWrapper"> <body>
<h1 class="heading1">Vie étudiante</h1> {{ template "header-html" }}
<h2 class="heading2">Organismes thématiques</h2> <div class="wrapper vieEtudianteWrapper">
<table class="table"> <h1 class="heading1">Vie étudiante</h1>
<tr class="tableRowHeading"> <h2 class="heading2">Organismes thématiques</h2>
<td>Nom</td> <table class="table">
<td>Local</td> <tr class="tableRowHeading">
<td>Poste</td> <td>Nom</td>
<td>Statut</td> <td>Local</td>
</tr> <td>Poste</td>
<tr class="tableRow"> <td>Statut</td>
<td>AME</td> </tr>
<td>C-060</td> <tr class="tableRow">
<td>7919</td> <td>AME</td>
<td class="organismeActif">Actif</td> <td>C-060</td>
</tr> <td>7919</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>BEAM</td> </tr>
<td>F-024a</td> <tr class="tableRow">
<td>5930</td> <td>BEAM</td>
<td class="organismeActif">Actif</td> <td>F-024a</td>
</tr> <td>5930</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>Club Aventurier</td> </tr>
<td>F-011b</td> <tr class="tableRow">
<td>2730</td> <td>Club Aventurier</td>
<td class="organismeActif">Actif</td> <td>F-011b</td>
</tr> <td>2730</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>Équipe Santé</td> </tr>
<td>F-011</td> <tr class="tableRow">
<td>2361</td> <td>Équipe Santé</td>
<td class="organismeActif">Actif</td> <td>F-011</td>
</tr> <td>2361</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>Montpetit Donjon</td> </tr>
<td>C-067</td> <tr class="tableRow">
<td>2299</td> <td>Montpetit Donjon</td>
<td class="organismeActif">Actif</td> <td>C-067</td>
</tr> <td>2299</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>MAEL</td> </tr>
<td>F-027b</td> <tr class="tableRow">
<td>N/A</td> <td>MAEL</td>
<td class="organismeActif">Actif</td> <td>F-027b</td>
</tr> <td>N/A</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>OGRE</td> </tr>
<td>F-011c</td> <tr class="tableRow">
<td>5647</td> <td>OGRE</td>
<td class="organismeActif">Actif</td> <td>F-011c</td>
</tr> <td>5647</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>RECEM</td> </tr>
<td>A-125s</td> <tr class="tableRow">
<td>N/A</td> <td>RECEM</td>
<td class="organismeActif">Actif</td> <td>A-125s</td>
</tr> <td>N/A</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>ORGASME</td> </tr>
<td>F-049</td> <tr class="tableRow">
<td>N/A</td> <td>ORGASME</td>
<td class="organismeActif">Actif</td> <td>F-049</td>
</tr> <td>N/A</td>
<tr class="tableRow inactive"> <td class="organismeActif">Actif</td>
<td>SOI</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>SOI</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
<tr class="tableRow inactive"> <td class="organismeInactif">Inactif</td>
<td>MotDit</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>MotDit</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
</table> <td class="organismeInactif">Inactif</td>
<hr class="separator"> </tr>
<h2 class="heading2">Associations de programme</h2> </table>
<table class="table"> <hr class="separator">
<tr class="tableRowHeading"> <h2 class="heading2">Associations de programme</h2>
<td>Nom</td> <table class="table">
<td>Local</td> <tr class="tableRowHeading">
<td>Poste</td> <td>Nom</td>
<td>Statut</td> <td>Local</td>
</tr> <td>Poste</td>
<tr class="tableRow"> <td>Statut</td>
<td>ADEPT</td> </tr>
<td>F-045</td> <tr class="tableRow">
<td>2286</td> <td>ADEPT</td>
<td class="organismeActif">Actif</td> <td>F-045</td>
</tr> <td>2286</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>ATIM</td> </tr>
<td>F-041</td> <tr class="tableRow">
<td>2652</td> <td>ATIM</td>
<td class="organismeActif">Actif</td> <td>F-041</td>
</tr> <td>2652</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>AEALC</td> </tr>
<td>A-125r</td> <tr class="tableRow">
<td>2873</td> <td>AEALC</td>
<td class="organismeActif">Actif</td> <td>A-125r</td>
</tr> <td>2873</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>PAPI</td> </tr>
<td>F-023</td> <tr class="tableRow">
<td>2795</td> <td>PAPI</td>
<td class="organismeActif">Actif</td> <td>F-023</td>
</tr> <td>2795</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>TGE</td> </tr>
<td>C-063</td> <tr class="tableRow">
<td>2638</td> <td>TGE</td>
<td class="organismeActif">Actif</td> <td>C-063</td>
</tr> <td>2638</td>
<tr class="tableRow inactive"> <td class="organismeActif">Actif</td>
<td>ASI</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>ASI</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
<tr class="tableRow" inactive> <td class="organismeInactif">Inactif</td>
<td>TEE</td> </tr>
<td>N/A</td> <tr class="tableRow" inactive>
<td>N/A</td> <td>TEE</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
</table> <td class="organismeInactif">Inactif</td>
<hr class="separator"> </tr>
<h2 class="heading2">Comités</h2> </table>
<table class="table"> <hr class="separator">
<tr class="tableRowHeading"> <h2 class="heading2">Comités</h2>
<td>Nom</td> <table class="table">
<td>Local</td> <tr class="tableRowHeading">
<td>Poste</td> <td>Nom</td>
<td>Statut</td> <td>Local</td>
</tr> <td>Poste</td>
<tr class="tableRow"> <td>Statut</td>
<td>ASEG</td> </tr>
<td>B-06</td> <tr class="tableRow">
<td>N/A</td> <td>ASEG</td>
<td class="organismeActif">Actif</td> <td>B-06</td>
</tr> <td>N/A</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>CIC</td> </tr>
<td>F-027c</td> <tr class="tableRow">
<td>N/A</td> <td>CIC</td>
<td class="organismeActif">Actif</td> <td>F-027c</td>
</tr> <td>N/A</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>Comité Mob</td> </tr>
<td>N/A</td> <tr class="tableRow">
<td>N/A</td> <td>Comité Mob</td>
<td class="organismeActif">Actif</td> <td>N/A</td>
</tr> <td>N/A</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>ESPACE</td> </tr>
<td>F-011d</td> <tr class="tableRow">
<td>2418</td> <td>ESPACE</td>
<td class="organismeActif">Actif</td> <td>F-011d</td>
</tr> <td>2418</td>
<tr class="tableRow"> <td class="organismeActif">Actif</td>
<td>Friperie</td> </tr>
<td>F-027a</td> <tr class="tableRow">
<td>2248</td> <td>Friperie</td>
<td class="organismeActif">Actif</td> <td>F-027a</td>
</tr> <td>2248</td>
<tr class="tableRow inactive"> <td class="organismeActif">Actif</td>
<td>CAP</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>CAP</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
<tr class="tableRow inactive"> <td class="organismeInactif">Inactif</td>
<td>CÉSI</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>CÉSI</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
<tr class="tableRow inactive"> <td class="organismeInactif">Inactif</td>
<td>CFEM</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>CFEM</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
<tr class="tableRow inactive"> <td class="organismeInactif">Inactif</td>
<td>EUMC-CEM</td> </tr>
<td>N/A</td> <tr class="tableRow inactive">
<td>N/A</td> <td>EUMC-CEM</td>
<td class="organismeInactif">Inactif</td> <td>N/A</td>
</tr> <td>N/A</td>
</table> <td class="organismeInactif">Inactif</td>
</div> </tr>
<!-- {{ template "snackbar-html" }} --> </table>
{{ template "footer-html" }} </div>
</body> <!-- {{ template "snackbar-html" }} -->
</html> {{ template "footer-html" }}
{{ end }} </body>
</html>
{{ end }}