diff --git a/exampleSite/config/_default/languages.toml b/exampleSite/config/_default/languages.toml index 303402b8..1badb703 100644 --- a/exampleSite/config/_default/languages.toml +++ b/exampleSite/config/_default/languages.toml @@ -13,6 +13,10 @@ [en.params.footer] # license = "Licensed under Creative Commons (CC BY-NC-SA 4.0)." # toml-docs-end lang-param + [en.params.sections.blog] + reference = "More Posts" + [en.params.sections.projects] + reference = "More Projects" [nl] languageName = "Nederlands" @@ -25,5 +29,8 @@ caption = "Ik doe aan programmeren en tweet memes" [nl.params.footer] # license = "Gelicenseerd onder Creative Commons (CC BY-NC-SA 4.0)." + [nl.params.sections.blog] + reference = "Meer artikelen" [nl.params.sections.projects] title = "Projecten" + reference = "Meer projecten" \ No newline at end of file diff --git a/exampleSite/content/nl/blog/bootstrap-elements.md b/exampleSite/content/nl/blog/bootstrap-elements.md deleted file mode 100644 index 4f6a93c5..00000000 --- a/exampleSite/content/nl/blog/bootstrap-elements.md +++ /dev/null @@ -1,316 +0,0 @@ ---- -author: Mark Dumay -title: Bootstrap elementen -slug: bootstrap-elementen -date: 2023-08-05 -description: Gebruik shortcodes om eenvoudig Bootstrap elementen toe te voegen. -tags: ["bootstrap", "shortcode"] -thumbnail: - url: img/boots.jpg - author: Nathan Dumlao - authorURL: https://unsplash.com/@nate_dumlao - origin: Unsplash - originURL: https://unsplash.com/photos/QLPWQvHvmII ---- - -Hinode beschikt over meerdere shortcodes om eenvoudig Bootstrap elementen toe te voegen aan je website. De [officiële documentatie]({{< param "links.hinode_docs" >}}) bevat meer details. - -## Accordion - -De volgende shortcode toont een accordion met drie elementen, waarvan de eerste is uitgeklapt. - - -{{< example lang="hugo" >}} -{{}} - {{}} - Dit is de inhoud van het eerste element met ondersteuning voor HTML. De waarde show - voor het argument class geeft aan dat het element uitgeklapt moet worden. - {{}} - {{}} - Dit is de inhoud van het tweede element. Het ondersteunt ook HTML. - {{}} - {{}} - Dit is de inhoud van het derde element. - {{}} -{{}} -{{< /example >}} - - -## Alert - -De volgende shortcode toont een waarschuwing. - - -{{< example lang="hugo" >}} -{{}} - Een eenvoudige waarschuwing -{{}} -{{< /example >}} - - -## Badge - -Gebruik HTML code om een label toe te voegen aan een titel. De Bootstrap [documentatie]({{< param "links.bs_badge_heading" >}}) beschrijft meer opties. - -{{< example >}} -

Voorbeeldtekst met grootte één Nieuw

-

Voorbeeldtekst met grootte twee Nieuw

-

Voorbeeldtekst met grootte drie Nieuw

-

Voorbeeldtekst met grootte vier Nieuw

