diff --git a/assets/images/close.svg b/assets/images/close.svg deleted file mode 100644 index 28e9be7a..00000000 --- a/assets/images/close.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - 24dp Icon/Navigation/Close - - - - - - \ No newline at end of file diff --git a/assets/images/expand-more.svg b/assets/images/expand-more.svg deleted file mode 100644 index acacb438..00000000 --- a/assets/images/expand-more.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - 24dp Icon/Navigation/Expand More - - - - - - \ No newline at end of file diff --git a/assets/images/menu.svg b/assets/images/menu.svg deleted file mode 100644 index 82b3f220..00000000 --- a/assets/images/menu.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/sass/_variables.scss b/assets/sass/_variables.scss index 24de4b2e..0e4940ae 100644 --- a/assets/sass/_variables.scss +++ b/assets/sass/_variables.scss @@ -16,4 +16,5 @@ body { --border-radius-m: .8rem; --border-radius-l: 1.2rem; --pagefind-ui-border-radius: var(--border-radius-l); + --pagefind-ui-border: #000; } \ No newline at end of file diff --git a/assets/sass/expander.scss b/assets/sass/expander.scss index 578460cb..a05a4c8b 100644 --- a/assets/sass/expander.scss +++ b/assets/sass/expander.scss @@ -34,8 +34,7 @@ details > summary::-webkit-details-marker { } summary::before { - content: '\e145' / ''; - font-family: "material icons round"; + content: url($icon-add); font-weight: normal; width: 2.4rem; height: 2.4rem; @@ -46,7 +45,7 @@ summary::before { } details[open] > summary::before { - content: '\e15b' / ''; + content: url($icon-remove); } details[open] > summary { diff --git a/assets/sass/footer.scss b/assets/sass/footer.scss index 142d7c4c..edad39ff 100644 --- a/assets/sass/footer.scss +++ b/assets/sass/footer.scss @@ -8,7 +8,7 @@ justify-content: normal; flex-flow: column; - @include media-breakpoint-up(md) { + @include media-breakpoint-up(lg) { justify-content: flex-end; flex-flow: row; } @@ -26,7 +26,7 @@ color: var(--link-hovered); } - @include media-breakpoint-up(md) { + @include media-breakpoint-up(lg) { margin-left: 1.6rem; margin-right: 0; } diff --git a/assets/sass/headings.scss b/assets/sass/headings.scss index a3cec8be..e1832629 100644 --- a/assets/sass/headings.scss +++ b/assets/sass/headings.scss @@ -32,4 +32,8 @@ h4 { font-weight: 700; text-wrap: balance; scroll-margin-top: 7rem; +} + +sup { + scroll-margin-top: 7rem; } \ No newline at end of file diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 10a935ed..7a6e0519 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -1,6 +1,8 @@ +$icon-add: '{{(resources.Get "svg/default/add.svg" | fingerprint "md5").RelPermalink}}'; +$icon-remove: '{{(resources.Get "svg/default/remove.svg" | fingerprint "md5").RelPermalink}}'; + @import "_variables.scss"; @import "node_modules/bootstrap/scss/bootstrap.scss"; -@import 'node_modules/@material-design-icons/font/round.scss'; @import "styles.scss"; @import "fonts.scss"; @import "navigation.scss"; diff --git a/assets/sass/navigation.scss b/assets/sass/navigation.scss index 0a8e4e74..a2502bd9 100644 --- a/assets/sass/navigation.scss +++ b/assets/sass/navigation.scss @@ -137,18 +137,14 @@ } } -.o-nav__menu-button-text { - -} - -.o-header__expand-button i, -.o-nav__menu-button i, -.o-nav__close-button i { +.o-header__expand-button svg, +.o-nav__menu-button svg, +.o-nav__close-button svg { margin-left: .8rem; align-self: center; } -.o-header__expand-button:has(~ .o-header__item-countries--open) i { +.o-header__expand-button:has(~ .o-header__item-countries--open) svg { transform: rotate(180deg); } @@ -196,7 +192,7 @@ position: fixed; top: 0; right: 0; - width: 60%; + width: 70%; height: 100%; z-index: 4; background-color: white; @@ -211,6 +207,7 @@ menu { flex-direction: column; align-items: flex-end; + padding-left: 0; } menu li:first-child { diff --git a/assets/sass/sidemenu.scss b/assets/sass/sidemenu.scss index 7f4ab3ea..6680b3c8 100644 --- a/assets/sass/sidemenu.scss +++ b/assets/sass/sidemenu.scss @@ -19,17 +19,8 @@ display: none; } - .o-single__relatedLink { - display: flex; - align-items: center; - - i { - margin-right: .4rem; - } - - span { - align-self: center; - } + .o-single__container { + margin-bottom: 1.6rem; } //TODO: Bessere Benamung diff --git a/assets/sass/stage.scss b/assets/sass/stage.scss index d49b82d2..8a87fe3b 100644 --- a/assets/sass/stage.scss +++ b/assets/sass/stage.scss @@ -40,6 +40,11 @@ outline: .2rem solid orange; outline-offset: .1rem; } + + &::placeholder { + color: var(--color-onLight); + opacity: .5; + } } .pagefind-ui__search-clear { diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index 7231bbd2..8e12f12e 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -23,6 +23,15 @@ a:not(.m-teaser) { } } +a:has(i) { + display: inline-flex; + align-items: center; + + > :first-child { + margin-right: .4rem; + } +} + a.m-teaser { .m-teaser__headline { color: var(--link-default); @@ -71,16 +80,29 @@ img { border-radius: var(--border-radius-m); } +.o-list__picture { + width: 15rem; + margin-right: 1.2rem; +} + +.o-list__link { + display: flex; + align-items: center; + margin-bottom: 2.4rem; +} + p { margin-bottom: 3.2rem; text-align: justify; } -p:has( + ul) { +p:has( + ul), +p:has( + ol) { margin-bottom: 1rem; } -article p:last-child { +article p:last-child, +section p:last-child { margin-bottom: 0; } @@ -118,5 +140,6 @@ article p:last-child { background-color: var(--bg-default); padding: 2rem; border-radius: var(--border-radius-l); + margin-bottom: 2.4rem; } diff --git a/assets/sass/teaser.scss b/assets/sass/teaser.scss index 30721b3e..a484a2db 100644 --- a/assets/sass/teaser.scss +++ b/assets/sass/teaser.scss @@ -11,6 +11,15 @@ .m-teaser--listview { margin-bottom: 2.4rem; + display: flex; + + @include media-breakpoint-down(md) { + flex-flow: wrap; + } +} + +.m-teaser__image { + margin-right: 1.6rem; } .m-teaser img { diff --git a/assets/sass/textHighlight.scss b/assets/sass/textHighlight.scss index bb666c2a..f251f2a8 100644 --- a/assets/sass/textHighlight.scss +++ b/assets/sass/textHighlight.scss @@ -3,7 +3,7 @@ padding: 1.2rem; margin-bottom: 1.2rem; border-radius: var(--border-radius-m); - border-left: var() solid 1rem; + border-left: var(--bg-neutral) solid 1rem; } .m-text-highlight--tip { diff --git a/assets/svg/default/add.svg b/assets/svg/default/add.svg new file mode 100644 index 00000000..b9ec09db --- /dev/null +++ b/assets/svg/default/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/arrow_back.svg b/assets/svg/default/arrow_back.svg new file mode 100644 index 00000000..7db66604 --- /dev/null +++ b/assets/svg/default/arrow_back.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/arrow_outward.svg b/assets/svg/default/arrow_outward.svg new file mode 100644 index 00000000..6195a381 --- /dev/null +++ b/assets/svg/default/arrow_outward.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/close.svg b/assets/svg/default/close.svg new file mode 100644 index 00000000..a6e6ae04 --- /dev/null +++ b/assets/svg/default/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/edit_square.svg b/assets/svg/default/edit_square.svg new file mode 100644 index 00000000..455aaa9b --- /dev/null +++ b/assets/svg/default/edit_square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/keyboard_arrow_down.svg b/assets/svg/default/keyboard_arrow_down.svg new file mode 100644 index 00000000..d21eabb1 --- /dev/null +++ b/assets/svg/default/keyboard_arrow_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/list.svg b/assets/svg/default/list.svg new file mode 100644 index 00000000..13f4d083 --- /dev/null +++ b/assets/svg/default/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/menu.svg b/assets/svg/default/menu.svg new file mode 100644 index 00000000..e7419253 --- /dev/null +++ b/assets/svg/default/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/remove.svg b/assets/svg/default/remove.svg new file mode 100644 index 00000000..eeb8b232 --- /dev/null +++ b/assets/svg/default/remove.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/svg/default/view_cozy.svg b/assets/svg/default/view_cozy.svg new file mode 100644 index 00000000..bee02ab1 --- /dev/null +++ b/assets/svg/default/view_cozy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/content/_index.de.md b/content/_index.de.md index 5d41c09c..d56c6070 100644 --- a/content/_index.de.md +++ b/content/_index.de.md @@ -1,12 +1,10 @@ ## Willkommen beim FIP Guide! -Die Community-Website für alle Informationen zu FIP (Groupement pour les facilités de circulation internationales du personnel des chemins de fer) - Die Vereinigung für die internationalen Fahrvergünstigungen des Eisenbahnpersonals. -Mit dieser internationalen Ermäßigungskarte für Eisenbahnpersonal können Mitarbeiterinnen und Mitarbeiter zu vergünstigten Konditionen in Europa beispielsweise Züge, Schiffe und Busse nutzen. -In diesem Projekt sind Informationen und Nutzungshinweise zu FIP sowie Besonderheiten zu den jeweiligen beteiligten Bahngesellschaften aufgeführt. +Die Community-Website für alle Informationen zu FIP (internationale Fahrvergünstigungen für Eisenbahnpersonal). +In diesem Projekt sind Informationen und Nutzungshinweise zu FIP sowie Besonderheiten zu den jeweiligen beteiligten Bahngesellschaften aufgeführt. -Momentan gibt es die Infos für die Länder **Belgien** und **Slowakei**. - -Der aktuellen Bearbeitungsstand der Informationen für Betreiber ist hier zu finden: [Content Status](https://github.com/orgs/fipguide/projects/3) +* [Grundlegende Informationen zu FIP]({{< ref "generalinformation" >}}) +* [Übersicht der Länder]({{< ref "country" >}}) ### Unterstütze uns Du möchtest dein Wissen rund um FIP-Regelungen teilen? Schau auf unserem [GitHub Repository](https://github.com/fipguide/fipguide.github.io) vorbei, um Inhalte beizutragen. diff --git a/content/_index.en.md b/content/_index.en.md index fcd2e01e..05241bf5 100644 --- a/content/_index.en.md +++ b/content/_index.en.md @@ -1,12 +1,10 @@ ## Welcome to the FIP Guide! -The community website for all information about FIP (Groupement pour les facilités de circulation internationales du personnel des chemins de fer) - The association for international travel benefits for railway staff. -With this international discount card for railway staff, employees can use trains, ships, and buses in Europe at reduced rates. -This project includes information and usage instructions for FIP as well as special features of the respective participating railway companies. +The community website for all information about FIP. +This project includes information and usage instructions for FIP as well as special features of the respective participating railway companies. -Currently, information for the countries **Belgium** and **Slovakia** are available. - -You can see the current information status for operators here: [Content Status](https://github.com/orgs/fipguide/projects/3) +* [Basic information about FIP]({{< ref "generalinformation" >}}) +* [Overview of countries]({{< ref "country" >}}) ### Support Us Would you like to share your knowledge about FIP regulations? Visit our [GitHub Repository](https://github.com/fipguide/fipguide.github.io) to contribute content. diff --git a/content/country/belgium/image.webp b/content/country/belgium/image.webp new file mode 100644 index 00000000..978b32bd Binary files /dev/null and b/content/country/belgium/image.webp differ diff --git a/content/country/netherlands/image.webp b/content/country/netherlands/image.webp new file mode 100644 index 00000000..330856bd Binary files /dev/null and b/content/country/netherlands/image.webp differ diff --git a/content/country/slovakia/image.webp b/content/country/slovakia/image.webp new file mode 100644 index 00000000..9b59dd30 Binary files /dev/null and b/content/country/slovakia/image.webp differ diff --git a/content/generalInformation.de.md b/content/generalInformation.de.md index 4b17756e..c04da6c8 100644 --- a/content/generalInformation.de.md +++ b/content/generalInformation.de.md @@ -1,10 +1,31 @@ --- -date: "2024-10-17" +date: "2025-03-25" title: "Übergreifende Infos" --- -Willkommen auf unserer Webseite! Hier finden Sie alle wichtigen Informationen rund um unser Projekt. +Hier findest du übergreifende Informationen zum FIP Guide. -## Über uns +## Was ist FIP? -Wir sind ein engagiertes Team, das sich zum Ziel gesetzt hat, hochwertige Inhalte und Ressourcen bereitzustellen. Unser Fokus liegt auf der Bereitstellung von nützlichen Informationen für unsere Nutzer. +FIP steht für _Groupement pour les facilités de circulation internationales du personnel des chemins de fer_. Es ist die Vereinigung für die internationalen Fahrvergünstigungen des Eisenbahnpersonals. +Mit dieser internationalen Ermäßigungskarte für Eisenbahnpersonal können Mitarbeiterinnen und Mitarbeiter zu vergünstigten Konditionen in Europa beispielsweise Züge, Schiffe und Busse nutzen. +In diesem Projekt sind Informationen und Nutzungshinweise zu FIP sowie Besonderheiten zu den jeweiligen beteiligten Bahngesellschaften aufgeführt. + +## Welche Vergünstigungen erhalte ich durch FIP? + +Es gibt zwei Möglichkeiten zur Nutzung: +1. **FIP-Card:** die FIP-Card ist drei Jahre gültig und berechtigt zum unlimitierten Kauf von vergünstigten Bahntickets im Ausland. +2. **FIP-Coupons:** pro Jahr und FIP-Mitglied kannst du FIP-Coupons erhalten, welche für bis zu acht Tage ermöglichen. + +Die genauen Regelungen findest du auf den Unterseiten der [Betreiber]({{< ref "operator" >}}). + +## Wie kann ich FIP in Anspruch nehmen? + +Mitarbeiterinnen und Mitarbeiter eines FIP-Mitglieds sind nach 12 Monaten Betriebszugehörigkeit berechtigt, FIP-Einrichtungen zu nutzen. +Bitte wende dich für die Beantragung und Inanspruchnahme an deine Personalabteilung. + +## Wer steckt hinter dem FIP Guide? + +Wir sind ein engagiertes Team von Bahn-Mitarbeitenden, welche selbst regelmäßig FIP nutzen. +Unser Ziel ist, eine schnell und einfach nutzbare Übersicht zur Nutzung von FIP bereitzustellen. +Unser Fokus liegt auf der Bereitstellung von nützlichen Informationen für die Nutzerinnen und Nutzer. diff --git a/content/generalInformation.en.md b/content/generalInformation.en.md index 5e773288..68f5c6a8 100644 --- a/content/generalInformation.en.md +++ b/content/generalInformation.en.md @@ -1,11 +1,31 @@ --- -date: "2024-10-17" +date: "2025-03-25" title: "General Information" --- -Welcome to our website! Here you will find all the important information about our project. +Here you will find comprehensive information about the FIP Guide. -## About Us +## What is FIP? -We are a dedicated team committed to providing high-quality content and resources. Our focus is on delivering useful information to our users. +FIP stands for _Groupement pour les facilités de circulation internationales du personnel des chemins de fer_. It is the association for international travel concessions for railway personnel. +With this international discount card for railway personnel, employees can use trains, ships, and buses in Europe at reduced rates. +This project provides information and usage instructions for FIP as well as specifics about the participating railway companies. +## What discounts do I get through FIP? + +There are two ways to use it: +1. **FIP Card:** The FIP Card is valid for three years and entitles the holder to unlimited purchase of discounted train tickets abroad. +2. **FIP Coupons:** Each year, FIP members can receive FIP Coupons, which allow for up to eight days of travel. + +You can find the exact regulations on the subpages of the [operators]({{< ref "operator" >}}). + +## How can I take advantage of FIP? + +Employees of a FIP member are eligible to use FIP facilities after 12 months of employment. +Please contact your HR department for application and usage. + +## Who is behind the FIP Guide? + +We are a dedicated team of railway employees who regularly use FIP ourselves. +Our goal is to provide a quick and easy-to-use overview for using FIP. +Our focus is on providing useful information for users. \ No newline at end of file diff --git a/hugo.yaml b/hugo.yaml index 76ce9d41..d29a59a3 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -19,8 +19,6 @@ module: mounts: - source: "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" target: "assets/js/bootstrap.bundle.min.js" - - source: "node_modules/@material-design-icons/font/material-icons-round.woff2" - target: "static/css/material-icons-round.woff2" - source: "assets" target: "assets" - source: "static" diff --git a/i18n/de.yaml b/i18n/de.yaml index 9e1f74cf..3d071fa5 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -24,4 +24,6 @@ related: Verwandte Seiten toc_name: Inhalt _operator__nearby: Angrenzende Betreiber toc-backlink: Zurück zu -editPage: Seite bearbeiten \ No newline at end of file +editPage: Seite bearbeiten +list-disclaimer: Momemtan sind noch nicht für alle Länder und Betreiber Informationen verfügbar. Den aktuellen Bearbeitungsstand findest du auf +list-disclaimer-link: GitHub \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml index d6b17da8..b9623143 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -24,4 +24,6 @@ related: Related Pages toc_name: Contents _operator__nearby: Neighboring Operators toc-backlink: Back to -editPage: Edit page \ No newline at end of file +editPage: Edit page +list-disclaimer: Currently, information is not yet available for all countries and operators. You can see the current information status on +list-disclaimer-link: GitHub \ No newline at end of file diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 00000000..d9bf1067 --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1,6 @@ +{{- $url := .Destination -}} +{{- if strings.HasPrefix $url "http" -}} +{{ .Text }}{{ partial "ico" (dict "icon" "arrow_outward" ) }} +{{- else -}} +{{ .Text }} +{{- end -}} \ No newline at end of file diff --git a/layouts/_default/home.html b/layouts/_default/home.html index e5612e34..93453499 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -8,7 +8,7 @@

{{ T "news-headline"}}

{{ range first 3 (where site.RegularPages "Section" "news") }} - {{ partial "teaser.html" . }} + {{ partial "teaser.html" (dict "listview" false "type" "news" "page" .) }} {{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 29c1701f..67577463 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,12 +4,10 @@ {{ $path := .RelPermalink }} {{ $cleanPath := replaceRE "^/[^/]+/" "/" $path }} {{ $key := printf "%s_list_title" (replace $cleanPath "/" "_" -1) }} + {{ $type := .Type }}

{{ i18n $key }}

{{ .Content }} {{ range .Pages }} - -

{{ .LinkTitle }}

-
{{ .Summary | plainify | truncate 200 }}
-
+ {{ partial "teaser.html" (dict "listview" "true" "page" .) }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0c39541d..d7292338 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,6 +10,5 @@

{{ .Title }}

{{ partial "related.html" . }} - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ end }} \ No newline at end of file diff --git a/layouts/country/list.html b/layouts/country/list.html new file mode 100644 index 00000000..cf2d744b --- /dev/null +++ b/layouts/country/list.html @@ -0,0 +1,27 @@ +{{ define "main" }} +
+
+ {{ $path := .RelPermalink }} + {{ $cleanPath := replaceRE "^/[^/]+/" "/" $path }} + {{ $key := printf "%s_list_title" (replace $cleanPath "/" "_" -1) }} +

{{ i18n $key }}

+

+ {{ T "list-disclaimer"}} + {{ T "list-disclaimer-link"}}. +

+
+
+ {{ .Content }} {{ range .Pages }} + +
+ {{ $image := .Page.Resources.GetMatch "image.webp" }} + {{ partial "image.html" $image }} +
+
+ {{ .Title }} +
+
+ {{ end }} +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/country/single.html b/layouts/country/single.html index a37a8248..737ed645 100644 --- a/layouts/country/single.html +++ b/layouts/country/single.html @@ -17,9 +17,11 @@

{{ .Title }}

{{ .Content }} +
+ + Hier kommt eine Liste mit allen enthaltenen Bahngesellschaften rein – TO BE CONTINUED :) +
- - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ end }} \ No newline at end of file diff --git a/layouts/operator/list.html b/layouts/operator/list.html new file mode 100644 index 00000000..86ce774c --- /dev/null +++ b/layouts/operator/list.html @@ -0,0 +1,21 @@ +{{ define "main" }} +
+
+ {{ $path := .RelPermalink }} + {{ $cleanPath := replaceRE "^/[^/]+/" "/" $path }} + {{ $key := printf "%s_list_title" (replace $cleanPath "/" "_" -1) }} +

