diff --git a/.gitmodules b/.gitmodules index 11cd6c2..5f6c8c8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "themes/ananke"] - path = themes/ananke - url = https://github.com/theNewDynamic/gohugo-theme-ananke.git -[submodule "themes/tailwind"] - path = themes/tailwind - url = https://github.com/tomowang/hugo-theme-tailwind.git +[submodule "themes/hugo-arcana"] + path = themes/hugo-arcana + url = https://github.com/half-duplex/hugo-arcana.git \ No newline at end of file diff --git a/assets/sass/custom.scss b/assets/sass/custom.scss new file mode 100644 index 0000000..8bd3fd4 --- /dev/null +++ b/assets/sass/custom.scss @@ -0,0 +1,24 @@ +#logo-wrapper { + display: flex; + flex-direction: row; + justify-content: center; + align-items: stretch; + align-content: center; + vertical-align: baseline; +} + +#logo-image-wrapper > a { + border: 0px solid white; +} + +#logo-text-wrapper { + padding: 1.3em 0px 0px 20px; +} + +.box.post { + height: 300px; +} + +.image.left img { + margin: 0 auto; +} diff --git a/assets/sass/libs/_custom_vars.scss b/assets/sass/libs/_custom_vars.scss new file mode 100644 index 0000000..a97380c --- /dev/null +++ b/assets/sass/libs/_custom_vars.scss @@ -0,0 +1,20 @@ +$palette: ( + bg: #fff, + bg-bold: #f7f7f7, + fg: #474747, + fg-bold: #4c4c4c, + fg-light: #999, + border: #e0e0e0, + + accent: ( + bg: #f7990e, + fg: #fff + ), + + obscure: ( + bg: #333, + bg-light: #555, + bg-bold: #1f1f1f, + fg: #c0c0c0 + ) +); diff --git a/config.yml b/config.yml index b33e8f9..20785af 100644 --- a/config.yml +++ b/config.yml @@ -2,20 +2,36 @@ baseURL: https://bglug.it languageCode: it-IT title: BgLUG +subtitle: Bergamo Linux Users Group +logo: logo_tondo.svg author: BgLUG -# theme: hugo-universal-theme -theme: tailwind -copyright: Bergamo Linux Users Group +theme: hugo-arcana +copyright: 2024 © Bergamo Linux Users Group paginate: 20 timeout: 60s params: - contentTypeName: posts - header: - logo: logo_tondo.svg - footer: - since: 1854 - poweredby: true + description: Bergamo Linux Users Group + + social: + - title: Twitter + icon: fa-twitter + url: https://x.com/bglug_it + - title: Facebook + icon: fa-facebook-f + url: https://www.facebook.com/bglug + - title: LinkedIn + icon: fa-linkedin + url: https://www.linkedin.com/groups/154561/ + - title: Gitea + icon: fa-git-alt + url: https://git.libreschool.org/BgLUG + - title: YouTube + icon: fa-youtube + url: https://www.youtube.com/@BglugIt + - title: YouTube + icon: fa-circle-play + url: https://video.linux.it/c/bglug.it/ taxonomies: tag: tags @@ -23,6 +39,7 @@ taxonomies: languages: it: + weight: 1 languageCode: it-IT languageDirection: ltr languageName: Italiano @@ -37,29 +54,47 @@ languages: pages: /pagine/ menus: main: - - identifier: eventi - name: Eventi - pageRef: events - weight: 0 + - identifier: home + name: Home + pageRef: / + weight: 1 - identifier: post name: Post pageRef: posts - weight: 1 - - identifier: dove-siamo - name: Dove siamo - pageRef: pages/dove-siamo - weight: 2 - - identifier: privacy - name: Privacy - pageRef: pages/privacy-policy - # parent: chi-siamo - weight: 3 + weight: 10 + - identifier: eventi + name: Eventi + pageRef: events + weight: 20 + - identifier: about + name: L'associazione + weight: 30 - identifier: chi-siamo name: Chi siamo - pageRef: pages/chi-siamo - weight: 4 - weight: 1 + parent: about + weight: 31 + pageRef: /about/chi-siamo + - identifier: dove-siamo + name: Dove siamo + parent: about + pageRef: /about/dove-siamo + weight: 32 + - identifier: organigramma + name: Organigramma + parent: about + pageRef: /about/organigramma + weight: 33 + - identifer: segreteria + name: Segreteria + parent: about + pageRef: /about/segreteria + weight: 34 + - identifier: privacy + name: Privacy + pageRef: /pages/privacy-policy + weight: 40 en: + weight: 2 languageCode: en-US languageDirection: ltr languageName: English @@ -74,29 +109,47 @@ languages: pages: /pages/ menus: main: - - identifier: events - name: Events - pageRef: events - weight: 0 + - identifier: home + name: Home + pageRef: / + weight: 1 - identifier: posts name: Posts pageRef: posts - weight: 1 - - identifier: dove-siamo - name: Where - pageRef: pages/dove-siamo - weight: 2 + weight: 10 + - identifier: events + name: Events + pageRef: events + weight: 20 + - identifier: about + name: The association + weight: 30 + - identifier: who + parent: about + name: Who we are + pageRef: /about/who + weight: 31 + - identifier: where + parent: about + name: Where we are + pageRef: /about/where + weight: 32 + - identifier: organigramme + parent: about + name: Organigramme + pageRef: /about/organigramme + weight: 33 + - identifier: secretery + parent: about + name: Secretery + pageRef: /about/secretery + weight: 34 - identifier: privacy name: Privacy - pageRef: pages/privacy-policy - weight: 3 - - identifier: chi-siamo - name: Who - pageRef: pages/chi-siamo - weight: 4 - weight: 2 + pageRef: /pages/privacy-policy + weight: 40 -defaultcontentlanguage: it +defaultContentLanguage: it defaultContentLanguageInSubdir: true outputs: diff --git a/content/pages/privacy-policy/index.en.md b/content/pages/privacy-policy/index.en.md index 71057e1..df427b7 100644 --- a/content/pages/privacy-policy/index.en.md +++ b/content/pages/privacy-policy/index.en.md @@ -2,7 +2,6 @@ title: Privacy Policy type: page slug: privacy -date: 2017-09-24T09:49:49+00:00 aliases: - privacy-policy - cookies diff --git a/content/pages/privacy-policy/index.it.md b/content/pages/privacy-policy/index.it.md index aa2d818..a69f215 100644 --- a/content/pages/privacy-policy/index.it.md +++ b/content/pages/privacy-policy/index.it.md @@ -2,7 +2,6 @@ title: Privacy e Cookie Policy type: page slug: privacy -date: 2017-09-24T09:26:51+00:00 aliases: - privacy-policy - cookies diff --git a/data/en/homepage.yml b/data/en/homepage.yml new file mode 100644 index 0000000..e091938 --- /dev/null +++ b/data/en/homepage.yml @@ -0,0 +1,32 @@ +--- +banner: + enable: true + image: images/computers_banner.jpg + contents: "What is Bergamo Linux Users Group?" + button: + contents: "Learn more..." + url: about/who +items: + - type: posts + content_type: posts + max: 6 + - type: highlights + items_per_row: 2 + items: + - title: Events + icon: fa-calendar-day + content: > + Come to our events! You would learn all that there is to know about + free software and *open source* + - title: Schools + icon: fa-graduation-cap + url: schools + content: > + Follow our volunteers on their activities by schools in the province + of Bergamo. + + - type: cta + contents: Would you like to contribute to our activities? + button: + contents: "Contact us" + url: about/contacts diff --git a/data/globalheader.yml b/data/globalheader.yml new file mode 100644 index 0000000..8fca984 --- /dev/null +++ b/data/globalheader.yml @@ -0,0 +1,5 @@ +--- +title: "BgLUG --- Bergamo Linux Users Group" +image: images/logo.svg +image_alt: Logo BgLUG +image_width: 300 diff --git a/data/it/homepage.yml b/data/it/homepage.yml new file mode 100644 index 0000000..4fc9326 --- /dev/null +++ b/data/it/homepage.yml @@ -0,0 +1,33 @@ +--- +banner: + enable: true + image: images/computers_banner.jpg + contents: "Cos'è il Bergamo Linux Users Group?" + button: + contents: "Scopri di più..." + url: about/chi-siamo +items: + - type: posts + content_type: posts + max: 6 + - type: highlights + items_per_row: 2 + items: + - title: Eventi + icon: fa-calendar-day + url: eventi + content: > + Accorri agli eventi che organizziamo! Avrai modo di imparare tutto + quello che c'è da sapere sul software libero o *open source* + - title: Scuole + icon: fa-graduation-cap + url: scuole + content: > + Segui i nostri volontari nelle loro attività presso le scuole della + provincia di Bergamo + + - type: cta + contents: Vuoi aiutarci ad organizzare le nostre attività? + button: + contents: "Contattaci" + url: about/contatti diff --git a/layouts/_default/shortblock.html b/layouts/_default/shortblock.html new file mode 100644 index 0000000..b76ff6c --- /dev/null +++ b/layouts/_default/shortblock.html @@ -0,0 +1,54 @@ +
+
+ + {{ $rasters := slice "jpeg" "png" }} + {{ $newres := "360x250 smart" }} + + {{/* di default, niente immagine */}} + {{- $featimg := "#" -}} + + {{- if .Params.image -}} + {{/* se è stata definita un'immagine featured */}} + {{- $img := .Page.Resources.GetMatch .Params.image -}} + {{- if $img -}} + {{- if in $rasters $img.MediaType.SubType -}} + {{- $img = $img.Fill $newres -}} + {{ end }} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + {{- else if .Params.featured -}} + {{/* se è stata definita un'immagine featured */}} + {{- $img := .Page.Resources.GetMatch .Params.featured -}} + {{- if $img -}} + {{- if in $rasters $img.MediaType.SubType -}} + {{- $img = $img.Fill $newres -}} + {{ end }} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + {{- else -}} + {{/* altrimenti prendo la prima risorsa immagine disponibile */}} + {{- $img := (.Page.Resources.ByType "image").GetMatch "**" -}} + {{- if $img -}} + {{- if in $rasters $img.MediaType.SubType -}} + {{- $img = $img.Fill $newres -}} + {{ end }} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + {{- end -}} + + {{ .Params.image_alt }} +
+

