prima bozza sito sindacato

This commit is contained in:
vecna 2026-04-20 18:33:22 +02:00
commit 59ef4db64f
31 changed files with 1576 additions and 0 deletions

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="{{ .Language.Lang }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if not .IsHome }}{{ .Title }} — {{ end }}{{ site.Title }}</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&display=swap" rel="stylesheet">
{{ $css := resources.Get "css/main.css" | minify }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
</head>
<body>
{{- partial "header.html" . -}}
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
{{ $js := resources.Get "js/sidenotes.js" | minify }}
<script src="{{ $js.RelPermalink }}"></script>
{{ $csvJs := resources.Get "js/csv-tables.js" | minify }}
<script src="{{ $csvJs.RelPermalink }}"></script>
</body>
</html>

View file

@ -0,0 +1,18 @@
{{ define "main" }}
<article class="page-content sidenote-layout">
<div class="content-body">
<h1>{{ .Title }}</h1>
{{ .Content }}
<div class="initiative-list">
{{ range .Pages }}
<a href="{{ .RelPermalink }}" class="initiative-card">
<h3>{{ .Title }}</h3>
{{ with .Params.subtitle }}<p class="initiative-subtitle">{{ . }}</p>{{ end }}
{{ with .Summary }}<p class="initiative-summary">{{ . }}</p>{{ end }}
</a>
{{ end }}
</div>
</div>
</article>
{{ end }}

View file

@ -0,0 +1,10 @@
{{ define "main" }}
<article class="page-content sidenote-layout">
<div class="content-body">
<h1>{{ .Title }}</h1>
{{ with .Params.subtitle }}<h2>{{ . }}</h2>{{ end }}
{{ with .Date }}<time class="page-date" datetime="{{ .Format "2006-01-02" }}">{{ .Format "2 January 2006" }}</time>{{ end }}
{{ .Content }}
</div>
</article>
{{ end }}

7
layouts/index.html Normal file
View file

@ -0,0 +1,7 @@
{{ define "main" }}
<article class="page-content sidenote-layout">
<div class="content-body">
{{ .Content }}
</div>
</article>
{{ end }}

View file

@ -0,0 +1,5 @@
<footer class="site-footer">
<div class="footer-inner">
<p>&copy; {{ now.Year }} {{ site.Title }}</p>
</div>
</footer>

View file

@ -0,0 +1,17 @@
<header class="site-header">
<nav class="site-nav">
<div class="nav-main">
{{ range .Site.Menus.main }}
<a href="{{ .URL }}" class="nav-link{{ if eq .Weight 1 }} nav-home{{ end }}">{{ .Name }}</a>
{{ end }}
</div>
<div class="nav-lang">
{{ range hugo.Sites }}
{{ $langURL := printf "/%s/" .Language.Lang }}
<a href="{{ $langURL }}" class="lang-link{{ if eq $.Language.Lang .Language.Lang }} lang-active{{ end }}">
{{ upper .Language.Lang }}
</a>
{{ end }}
</div>
</nav>
</header>

View file

@ -0,0 +1,27 @@
{{- $src := .Get "src" -}}
{{- if not $src -}}
<p><strong>Errore shortcode csv_table:</strong> parametro <code>src</code> mancante.</p>
{{- else -}}
{{- $url := $src | relURL -}}
{{- $filename := path.Base $src -}}
{{- $title := .Get "title" | default $filename -}}
{{- $maxRows := .Get "maxRows" | default "4" -}}
{{- $downloadName := .Get "download" | default $filename -}}
<section class="csv-table" data-csv-table data-src="{{ $url }}" style="--csv-max-rows: {{ $maxRows }};">
<header class="csv-table__header">
<h4 class="csv-table__title">{{ $title }}</h4>
<div class="csv-table__meta">
<span class="csv-table__count" data-csv-count>Caricamento righe...</span>
<a class="csv-table__download" href="{{ $url }}" download="{{ $downloadName }}">Download CSV</a>
</div>
</header>
<div class="csv-table__viewport" data-csv-viewport aria-live="polite">
<p class="csv-table__status" data-csv-status>Caricamento tabella...</p>
</div>
<noscript>
<p>Per visualizzare la tabella serve JavaScript. Puoi scaricare il file qui: <a href="{{ $url }}" download="{{ $downloadName }}">{{ $downloadName }}</a>.</p>
</noscript>
</section>
{{- end -}}