From b118912dbb2ecb9f7e5a181c2042a7fc801d3898 Mon Sep 17 00:00:00 2001 From: Alexel Date: Tue, 15 Aug 2023 14:30:10 -0400 Subject: [PATCH] formattage du code gohtml et css --- public/css/fonts.css | 7 ----- public/css/general.css | 21 ------------- public/css/header.css | 23 ++------------ public/js/index.js | 23 -------------- templates/html/admin-upload.gohtml | 35 ++++++++++----------- templates/html/admin.gohtml | 28 ++++++++--------- templates/html/documentation.gohtml | 49 ++++++++++++++--------------- templates/html/formulaires.gohtml | 24 +++++++------- templates/html/general.gohtml | 7 +++++ templates/html/header.gohtml | 33 +++++++------------ templates/html/index.gohtml | 32 +++++++++---------- templates/html/vie-etudiante.gohtml | 28 ++++++++--------- 12 files changed, 118 insertions(+), 192 deletions(-) diff --git a/public/css/fonts.css b/public/css/fonts.css index 54afd14..48818ce 100644 --- a/public/css/fonts.css +++ b/public/css/fonts.css @@ -16,7 +16,6 @@ font-style: italic; } - @font-face { font-family: "Poppins"; src: url('/public/fonts/Poppins/poppins-extralight.woff2') format('woff2'), @@ -44,7 +43,6 @@ font-style: normal; } - @font-face { font-family: "Poppins"; src: url('/public/fonts/Poppins/poppins-light-italic.woff2') format('woff2'), @@ -106,7 +104,6 @@ url('/public/fonts/Poppins/poppins-semibold-italic.otf') format('otf'); font-weight: 600; font-style: italic; - } @font-face { @@ -116,7 +113,6 @@ url('/public/fonts/Poppins/poppins-bold.otf') format('otf'); font-weight: 700; font-style: normal; - } @font-face { @@ -126,7 +122,6 @@ url('/public/fonts/Poppins/poppins-bold-italic.otf') format('otf'); font-weight: 700; font-style: italic; - } @font-face { @@ -136,10 +131,8 @@ url('/public/fonts/Poppins/poppins-extrabold.otf') format('otf'); font-weight: 800; font-style: normal; - } - @font-face { font-family: "Poppins"; src: url('/public/fonts/Poppins/poppins-extrabold-italic.woff2') format('woff2'), diff --git a/public/css/general.css b/public/css/general.css index 0f0a8dc..e9a4a43 100644 --- a/public/css/general.css +++ b/public/css/general.css @@ -1,6 +1,3 @@ -/* La propriété CSS box-sizing définit la façon dont la hauteur et la largeur totale d'un élément est calculée (avec le modèle de boîte CSS). -// Références: https://developer.mozilla.org/fr/docs/Web/CSS/box-sizing*/ - html { box-sizing: border-box; } @@ -49,7 +46,6 @@ body { } @media screen and (min-width: 768px) { - .wrapper { max-width: 768px; width: calc(100% - var(15px)); @@ -58,34 +54,17 @@ body { .heading1 { font-size: 4rem; /*64px*/ - text-align: center; } .heading2 { font-size: 1.5rem; /*24px*/ - text-align: center; } - } @media screen and (min-width: 1140px) { - .wrapper { max-width: 1140px; width: calc(100% - var(30px)); } - - .heading1 { - font-size: 4rem; - /*64px*/ - text-align: center; - } - - .heading2 { - font-size: 1.5rem; - /*24px*/ - text-align: center; - } - } \ No newline at end of file diff --git a/public/css/header.css b/public/css/header.css index a6c80c4..af97035 100644 --- a/public/css/header.css +++ b/public/css/header.css @@ -32,10 +32,7 @@ a:visited { /*regular*/ font-size: 1.25rem; /*20px*/ - color: #000; - /*Noir pur*/ list-style: none; - font-style: none; display: none; width: 100%; } @@ -52,10 +49,8 @@ a:visited { } .headerMenuHamburger { - fill: #394596; height: 50px; width: 50px; - display: block; cursor: pointer; } @@ -63,19 +58,14 @@ a:visited { font-family: "Poppins"; font-weight: 400; /*regular*/ - font-size: 1.25rem; - /*20px*/ - color: #000; - /*Noir pur*/ + font-size: 2rem; + /*32px*/ list-style: none; - font-style: none; display: none; } .nav-is-active { background-color: #fff; - font-size: 2rem; - /*32px*/ display: flex; flex-flow: column; justify-content: space-around; @@ -88,19 +78,10 @@ a:visited { margin: 0; padding-top: 200px; padding-bottom: 200px; - } /* Le header s'affiche en menu hamburger pour les breakpoints téléphone et tablette */ @media screen and (min-width: 778px) { - .headerMenu { - display: none; - } - - .headerMenuHamburger { - display: block; - } - .nav-is-active { font-size: 3rem; /*48px*/ diff --git a/public/js/index.js b/public/js/index.js index 69ebafb..e69de29 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,23 +0,0 @@ -/** Création et exportation de la classe Header */ -class Header { - constructor(element) { - this.element = element; - this.html = document.documentElement; - - this.init(); - } - - /** - * Méthode d'initialisation - */ - init() { - const toggle = this.element.querySelector('.js-toggle'); - toggle.addEventListener('click', this.onToggleNav.bind(this)); - - } - onToggleNav() { - // Enlever la classe .is-scrolling-down pour éviter les bugs si l'on fait défiler la page jsute après l'ouverture du menu - this.html.classList.toggle('nav-is-active'); - } - -} \ No newline at end of file diff --git a/templates/html/admin-upload.gohtml b/templates/html/admin-upload.gohtml index 3c145fb..1729ba0 100644 --- a/templates/html/admin-upload.gohtml +++ b/templates/html/admin-upload.gohtml @@ -1,28 +1,27 @@ {{ define "admin-upload-html" }} - - - - - AGECEM - {{ template "general-html" }} - - - {{ template "header-html" }} -

Upload

-
+ + + + + AGECEM + {{ template "general-html" }} + + + {{ template "header-html" }} +

Upload

+ -
Document:

-
-

{{ .Message }}

- - + +

{{ .Message }}

+ + {{ end }} diff --git a/templates/html/admin.gohtml b/templates/html/admin.gohtml index 8308583..edcf8c4 100644 --- a/templates/html/admin.gohtml +++ b/templates/html/admin.gohtml @@ -1,17 +1,17 @@ {{ define "admin-html" }} - - - - - AGECEM - {{ template "general-html" }} - - - {{ template "header-html" }} -

Admin

- + + {{ end }} diff --git a/templates/html/documentation.gohtml b/templates/html/documentation.gohtml index 9ba8761..2f432f3 100644 --- a/templates/html/documentation.gohtml +++ b/templates/html/documentation.gohtml @@ -1,30 +1,29 @@ {{ define "documentation-html" }} - - - - - AGECEM | Documentation - {{ template "general-html" }} - - - {{ template "header-html" }} -
-

Documentation

-

- {{ range . }} + + + + + AGECEM | Documentation + {{ template "general-html" }} + + + {{ template "header-html" }} +

+

Documentation

+

+ {{ range . }} {{ $bucket_name := .Name }}

- {{ $bucket_name }} - -
    - {{ range .Documents }} -
  • {{ . }}
  • - {{ end}} -
+ {{ $bucket_name }} +
    + {{ range .Documents }} +
  • {{ . }}
  • + {{ end}} +
- {{ end }} -

-
- - + {{ end }} +

+
+ + {{ end }} diff --git a/templates/html/formulaires.gohtml b/templates/html/formulaires.gohtml index b60fd64..795c028 100644 --- a/templates/html/formulaires.gohtml +++ b/templates/html/formulaires.gohtml @@ -1,14 +1,14 @@ {{ define "formulaires-html" }} - - - - - AGECEM | Formulaires - {{ template "general-html" }} - - - {{ template "header-html" }} -

Formulaires

- - + + + + + AGECEM | Formulaires + {{ template "general-html" }} + + + {{ template "header-html" }} +

Formulaires

+ + {{ end }} diff --git a/templates/html/general.gohtml b/templates/html/general.gohtml index eefcdc7..35f7d8a 100644 --- a/templates/html/general.gohtml +++ b/templates/html/general.gohtml @@ -1,4 +1,11 @@ {{ define "general-html" }} + + {{ end }} diff --git a/templates/html/header.gohtml b/templates/html/header.gohtml index b75d20e..ba018eb 100644 --- a/templates/html/header.gohtml +++ b/templates/html/header.gohtml @@ -1,29 +1,20 @@ {{ define "header-html" }} - - -
- - - {{ end }} diff --git a/templates/html/index.gohtml b/templates/html/index.gohtml index 58ec63b..dab01aa 100644 --- a/templates/html/index.gohtml +++ b/templates/html/index.gohtml @@ -1,18 +1,18 @@ {{ define "index-html" }} - - - - - AGECEM - {{ template "general-html" }} - - - - {{ template "header-html" }} -
-

AGECEM

-

Association Générale Étudiante du Cégep Édouard-Montpetit

-
- - + + + + + AGECEM + {{ template "general-html" }} + + + + {{ template "header-html" }} +
+

AGECEM

+

Association Générale Étudiante du Cégep Édouard-Montpetit

+
+ + {{ end }} diff --git a/templates/html/vie-etudiante.gohtml b/templates/html/vie-etudiante.gohtml index 6d90023..893e770 100644 --- a/templates/html/vie-etudiante.gohtml +++ b/templates/html/vie-etudiante.gohtml @@ -1,16 +1,16 @@ {{ define "vie-etudiante-html" }} - - - - - AGECEM | Vie étudiante - {{ template "general-html" }} - - - {{ template "header-html" }} -
-

Vie étudiante

-
- - + + + + + AGECEM | Vie étudiante + {{ template "general-html" }} + + + {{ template "header-html" }} +
+

Vie étudiante

+
+ + {{ end }}