Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exampleSite/content/de
/resources/
/exampleSite/resources/
/exampleSite/data/sprites/
/public/
VERSION

# hugo
Expand Down
33 changes: 33 additions & 0 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,36 @@ pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"

custom_product_of_cybertec: Ein Produkt von CYBERTEC
custom_support_button: Support

# Taxonomy Terms
taxonomy_terms_count:
one: "{{ . }} Begriff"
other: "{{ . }} Begriffe"
taxonomy_terms_view_all_pages: "Alle Seiten für {{ . }} anzeigen"
taxonomy_terms_no_description: Keine Beschreibung verfügbar
taxonomy_terms_page_count:
one: "{{ . }} Seite"
other: "{{ . }} Seiten"
taxonomy_terms_latest_prefix: 'Neueste:'
taxonomy_terms_empty_title: Keine Begriffe gefunden
taxonomy_terms_empty_description: "Derzeit sind keine {{ . }} verfügbar."

# Taxonomy Links
taxonomy_links_browse_by_topic: "Dokumentation nach Thema durchsuchen:"
taxonomy_links_all_tags: Alle Tags
taxonomy_links_all_categories: Alle Kategorien
taxonomy_links_all_features: Alle Features

# Taxonomy Meta
taxonomy_meta_tags: Tags
taxonomy_meta_categories: Kategorien
taxonomy_meta_features: Features
taxonomy_meta_view_tagged: "Alle Seiten mit Tag '{{ . }}' anzeigen"
taxonomy_meta_view_category: "Alle Seiten in Kategorie '{{ . }}' anzeigen"
taxonomy_meta_view_feature: "Alle Seiten für Feature '{{ . }}' anzeigen"

# Accessibility & UI
skip_to_main_content: Zum Hauptinhalt springen

# Shortcodes
shortcode_expand_default: Erweitern
33 changes: 33 additions & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,36 @@ pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}"

custom_product_of_cybertec: A product of CYBERTEC
custom_support_button: Support

# Taxonomy Terms
taxonomy_terms_count:
one: "{{ . }} term"
other: "{{ . }} terms"
taxonomy_terms_view_all_pages: "View all pages for {{ . }}"
taxonomy_terms_no_description: No description available
taxonomy_terms_page_count:
one: "{{ . }} page"
other: "{{ . }} pages"
taxonomy_terms_latest_prefix: 'Latest:'
taxonomy_terms_empty_title: No terms found
taxonomy_terms_empty_description: "There are currently no {{ . }} available."

# Taxonomy Links
taxonomy_links_browse_by_topic: "Browse Documentation by Topic:"
taxonomy_links_all_tags: All Tags
taxonomy_links_all_categories: All Categories
taxonomy_links_all_features: All Features

# Taxonomy Meta
taxonomy_meta_tags: Tags
taxonomy_meta_categories: Categories
taxonomy_meta_features: Features
taxonomy_meta_view_tagged: "View all pages tagged with {{ . }}"
taxonomy_meta_view_category: "View all pages in category {{ . }}"
taxonomy_meta_view_feature: "View all pages for feature {{ . }}"

# Accessibility & UI
skip_to_main_content: Skip to main content

# Shortcodes
shortcode_expand_default: Expand
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<body itemscope itemtype="https://schema.org/WebPage">
<div class="w-full flex justify-center">
<a href="#main-content" id="gdoc-to-main" class="gdoc-markdown__link">Skip to main content</a>
<a href="#main-content" id="gdoc-to-main" class="gdoc-markdown__link">{{ i18n "skip_to_main_content" }}</a>
</div>

{{ partial "svg-icon-symbols" . }}
Expand Down
6 changes: 6 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ <h1>{{ partial "utils/title" . }}</h1>
class="gdoc-markdown gdoc-markdown__align--{{ default "left" (.Page.Params.geekdocAlign | lower) }}"
id="main-content" tabindex="-1"
>
{{ partial "page-metadata" . }}

{{- partial "taxonomy-meta" . -}}

{{ partial "utils/content" . }}