{{ .Title }}

+ {{ if .Site.Params.show_post_dates | default true }} + {{- with .Date }}{{ end }} + {{ end }} +

+ {{ with .Description }} + {{- . | truncate 400 }} + {{- else }} + {{- .Summary | truncate 400 }} + {{- end }} +

+
+
+
diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..76ac78e --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,31 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Description }}

+ {{ if .Site.Params.show_post_dates | default true }} + {{- with .Date }}{{ end }} + {{ end }} + {{ partial "tags.html" . }} +
+ + {{- if or .Params.image }} + + {{- $featimg := "#" -}} + + {{- if .Params.image -}} + {{/* se è stata definita un'immagine featured */}} + {{- $img := .Page.Resources.GetMatch .Params.image -}} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + + {{- if .Params.featured -}} + {{/* se è stata definita un'immagine featured */}} + {{- $img := .Page.Resources.GetMatch .Params.featured -}} + {{- $featimg = $img.RelPermalink -}} + {{- end -}} + + {{ .Params.image_alt }} + {{ end }} + + {{- .Content }} +{{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..5194d2a --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,45 @@ + diff --git a/static/banner.jpg b/static/banner.jpg new file mode 100644 index 0000000..ef93666 Binary files /dev/null and b/static/banner.jpg differ diff --git a/static/images/computers_banner.jpg b/static/images/computers_banner.jpg new file mode 100644 index 0000000..8a23a29 Binary files /dev/null and b/static/images/computers_banner.jpg differ diff --git a/static/logo.svg b/static/images/logo.svg similarity index 100% rename from static/logo.svg rename to static/images/logo.svg diff --git a/themes/hugo-arcana b/themes/hugo-arcana new file mode 160000 index 0000000..4243c0f --- /dev/null +++ b/themes/hugo-arcana @@ -0,0 +1 @@ +Subproject commit 4243c0f7c9d13cbc9c68f5afbaba504ffb76ac06 diff --git a/themes/tailwind b/themes/tailwind deleted file mode 160000 index 9dc72c5..0000000 --- a/themes/tailwind +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9dc72c5ba801adb5440b598e16604b653a8cca2f