-
Voorbeeldtekst met grootte vijf Nieuw
-
Voorbeeldtekst met grootte zes Nieuw
-{{< /example >}} - -## Breadcrumb - -De volgende shortcode toont het navigatiepad voor de blog pagina. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Button - -De volgende shortcode toont een knop met een label en een aanwijzing. - - -{{< example lang="hugo" >}} -{{}} - Inbox -{{}} -{{< /example>}} - - -## Button group - -De volgende shortcode toont een groep van drie knoppen. - - -{{< example lang="hugo" >}} -{{}} - {{}}Links{{}} - {{}}Midden{{}} - {{}}Rechts{{}} -{{}} -{{< /example >}} - - -## Card - -De volgende shortcode toont een kaart dat linkt naar de [over mij]({{< ref "about" >}}) pagina. De kaart bevat een titel. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Carousel - -De volgende shortcode toont een carousel met drie pagina's, in een verhouding van 16x9 voor een breedte van 67% op grotere schermen. - - -{{< example lang="hugo" >}} -{{}} - {{}} - {{}} - {{}} -{{}} -{{< /example >}} - - -## Collapse - -De volgende shortcode toont een knop die een informatiepaneel toont of verbergt. - - -{{< example lang="hugo" >}} -{{}} - Trigger panel -{{}} - -{{}} - Dit is een voorbeeldtekst. Het informatiepaneel is standaard verborgen maar wordt getoond als - de gebruiker op de bijbehorende knop drukt. -{{}} -{{< /example >}} - - -## Command prompt - -De volgende shortcode toont een prompt voor bash. - - -{{< example lang="hugo" >}} -{{}} -export MY_VAR=123 -{{}} -{{< /example >}} - - -Voeg `user` en `host` om de gebruikerscontext op te geven. Als aanvulling, `(out)` definieert een outputregel en `\` is een markering die aangeeft dat de regel doorgaat op de volgende regel. - - -{{< example lang="hugo" >}} -{{}} -export MY_VAR=123 -echo "hello" -(out)hello -echo one \ -two \ -three -(out)one two three -echo "goodbye" -(out)goodbye -{{}} -{{< /example >}} - - -## Docs - -Gebruik de volgende shortcode om de inhoud van een `toml` of `scss` bestand te tonen. - -{{< docs name="theme-colors" file="config/_default/params.toml" >}} - -## Example - -Gebruik de `example` shortcode om zowel de input als een voorbeeld van code te tonen. - - -{{< example lang="hugo" >}} -{{}} -export MY_VAR=123 -{{}} -{{< /example >}} - - -## File - -Gebruik de `file` shortcode om de volledige inhoud van een bestand te tonen, inclusief taalafhankelijke opmaak. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Icon - -De volgende shortcodes tonen drie verschillende iconen: - - -{{< example lang="hugo" >}} -{{}} -{{}} -{{}} -{{< /example >}} - - -## Image - -De volgende shortcode toont een plaatje met afgeronde hoeken en een 21x9 verhouding. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Nav - -De volgende shortcode toont een groep met verticale tabbladen. - - -{{< example lang="hugo" >}} - {{}} - {{}} - Dit is de inhoud van het eerste element met ondersteuning voor HTML. De waarde show - voor het argument class geeft aan dat het element uitgeklapt moet worden. - {{}} - {{}} - Dit is de inhoud van het tweede element. Het ondersteunt ook HTML. - {{}} - {{}} - Dit is de inhoud van het derde element. - {{}} - {{}} -{{< /example >}} - - -## Navbar - -De volgende shortcode toont een navigatiemenu. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Release - -De volgende shortcode toont een knop voor een nieuwe release. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Spinner - -De volgende shortcode toont een ronddraaiende cirkel. - - -{{< example lang="hugo" >}} -{{}} -Loading... -{{}} -{{< /example>}} - - -## Timeline - -De volgende shortcode toont een tijdslijn met het bestand `data/timeline-nl.yml` als input. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -## Toast - -De volgende shortcode toont een knop die een bericht laat verschijnen op het scherm. - - -{{< example lang="hugo" >}} -{{}} - Toon bericht 1 -{{}} - -{{}} - Toon bericht 2 -{{}} - -{{}} - Dit is het eerste bericht. -{{}} - -{{}} - Dit is het tweede bericht. -{{}} -{{< /example >}} - - -## Tooltip - -De volgende shortcode toont een uitleg voor een gekleurde link. - - -{{< example lang="hugo" >}} -{{}}Tooltip{{}} demonstratie -{{< /example >}} - diff --git a/exampleSite/content/nl/blog/components.md b/exampleSite/content/nl/blog/components.md deleted file mode 100644 index dc2d7a04..00000000 --- a/exampleSite/content/nl/blog/components.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -author: Mark Dumay -title: Componenten -slug: componenten -date: 2023-07-21 -description: Gebruik shortcodes om voorgedefiniëerde componenten toe te voegen die gebruikmaken van externe libraries. -tags: ["bootstrap", "shortcode"] -thumbnail: - url: img/puzzle.jpg - author: Ryoji Iwata - authorURL: https://unsplash.com/@ryoji__iwata - origin: Unsplash - originURL: https://unsplash.com/photos/5siQcvSxCP8 -modules: ["katex", "leaflet"] ---- - -Hinode biedt meerdere shortcodes aan bovenop de gebruikelijke [Bootstrap elementen]({{< relref "bootstrap-elements" >}}). Zie de [officiële documentatie]({{< param "links.hinode_docs" >}}) voor meer details. - -## Formule (KaTeX) - -De volgende markdown code genereert twee wiskundige formules met behulp van KaTeX. - -{{< example lang="markdown" >}} -Dit is een inline $-b \pm \sqrt{b^2 - 4ac} \over 2a$ formule - -Dit is geen inline formule: - -$$x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}}$$ -$$\forall x \in X, \quad \exists y \leq \epsilon$$ -{{< /example >}} - -## Map - -De volgende shortcode toont een interactieve kaart van Amsterdam. - - -{{< example lang="hugo" >}} -{{}} -{{< /example >}} - - -[bar]({{< param "links" >}}) diff --git a/i18n/de.yaml b/i18n/de.yaml index b0e242fb..4b170f6e 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -1,52 +1,42 @@ -# Content -- id: about - translation: "Über mich" +# Single pages - id: postedOnDate translation: "Veröffentlicht am {{ . }}" - id: lastModified translation: "Zuletzt verändert am {{ . }}" -- id: translationsLabel - translation: "Andere Sprachen: " -- id: translationsSeparator - translation: ", " -- id: more - translation: "Weitere {{ . }}" -- id: readMore - translation: "Weiterlesen" -- id: moreBlog - translation: "Weitere Beiträge" -- id: olderBlog - translation: "Ältere Beiträge" -- id: recentBlog - translation: "Aktuelle Beiträge" -- id: newerBlog - translation: "Neuere Beiträge" -- id: previousBlog - translation: "Vorheriger Beitrag" -- id: nextBlog - translation: "Nächster Beitrag" -- id: recentProjects - translation: "Projekte" -- id: moreProjects - translation: "Weitere Projekte" - id: read translation: "Lesezeit" - id: minutesShort translation: "Min." - id: words translation: "Wörter" -- id: copyright - translation: "Copyright" -- id: rights - translation: "Alle Rechte vorbehalten" -- id: photoBy - translation: "Foto von" -- id: photoOn - translation: "auf" +- id: photoFull + translation: "Foto von %s auf %s" +- id: photoShort + translation: "Foto von {{ . }}" +- id: draft + translation: "Entwurf" + +# List pages - id: article translation: "Artikel" - id: articles translation: "Artikel" +- id: more + translation: "Weitere {{ . }}" + +# Sharing +- id: shareLink + translation: "Diese Seite teilen" +- id: copiedToClipboard + translation: "Der Text befindet sich in die Zwischenablage" +- id: link + translation: "Link zur Webseite" +- id: code + translation: "Code" + +# Pagination +- id: paginationNav + translation: "Navigation auf der Seite" - id: paginationPrevious translation: "Vorherige" - id: paginationNext @@ -55,81 +45,65 @@ translation: "Erste" - id: paginationLast translation: "Letzte" -- id: toggleSidebar - translation: "Menünavigation anzuzeigen oder auszublenden" + +# Navigation - id: colorMode - translation: "Modus" + translation: "Thema umschalten" - id: colorLight - translation: "Licht" + translation: "Light" - id: colorDark - translation: "Dunkel" + translation: "Dark" - id: colorAuto - translation: "Automatisch" + translation: "Auto" - id: toggleMainNav translation: "Hauptmenü anzuzeigen oder auszublenden" +- id: home + translation: "Startseite" +- id: languageSwitcherLabel + translation: "Sprache" + +# Table of contents +- id: toc + translation: "Auf dieser Seite" +- id: seeAlso + translation: "Siehe auch" + +# Sidebar +- id: toggleSidebar + translation: "Menünavigation anzuzeigen oder auszublenden" + +# Feature +- id: addedFeature + translation: "Eingefügt seit {{ . }}" +- id: deprecatedFeature + translation: "Veraltet seit {{ . }}" + +# Versioning +- id: latest + translation: "neueste" +- id: allVersions + translation: "Alle Versionen" +- id: newerVersionAlert + translation: "Es gibt eine neuere Version von {{ . }}!" # 404 page - id: pageNotFound - translation: "Diese Seite existiert nicht. Versuche es über die" + translation: "Diese Seite existiert nicht. Versuche es über die {{ . }}" - id: pageNotFoundTitle translation: "Nicht gefunden" - id: pageNotFoundHome translation: "Startseite" - -# Navigation -- id: toggleNavigation - translation: "Navigation umschalten" -- id: languageSwitcherLabel - translation: "Sprache" -- id: gcseLabelShort - translation: "Suche" -- id: gcseLabelLong - translation: "Suche {{ .Site.Title }}" -- id: gcseClose - translation: "Schließen" -- id: home - translation: "Startseite" - +# Footer +- id: copyright + translation: "Copyright" +- id: rights + translation: "Alle Rechte vorbehalten" - id: poweredBy translation: "Ermöglicht durch {{ . }}." -# Staticman -- id: noComment - translation: "Kein Kommentar" -- id: oneComment - translation: "Kommentar" -- id: moreComment - translation: "Kommentare" -- id: useMarkdown - translation: "Du kannst Markdown-Syntax benutzen" -- id: yourName - translation: "Dein Name" -- id: yourEmail - translation: "Deine E-Mail-Adresse" -- id: yourWebsite - translation: "Deine Webseite" - -# Delayed Disqus +# Comments - id: show translation: "Zeige" - id: comments translation: "Kommentare" - -# Related posts -- id: seeAlso - translation: "Siehe auch" - -# Table of contents -- id: toc - translation: "Auf dieser Seite" - -# Search -- id: ui_search - translation: "Durchsuche diese Seite..." -- id: ui_no_results - translation: "Keine Ergebnisse für" - -# Draft -- id: draft - translation: "Entwurf" diff --git a/i18n/en.yaml b/i18n/en.yaml index f7dfe3ef..7e92fdc7 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,60 +1,42 @@ -# Content -- id: about - translation: "About" +# Single pages - id: postedOnDate translation: "Posted on {{ . }}" - id: lastModified translation: "Last modified on {{ . }}" -- id: translationsLabel - translation: "Other languages: " -- id: translationsSeparator - translation: ", " -- id: more - translation: "More {{ . }}" -- id: readMore - translation: "Read More" -- id: moreBlog - translation: "More Posts" -- id: olderBlog - translation: "Older Posts" -- id: recentBlog - translation: "Recent Posts" -- id: newerBlog - translation: "Newer Posts" -- id: previousBlog - translation: "Previous Post" -- id: nextBlog - translation: "Next Post" -- id: recentProjects - translation: "Projects" -- id: moreFeatures - translation: "More Features" -- id: moreGuides - translation: "More Guides" -- id: moreOpensource - translation: "More Features" -- id: moreProjects - translation: "More Projects" -- id: moreUsers - translation: "More Users" - id: read translation: "read" - id: minutesShort translation: "min" - id: words translation: "words" -- id: copyright - translation: "Copyright" -- id: rights - translation: "All rights reserved" -- id: photoBy - translation: "Photo by" +- id: photoFull + translation: "Photo by %s on %s" +- id: photoShort + translation: "Photo by {{ . }}" - id: photoOn translation: "on" +- id: draft + translation: "Draft" + +# List pages - id: article translation: "Article" - id: articles translation: "Articles" +- id: more + translation: "More {{ . }}" + +# Sharing +- id: shareLink + translation: "Share via" +- id: copiedToClipboard + translation: "copied to clipboard" +- id: link + translation: "Link" +- id: code + translation: "Code" + +# Pagination - id: paginationNav translation: "Page navigation" - id: paginationPrevious @@ -65,8 +47,8 @@ translation: "First page" - id: paginationLast translation: "Last page" -- id: toggleSidebar - translation: "Toggle sidebar navigation" + +# Navigation - id: colorMode translation: "Toggle theme" - id: colorLight @@ -77,20 +59,28 @@ translation: "Auto" - id: toggleMainNav translation: "Toggle main navigation" -- id: demo - translation: "Demo" +- id: home + translation: "Home" +- id: languageSwitcherLabel + translation: "Language" + +# Table of contents +- id: toc + translation: "On this page" +- id: seeAlso + translation: "See also" + +# Sidebar +- id: toggleSidebar + translation: "Toggle sidebar navigation" + +# Feature - id: addedFeature - translation: "Added in" + translation: "Added in {{ . }}" - id: deprecatedFeature - translation: "Deprecated in" -- id: shareLink - translation: "Share via" -- id: copiedToClipboard - translation: "copied to clipboard" -- id: link - translation: "Link" -- id: code - translation: "Code" + translation: "Deprecated in {{ . }}" + +# Versioning - id: latest translation: "latest" - id: allVersions @@ -100,65 +90,22 @@ # 404 page - id: pageNotFound - translation: "The page you are looking for does not exist or another error occurred. Try going back to our" + translation: "The page you are looking for does not exist or another error occurred. Try going back to our {{ . }}." - id: pageNotFoundTitle translation: "Page not found" - id: pageNotFoundHome translation: "home page" -# Navigation -- id: toggleNavigation - translation: "Toggle navigation" -- id: languageSwitcherLabel - translation: "Language" -- id: gcseLabelShort - translation: "Search" -- id: gcseLabelLong - translation: "Search {{ .Site.Title }}" -- id: gcseClose - translation: "Close" -- id: home - translation: "Home" - +# Footer +- id: copyright + translation: "Copyright" +- id: rights + translation: "All rights reserved" - id: poweredBy translation: "Powered by {{ . }}." -# Staticman -- id: noComment - translation: "No comment" -- id: oneComment - translation: "comment" -- id: moreComment - translation: "comments" -- id: useMarkdown - translation: "You can use Markdown syntax" -- id: yourName - translation: "Your name" -- id: yourEmail - translation: "Your email address" -- id: yourWebsite - translation: "You website" - -# Delayed Disqus +# Comments - id: show translation: "Show" - id: comments translation: "Comments" - -# Related posts -- id: seeAlso - translation: "See also" - -# Table of contents -- id: toc - translation: "On this page" - -# Search -- id: ui_search - translation: "Search this site..." -- id: ui_no_results - translation: "No results for" - -# Draft -- id: draft - translation: "Draft" diff --git a/i18n/nl.yaml b/i18n/nl.yaml index b4d38a4e..ee47dfca 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -1,64 +1,52 @@ -# Content -- id: about - translation: "Over mij" +# Single pages - id: postedOnDate translation: "Gepubliceerd op {{ . }}" - id: lastModified translation: "Laatst gewijzigd op {{ . }}" -- id: translationsLabel - translation: "Overige talen: " -- id: translationsSeparator - translation: ", " -- id: more - translation: "Meer {{ . }}" -- id: readMore - translation: "Lees meer" -- id: moreBlog - translation: "Meer berichten" -- id: olderBlog - translation: "Oudere berichten" -- id: recentBlog - translation: "Recente berichten" -- id: newerBlog - translation: "Nieuwere berichten" -- id: previousBlog - translation: "Vorig bericht" -- id: nextBlog - translation: "Volgend bericht" -- id: recentProjects - translation: "Projecten" -- id: moreProjects - translation: "Meer projecten" - id: read translation: "leestijd" - id: minutesShort translation: "min" - id: words translation: "woorden" -- id: copyright - translation: "Copyright" -- id: rights - translation: "Alle rechten voorbehouden" -- id: photoBy - translation: "Foto van" -- id: photoOn - translation: "via" +- id: photoFull + translation: "Foto van %s via %s" +- id: photoShort + translation: "Foto van {{ . }}" +- id: draft + translation: "Concept" + +# List pages - id: article translation: "Artikel" - id: articles translation: "Artikelen" +- id: more + translation: "Meer {{ . }}" + +# Sharing +- id: shareLink + translation: "Delen via" +- id: copiedToClipboard + translation: "gekopieerd naar clipboard" +- id: link + translation: "Link" +- id: code + translation: "Code" + +# Pagination - id: paginationNav translation: "Pagina navigatie" - id: paginationPrevious - translation: "Vorige" + translation: "Vorige pagina" - id: paginationNext - translation: "Volgende" + translation: "Volgende pagina" - id: paginationFirst - translation: "Eerste" + translation: "Eerste pagina" - id: paginationLast - translation: "Laatste" -- id: toggleSidebar - translation: "Toon of verberg navigatie" + translation: "Laatste pagina" + +# Navigation - id: colorMode translation: "Pas modus aan" - id: colorLight @@ -69,18 +57,28 @@ translation: "Automatisch" - id: toggleMainNav translation: "Toon of verberg hoofdnavigatie" +- id: home + translation: "Home" +- id: languageSwitcherLabel + translation: "Taal" + +# Table of contents +- id: toc + translation: "Inhoudsopgave" +- id: seeAlso + translation: "Zie ook" + +# Sidebar +- id: toggleSidebar + translation: "Toon of verberg navigatie" + +# Feature - id: addedFeature - translation: "Toegevoegd in" + translation: "Toegevoegd in {{ . }}" - id: deprecatedFeature - translation: "Verouderd in" -- id: shareLink - translation: "Delen via" -- id: copiedToClipboard - translation: "gekopieerd naar clipboard" -- id: link - translation: "Link" -- id: code - translation: "Code" + translation: "Afgeschaft in {{ . }}" + +# Versioning - id: latest translation: "meest recente" - id: allVersions @@ -90,66 +88,22 @@ # 404 page - id: pageNotFound - translation: "Deze pagina bestaat niet of er is een andere fout opgetreden. Ga terug naar het" + translation: "Deze pagina bestaat niet of er is een andere fout opgetreden. Ga terug naar het {{ . }}." - id: pageNotFoundTitle - translation: "Niet gevonden" + translation: "Pagina niet gevonden" - id: pageNotFoundHome translation: "begin" - -# Navigation -- id: toggleNavigation - translation: "Toon/verberg navigatie" -- id: languageSwitcherLabel - translation: "Taal" -- id: gcseLabelShort - translation: "Zoeken" -- id: gcseLabelLong - translation: "Zoeken op {{ .Site.Title }}" -- id: gcseClose - translation: "Sluiten" -- id: home - translation: "Home" - +# Footer +- id: copyright + translation: "Copyright" +- id: rights + translation: "Alle rechten voorbehouden" - id: poweredBy translation: "Mede mogelijk gemaakt door {{ . }}." -# Staticman -- id: noComment - translation: "Geen commentaar" -- id: oneComment - translation: "commentaar" -- id: moreComment - translation: "commentaar" -- id: useMarkdown - translation: "Je kunt Markdown syntax gebruiken" -- id: yourName - translation: "Jouw naam" -- id: yourEmail - translation: "Jouw email adres" -- id: yourWebsite - translation: "Jouw website" - -# Delayed Disqus +# Comments - id: show translation: "Tonen" - id: comments translation: "Reacties" - -# Related posts -- id: seeAlso - translation: "Zie ook" - -# Table of contents -- id: toc - translation: "Inhoudsopgave" - -# Search -- id: ui_search - translation: "Zoeken op deze site..." -- id: ui_no_results - translation: "Geen resultaten voor" - -# Draft -- id: draft - translation: "Concept" diff --git a/layouts/404.html b/layouts/404.html index bc3c1365..5ec1cd24 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,12 +1,13 @@ {{ define "main"}} -
+
{{ partial "assets/icon.html" (dict "icon" "fa face-frown fa-10x") }}