{{- partial "taxonomy-links" . -}}
</article>
{{ end }}
6 changes: 4 additions & 2 deletions layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ <h1 class="gdoc-post__title">
<div class="gdoc-post__readmore">
{{ if .Truncated }}
<a
class="flex-inline align-center fake-link"
class="taxonomy-link taxonomy-link-readmore flex-inline align-center"
title="{{ i18n "posts_read_more" }}"
href="{{ .RelPermalink }}"
>
{{ i18n "posts_read_more" }}
<i class="gdoc-icon">gdoc_arrow_right_alt</i>
<svg class="gdoc-icon" aria-hidden="true">
<use xlink:href="#gdoc_arrow_right_alt"></use>
</svg>
</a>
{{ end }}
</div>
Expand Down
127 changes: 98 additions & 29 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,103 @@
{{ define "main" }}
<div id="main-content" tabindex="-1">
{{ range .Paginator.Pages.ByTitle }}
<article class="gdoc-post">
<header class="gdoc-post__header">
<h1 class="gdoc-post__title">
<a href="{{ .RelPermalink }}">{{ partial "utils/title" . }}</a>
</h1>
</header>
<div id="main-content" tabindex="-1" class="taxonomy-terms-page">
{{- /* Page Header Section */ -}}
<header class="taxonomy-terms-header">
<h1 class="taxonomy-terms-title">{{ partial "utils/title" . }}</h1>
{{- if .Description -}}
<p class="taxonomy-terms-description">{{ .Description }}</p>
{{- end -}}
{{- if gt (len .Pages) 0 -}}
<p class="taxonomy-terms-count" aria-live="polite">
{{- $total := len .Pages -}}
{{- i18n "taxonomy_terms_count" $total -}}
</p>
{{- end -}}
</header>

<footer class="gdoc-post__meta flex align-center">
<span class="flex align-center no-wrap">
{{ $pageCount := len .Pages }}
<svg class="gdoc-icon gdoc_tag"><use xlink:href="#gdoc_tag"></use></svg>
<span class="gdoc-post__tag">
{{ i18n "posts_count" $pageCount }}
</span>
</span>
{{- /* Main Content Grid */ -}}
{{- if gt (len .Paginator.Pages) 0 -}}
<div class="taxonomy-terms-grid" role="list">
{{- range .Paginator.Pages.ByTitle -}}
{{- $pageCount := len .Pages -}}
{{- $latest := index (.Pages.ByDate.Reverse) 0 -}}
<article
class="taxonomy-term-card"
role="listitem"
aria-labelledby="term-{{ .Slug }}"
>
{{- /* Clickable Card Link - Entire card is clickable */ -}}
<a
href="{{ .RelPermalink }}"
class="taxonomy-term-card__link"
aria-label="{{ i18n "taxonomy_terms_view_all_pages" (partial "utils/title" .) }}"
>
<header class="taxonomy-term-card__header">
<h2 class="taxonomy-term-card__title" id="term-{{ .Slug }}">
{{- partial "utils/title" . -}}
</h2>
</header>

<span class="flex align-center no-wrap">
<svg class="gdoc-icon gdoc_star"><use xlink:href="#gdoc_star"></use></svg>
<span>
{{ $latest := index .Pages.ByDate 0 }}
{{ with $latest }}
<a href="{{ .RelPermalink }}">{{ partial "utils/title" . }}</a>
{{ end }}
</span>
</span>
</footer>
</article>
{{ end }}
<div class="taxonomy-term-card__body">
{{- if .Description -}}
<p class="taxonomy-term-card__description">{{ .Description | truncate 120 }}</p>
{{- else if $latest -}}
<p class="taxonomy-term-card__description">{{ $latest.Summary | plainify | truncate 120 }}</p>
{{- else -}}
<p class="taxonomy-term-card__description taxonomy-term-card__description--empty">
{{ i18n "taxonomy_terms_no_description" }}
</p>
{{- end -}}
</div>

