first commit

This commit is contained in:
Arnaud Delcasse
2025-12-30 12:14:33 +01:00
commit 95e3bad443
105 changed files with 4997 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<div class="footer-contact-block">
<h2 class="footer-contact-title">{{ site.Params.contact.title }}</h2>
<div class="footer-contact-phrases">
{{ range site.Params.contact.phrases }}
<p>{{ . }}</p>
{{ end }}
</div>
<a href="{{ "/pages/contact/" | relURL }}" class="contact-btn">{{ site.Params.contact.buttonText }}</a>
</div>
<div class="footer-partners-block">
{{ $bandeauDesktop := resources.Get "images/visuels/Desktop - Bandeau logos.png" }}
{{ $bandeauMobile := resources.Get "images/visuels/Mobile - Bandeau logos.png" }}
{{ if $bandeauDesktop }}
<img src="{{ $bandeauDesktop.RelPermalink }}" alt="Nos partenaires" class="partners-desktop" />
{{ end }}
{{ if $bandeauMobile }}
<img src="{{ $bandeauMobile.RelPermalink }}" alt="Nos partenaires" class="partners-mobile" />
{{ end }}
</div>
<div class="footer-container">
<div class="footer-left">
{{ $logoVertical := resources.Get "images/logos/Logo_MMS43_Vertical_Defonce.svg" }}
{{ $logoHorizontal := resources.Get "images/logos/Logo_MMS43-Defonce_Horizontal.svg" }}
<a href="{{ "/" | relURL }}" class="footer-logo">
{{ if $logoVertical }}
<img src="{{ $logoVertical.RelPermalink }}" alt="{{ site.Title }}" class="footer-logo-vertical" />
{{ end }}
{{ if $logoHorizontal }}
<img src="{{ $logoHorizontal.RelPermalink }}" alt="{{ site.Title }}" class="footer-logo-horizontal" />
{{ end }}
</a>
</div>
<div class="footer-center">
<nav class="footer-nav">
<a href="https://partenaire.mms43.fr" target="_blank" rel="noopener">Espace partenaire</a>
<a href="{{ "/pages/contact/" | relURL }}">Contact</a>
<a href="{{ "/pages/mentions-legales/" | relURL }}">Mentions légales et politique de confidentialité</a>
</nav>
<div class="footer-social">
{{ $linkedin := resources.Get "images/logos/Logo Linkedin.png" }}
{{ $facebook := resources.Get "images/logos/Logo Facebook.png" }}
{{ if $linkedin }}
<a href="{{ site.Params.linkedinUrl | default "#" }}" target="_blank" rel="noopener" class="social-link">
<img src="{{ $linkedin.RelPermalink }}" alt="LinkedIn" />
</a>
{{ end }}
{{ if $facebook }}
<a href="{{ site.Params.facebookUrl | default "#" }}" target="_blank" rel="noopener" class="social-link">
<img src="{{ $facebook.RelPermalink }}" alt="Facebook" />
</a>
{{ end }}
</div>
<p class="footer-copyright footer-copyright-mobile">{{ site.Params.footer.copyright }} &copy;{{ now.Year }} - Tous droits réservés</p>
</div>
<div class="footer-right">
<div class="footer-cta">
<p class="footer-cta-title">{{ site.Params.footer.ctaTitle }}</p>
<p class="footer-cta-contact">{{ site.Params.phone }} / {{ site.Params.email }}</p>
</div>
<p class="footer-copyright">{{ site.Params.footer.copyright }} &copy;{{ now.Year }} - Tous droits réservés</p>
</div>
</div>

View File

@@ -0,0 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}

View File