404

{{ T "pageNotFoundTitle" }}

-

{{ T "pageNotFound" }} {{ T "pageNotFoundHome" }}.

+ {{- $home := printf "%s" ("/" | relLangURL) (T "pageNotFoundHome") -}} +

{{ T "pageNotFound" $home | safeHTML }}

{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6d77f91d..091dda0e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -67,16 +67,16 @@ {{- end }} {{- if and $author $origin }} - {{ $credits = printf "%s %s %s %s" (T "photoBy") $author (T "photoOn") $origin }} + {{ $credits = printf (T "photoFull") $author $origin }} {{ else if $author }} - {{ $credits = printf "%s %s" (T "photoBy") $author }} + {{ $credits = T "photoShort" $author }} {{ end }} {{ else }} {{- $thumbnail = .Params.Thumbnail -}} {{ if or .Params.photoCredits .Params.photoSource }} {{ warnf "DEPRECATED: frontmatter variables `photoCredits` and `photoSource` have been deprecated in release v0.18: %s" .RelPermalink }} {{ end }} - {{- if and .Params.photoCredits .Params.PhotoSource }}{{ $credits = printf "%s %s %s %s" (T "photoBy") .Params.photoCredits (T "photoOn") .Params.PhotoSource }}{{ end -}} + {{- if and .Params.photoCredits .Params.PhotoSource }}{{ $credits = printf (T "photoFull") .Params.photoCredits .Params.PhotoSource }}{{ end -}} {{- end -}} {{ if $thumbnail -}} diff --git a/layouts/index.html b/layouts/index.html index b9657843..bdfa8f76 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,7 +19,10 @@ {{- $icon := $sectionPage.Params.Icon -}} {{- $content := $sectionPage.Content -}} {{- $sectionTitle := strings.FirstUpper $sectionPage.Type -}} - {{- $moreTitle := T (printf "more%s" $sectionTitle) }} + {{- $moreTitle := "" -}} + {{- with (index site.Params.sections $section) -}} + {{- with index . "reference" }}{{ $moreTitle = . }}{{ end -}} + {{- end -}} {{- $moreTitle = or $moreTitle (printf (T "more" (pluralize $sectionTitle))) -}} {{- partial "assets/section-list.html" (dict diff --git a/layouts/partials/assets/button.html b/layouts/partials/assets/button.html index 79aef9c4..dd96216f 100644 --- a/layouts/partials/assets/button.html +++ b/layouts/partials/assets/button.html @@ -139,23 +139,22 @@ {{- $attributes := .attributes -}} -
diff --git a/layouts/shortcodes/release.html b/layouts/shortcodes/release.html index 7335c503..085657a4 100644 --- a/layouts/shortcodes/release.html +++ b/layouts/shortcodes/release.html @@ -4,7 +4,9 @@ "version": Required version string, expects semver notation with a "v" prefix. "state": Optional state, either "new" or "deprecated". "short": Optional flag to indicate the release button should use short notation. + "size" Optional size of the button, either "sm", "md" (default), or "lg". "class": Optional class attribute of the button element. + "inline": If set, renders the release button inline (defaults to false). --> {{- $error := false -}} @@ -47,25 +49,56 @@ {{- $color = "secondary" -}} {{- end -}} +{{- $icon := "" -}} +{{- $tooltip := "" -}} +{{- if eq $state "deprecated" -}} + {{- if $short -}} + {{- $icon = "fas trash-can" -}} + {{- $tooltip = T "deprecatedFeature" $version -}} + {{ else }} + {{- $title = T "deprecatedFeature" $version -}} + {{- end -}} +{{- else -}} + {{- if $short -}} + {{- $icon = "fas rocket" -}} + {{- $tooltip = T "addedFeature" $version -}} + {{ else }} + {{- $title = T "addedFeature" $version -}} + {{- end -}} +{{- end -}} + + {{- if not $short -}} {{- if eq $state "deprecated" -}} - {{- $title = (printf "Deprecated in %s" $version) -}} + {{- $title = T "deprecatedFeature" $version -}} {{- else -}} - {{- $title = (printf "Added in %s" $version) -}} + {{- $title = T "addedFeature" $version -}} {{- end -}} {{- end -}} +{{- $size := "md" -}} +{{- with .Get "size" }}{{ $size = . }}{{ end -}} +{{- $supportedSizes := slice "sm" "md" "lg" -}} +{{- if not (in $supportedSizes $size) -}} + {{- errorf "Invalid value for param 'size': %s" .Position -}} + {{- $error = true -}} +{{- end -}} + {{- $class := .Get "class" -}} {{- if not $error -}} -
+ {{- if not $inline }}
{{ end -}} {{- partial "assets/button.html" (dict "title" $title "href" (partial "partials/utilities/URLJoin.html" (dict "base" site.Params.docs.release "path" $version)) "size" "sm" "color" $color "outline" "true" + "size" $size + "icon" $icon + "tooltip" $tooltip + "order" "first" "class" (trim (printf "rounded-2 fw-semibold %s" $class) " ")) -}} -
+ {{- if not $inline }}
{{ end -}} {{- end -}} diff --git a/package-lock.json b/package-lock.json index f1c5f058..2012f0a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gethinode/hinode", - "version": "0.18.0-alpha2", + "version": "0.18.0-beta", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@gethinode/hinode", - "version": "0.18.0-alpha2", + "version": "0.18.0-beta", "license": "MIT", "devDependencies": { "@fullhuman/postcss-purgecss": "^5.0.0", diff --git a/package.json b/package.json index 28952a09..3b94532f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gethinode/hinode", - "version": "0.18.0-alpha2", + "version": "0.18.0-beta", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "keywords": [ "hugo", @@ -17,8 +17,8 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { - "start": "hugo server --bind=0.0.0.0 --disableFastRender", - "start:example": "hugo server --bind=0.0.0.0 --disableFastRender -s exampleSite", + "start": "hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings", + "start:example": "hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings -s exampleSite", "start:prod": "hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings -e production", "prebuild": "npm run clean:public && npm run -s mod:install", "build": "hugo --gc --minify",