<footer class="taxonomy-term-card__footer">
<div class="taxonomy-term-card__meta">
<span
class="taxonomy-term-card__count"
aria-label="{{ i18n "taxonomy_terms_page_count" $pageCount }}"
>
<svg class="gdoc-icon gdoc_tag" aria-hidden="true">
<use xlink:href="#gdoc_tag"></use>
</svg>
<span class="taxonomy-term-card__count-text">
{{- i18n "taxonomy_terms_page_count" $pageCount -}}
</span>
</span>

{{- if $latest -}}
<span class="taxonomy-term-card__latest">
<svg class="gdoc-icon gdoc_star" aria-hidden="true">
<use xlink:href="#gdoc_star"></use>
</svg>
<span class="taxonomy-term-card__latest-text">
{{ i18n "taxonomy_terms_latest_prefix" }}
<span class="taxonomy-term-card__latest-title">
{{- partial "utils/title" $latest | truncate 40 -}}
</span>
</span>
</span>
{{- end -}}
</div>
</footer>
</a>
</article>
{{- end -}}
</div>

{{- /* Pagination */ -}}
{{- if gt .Paginator.TotalPages 1 -}}
{{- partial "pagination.html" . -}}
{{- end -}}
{{- else -}}
{{- /* Empty State */ -}}
<div class="taxonomy-terms-empty" role="status" aria-live="polite">
<svg class="taxonomy-terms-empty__icon" aria-hidden="true">
<use xlink:href="#gdoc_tag"></use>
</svg>
<h2 class="taxonomy-terms-empty__title">{{ i18n "taxonomy_terms_empty_title" }}</h2>
<p class="taxonomy-terms-empty__description">
{{ i18n "taxonomy_terms_empty_description" .Data.Plural }}
</p>
</div>
{{- end -}}
</div>
{{ partial "pagination.html" . }}
{{ end }}
103 changes: 68 additions & 35 deletions layouts/partials/posts/metadata.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,81 @@
<span class="flex align-center no-wrap">
<svg class="gdoc-icon gdoc_date"><use xlink:href="#gdoc_date"></use></svg>
{{- /* Date Display - Use Lastmod if available, fallback to Date */ -}}
{{- $displayDate := .Lastmod -}}
{{- if $displayDate.IsZero -}}
{{- $displayDate = .Date -}}
{{- end -}}

{{- /* Check if page was updated after original publish date */ -}}
{{- $isUpdated := false -}}
{{- if and (not .Date.IsZero) (not .Lastmod.IsZero) -}}
{{- $isUpdated = .Lastmod.After (.Date.AddDate 0 0 1) -}}
{{- end -}}

{{- /* Format datetime attribute - RFC3339/ISO8601 format for proper parsing */ -}}
{{- $datetimeISO := $displayDate.Format "RFC3339" -}}

{{- /* Format human-readable date - use localized format if available */ -}}
{{- $dateFormat := "Jan 2, 2006" -}}
{{- $dateDisplay := $displayDate.Format $dateFormat -}}

{{- if not $displayDate.IsZero -}}
<span class="flex align-center no-wrap" aria-label="{{ if $isUpdated }}{{ i18n "posts_update_prefix" }} {{ end }}{{ $dateDisplay }}">
<svg class="gdoc-icon gdoc_date" aria-hidden="true">
<use xlink:href="#gdoc_date"></use>
</svg>
<span class="gdoc-post__tag">
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ if .Lastmod.After (.Date.AddDate 0 0 1) }}
{{ i18n "posts_update_prefix" }}
{{ end }}
{{ .Lastmod.Format "Jan 2, 2006" }}
<time datetime="{{ $datetimeISO }}" title="{{ $dateDisplay }}">
{{- if $isUpdated -}}
<span class="gdoc-post__date-prefix">{{ i18n "posts_update_prefix" }} </span>
{{- end -}}
<span class="gdoc-post__date-value">{{ $dateDisplay }}</span>
</time>
</span>
</span>
{{- end -}}