@@ -0,0 +1,9 @@
{{- with resources.Get "css/main.css" }}
{{- if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,16 @@
{{- with resources.Get "js/main.js" }}
{{- $opts := dict
"minify" (not hugo.IsDevelopment)
"sourceMap" (cond hugo.IsDevelopment "external" "")
"targetPath" "js/main.js"
}}
{{- with . | js.Build $opts }}
{{- if hugo.IsDevelopment }}
<script src="{{ .RelPermalink }}"></script>
{{- else }}
{{- with . | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,107 @@
<div class="header-container">
<a href="{{ "/" | relURL }}" class="header-logo">
{{ $logo := resources.Get "images/logos/Logo_MMS43_Vertical_Defonce.svg" }}
{{ if $logo }}
<img src="{{ $logo.RelPermalink }}" alt="{{ site.Title }}" />
{{ end }}
</a>
<nav class="header-nav">
{{ range site.Menus.main }}
<a href="{{ .URL }}" class="nav-link{{ if $.IsMenuCurrent "main" . }} active{{ end }}">
{{ .Name }}
</a>
{{ end }}
</nav>
<div class="header-phone">
{{ $phoneIcon := resources.Get "images/picto/call_24dp_1F1F1F_FILL1_wght400_GRAD0_opsz24.svg" }}
{{ if $phoneIcon }}
<div class="phone-icon">
<img src="{{ $phoneIcon.RelPermalink }}" alt="Téléphone" />
</div>
{{ end }}
<div class="phone-info">
<span class="phone-number">{{ site.Params.phone | default "04 XX XX XX XX" }}</span>
<span class="phone-hours">{{ site.Params.phoneHours | default "(du lundi au vendredi, 9h - 17h)" }}</span>
</div>
</div>
<!-- Mobile phone button -->
<a href="tel:{{ site.Params.phone | default "0400000000" }}" class="header-phone-mobile">
{{ $phoneIcon := resources.Get "images/picto/call_24dp_1F1F1F_FILL1_wght400_GRAD0_opsz24.svg" }}
{{ if $phoneIcon }}
<div class="phone-icon">
<img src="{{ $phoneIcon.RelPermalink }}" alt="Téléphone" />
</div>
{{ end }}
<div class="phone-info">
<span class="phone-number">{{ site.Params.phone | default "04 XX XX XX XX" }}</span>
<span class="phone-hours">{{ site.Params.phoneHours | default "(du lundi au vendredi, 9h - 17h)" }}</span>
</div>
</a>
<!-- Burger button -->
<button class="header-burger" aria-label="Menu" aria-expanded="false">
<span class="burger-line"></span>
<span class="burger-line"></span>
<span class="burger-line"></span>
</button>
</div>
<!-- Mobile menu overlay -->
<div class="mobile-menu">
<button class="mobile-menu-close" aria-label="Fermer le menu">
{{ $closeIcon := resources.Get "images/picto/close_24dp_FFFFFF_FILL1_wght400_GRAD0_opsz24.svg" }}
{{ if $closeIcon }}
<img src="{{ $closeIcon.RelPermalink }}" alt="Fermer" />
{{ else }}
<span>&times;</span>
{{ end }}
</button>
<nav class="mobile-menu-nav">
{{ $arrowIcon := resources.Get "images/picto/chevron_forward_24dp_1F1F1F_FILL1_wght400_GRAD0_opsz24.svg" }}
{{ range site.Menus.main }}
<a href="{{ .URL }}" class="mobile-menu-link">
<span>{{ .Name }}</span>
{{ if $arrowIcon }}
<img src="{{ $arrowIcon.RelPermalink }}" alt="" class="mobile-menu-arrow" />
{{ end }}
</a>
{{ end }}
</nav>
<div class="mobile-menu-contact">
<p class="mobile-menu-contact-title">{{ site.Params.footer.ctaTitle | default "Organisez vos déplacements en Haute-Loire" }}</p>
<p class="mobile-menu-contact-info">{{ site.Params.phone }} / {{ site.Params.email }}</p>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const burger = document.querySelector('.header-burger');
const closeBtn = document.querySelector('.mobile-menu-close');
const mobileMenu = document.querySelector('.mobile-menu');
function openMenu() {
mobileMenu.classList.add('is-open');
burger.setAttribute('aria-expanded', 'true');
document.body.style.overflow = 'hidden';
}
function closeMenu() {
mobileMenu.classList.remove('is-open');
burger.setAttribute('aria-expanded', 'false');
document.body.style.overflow = '';
}
burger.addEventListener('click', openMenu);
closeBtn.addEventListener('click', closeMenu);
// Fermer le menu au clic sur un lien
mobileMenu.querySelectorAll('.mobile-menu-link').forEach(link => {
link.addEventListener('click', closeMenu);
});
});
</script>

View File

@@ -0,0 +1,51 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "_partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View File

@@ -0,0 +1,23 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}