{{ i18n $key }}

+

+ {{ T "list-disclaimer"}} + {{ T "list-disclaimer-link"}}. +

+
+ +
+{{ end }} \ No newline at end of file diff --git a/layouts/operator/single.html b/layouts/operator/single.html index 928b033f..871ac777 100644 --- a/layouts/operator/single.html +++ b/layouts/operator/single.html @@ -18,8 +18,6 @@

{{ .Title }}

- - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/_ico.html b/layouts/partials/_ico.html new file mode 100644 index 00000000..87a9aa04 --- /dev/null +++ b/layouts/partials/_ico.html @@ -0,0 +1,49 @@ +{{/* Source:https://gitlab.com/Roneo/hugo-shortcode-roneo-collection */}} +{{ $item := "" }} +{{ $theme := "" }} +{{ $class := "" }} +{{ $href := "" }} +{{ $title := "" }} +{{ if reflect.IsMap . }} + {{ $item = .icon }} + {{ $theme = .theme }} + {{ $class = .class }} + {{/* {{ warnf "themeInsideMap: %s" $theme }} */}} + {{ $title = .title }} + {{ else }} + {{ $item = . }} +{{ end }} +{{ $theme := $theme | default "default" }} +{{ $classes := "" }} +{{/* {{ warnf "themeAfterLoop: %s" $theme }} */}} +{{ $file := "" }} +{{/* ?? Check data type ? See https://www.brijumaquio.com/get-data-type-in-hugo-framework */}} +{{ if eq (printf "%T" $item) "*resources.resourceAdapter" }} + {{ $file = $item }} +{{ else if eq (printf "%T" $item) "string" }} + {{ $folder := $theme }} + {{/* {{ warnf "themeToFolder: %s" $theme }} */}} + {{/* {{ warnf "folderFromTheme : %s" $folder }} */}} + {{ $classes = printf "%v%v%v%v%v" $theme " ico ico-" $item " " $class }} + {{ $path := printf "svg/%s/%s.svg" $folder $item }} + {{ $file = resources.Get $path }} + {{/* {{ warnf "Loading icon from ico.html shortcode: %s" $item }} */}} + {{/* {{ warnf "theme: %s" $theme }} */}} +{{ else }} + {{/* Get the filename, remove extension, add custom classes */}} + {{ $classes = print (replace (path.Base $item) ".svg" "" | anchorize) " ico " }} + {{ $file = resources.Get $item }} +{{ end }} +{{ if eq $file nil }} + {{ warnf "Error detected in ico shortcode: Icon not found: %s" $file }} + {{ return }} +{{ end }} +{{- $content := replaceRE "" "" $file.Content -}} +{{ $pattern := `[\s\S]*?([\s\S]*)([\s\S]*)?([\s\S]*)([\s\S]*)?` }} +{{ $replaceWith := "" }} +{{ with $title }} + {{ $replaceWith = printf `` $classes . }} +{{ else }} + {{ $replaceWith = printf `` $classes }} +{{ end }} +{{- return ($content | replaceRE $pattern $replaceWith | safeHTML) -}} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 4ebe3229..76f097de 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,9 +1,9 @@