<span class="flex align-center no-wrap">
<svg class="gdoc-icon gdoc_timer"><use xlink:href="#gdoc_timer"></use></svg>
{{- /* Reading Time */ -}}
{{- if gt .ReadingTime 0 -}}
<span class="flex align-center no-wrap" aria-label="{{ i18n "posts_read_time" .ReadingTime }}">
<svg class="gdoc-icon gdoc_timer" aria-hidden="true">
<use xlink:href="#gdoc_timer"></use>
</svg>
<span class="gdoc-post__tag">{{ i18n "posts_read_time" .ReadingTime }}</span>
</span>
{{- end -}}

{{ $tc := 0 }}
{{ with .Params.tags }}
{{ range sort . }}
{{ $name := . }}
{{ with $.Site.GetPage (printf "/tags/%s" $name | urlize) }}
{{ if eq $tc 0 }}
{{- /* Tags Display */ -}}
{{- $tagCount := 0 -}}
{{- with .Params.tags -}}
{{- range sort . -}}
{{- $tagName := . -}}
{{- with $.Site.GetPage (printf "/tags/%s" ($tagName | urlize)) -}}
{{- if eq $tagCount 0 -}}
<span class="flex align-center no-wrap">
<svg class="gdoc-icon gdoc_bookmark"><use xlink:href="#gdoc_bookmark"></use></svg>
{{ template "post-tag" dict "name" $name "page" . }}
<svg class="gdoc-icon gdoc_bookmark" aria-hidden="true">
<use xlink:href="#gdoc_bookmark"></use>
</svg>
{{- template "post-tag" dict "name" $tagName "page" . -}}
</span>
{{ else }}
{{- else -}}
<span class="flex align-center">
{{ template "post-tag" dict "name" $name "page" . }}
{{- template "post-tag" dict "name" $tagName "page" . -}}
</span>
{{ end }}
{{ end }}
{{ $tc = (add $tc 1) }}
{{ end }}
{{ end }}
{{- end -}}
{{- end -}}
{{- $tagCount = (add $tagCount 1) -}}
{{- end -}}
{{- end -}}

{{ define "post-tag" }}
<span class="gdoc-post__tag gdoc-button gdoc-button--regular">
<a
class="gdoc-button__link"
href="{{ .page.RelPermalink }}"
title="{{ i18n "posts_tagged_with" .name }}"
>
{{ .name }}
</a>
</span>
{{ end }}
{{- /* Post Tag Template */ -}}
{{- define "post-tag" -}}
<span class="gdoc-post__tag gdoc-button gdoc-button--regular">
<a
class="gdoc-button__link"
href="{{ .page.RelPermalink }}"
title="{{ i18n "posts_tagged_with" .name }}"
aria-label="{{ i18n "posts_tagged_with" .name }}"
>
{{ .name }}
</a>
</span>
{{- end -}}
28 changes: 28 additions & 0 deletions layouts/partials/taxonomy-links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- /*
Partial: taxonomy-links
Displays navigation links to taxonomy index pages
Usage: {{ partial "taxonomy-links.html" . }}
*/ -}}
{{- if or .Site.Taxonomies.tags .Site.Taxonomies.categories .Site.Taxonomies.features -}}
<div class="taxonomy-links-container">
<p>{{ i18n "taxonomy_links_browse_by_topic" }}</p>
<div class="taxonomy-links">
{{- if .Site.Taxonomies.tags -}}
<a href="{{ "tags/" | relLangURL }}" class="taxonomy-link taxonomy-link-tags">
{{ i18n "taxonomy_links_all_tags" }}
</a>
{{- end -}}
{{- if .Site.Taxonomies.categories -}}
<a href="{{ "categories/" | relLangURL }}" class="taxonomy-link taxonomy-link-categories">
{{ i18n "taxonomy_links_all_categories" }}
</a>
{{- end -}}
{{- if .Site.Taxonomies.features -}}
<a href="{{ "features/" | relLangURL }}" class="taxonomy-link taxonomy-link-features">
{{ i18n "taxonomy_links_all_features" }}
</a>
{{- end -}}
</div>
</div>
{{- end -}}

Loading