prima bozza sito sindacato
This commit is contained in:
commit
59ef4db64f
31 changed files with 1576 additions and 0 deletions
27
layouts/_default/baseof.html
Normal file
27
layouts/_default/baseof.html
Normal 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>
|
||||
18
layouts/_default/list.html
Normal file
18
layouts/_default/list.html
Normal 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 }}
|
||||
10
layouts/_default/single.html
Normal file
10
layouts/_default/single.html
Normal 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
7
layouts/index.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{{ define "main" }}
|
||||
<article class="page-content sidenote-layout">
|
||||
<div class="content-body">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
5
layouts/partials/footer.html
Normal file
5
layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<footer class="site-footer">
|
||||
<div class="footer-inner">
|
||||
<p>© {{ now.Year }} {{ site.Title }}</p>
|
||||
</div>
|
||||
</footer>
|
||||
17
layouts/partials/header.html
Normal file
17
layouts/partials/header.html
Normal 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>
|
||||
27
layouts/shortcodes/csv_table.html
Normal file
27
layouts/shortcodes/csv_table.html
Normal 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 -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue