diff --git a/module/static/css/style.css b/module/assets/css/style.css similarity index 100% rename from module/static/css/style.css rename to module/assets/css/style.css diff --git a/module/static/js/submenu.js b/module/assets/js/submenu.js similarity index 100% rename from module/static/js/submenu.js rename to module/assets/js/submenu.js diff --git a/module/hugo.yaml b/module/hugo.yaml index 35893e5..561c3a0 100644 --- a/module/hugo.yaml +++ b/module/hugo.yaml @@ -26,8 +26,8 @@ params: siteProdUrl: "https://hugoguide.org" supportEmail: "support@hugoguide.org" githubUrl: "https://github.com/nkdAgility/HugoGuides" - previewSiteUrl: https://preview.hugoguides.org/ - productionSiteUrl: https://hugoguides.org/ + previewSiteUrl: https://preview.hugoguides.org + productionSiteUrl: https://hugoguides.org brand: bg_colour: "#135289" AzureSitesConfig: "#{Guides_AzureSitesConfig}#" diff --git a/module/layouts/_partials/components/guide/render-guide.html b/module/layouts/_partials/components/guide/render-guide.html index 316424d..5fb9c4b 100644 --- a/module/layouts/_partials/components/guide/render-guide.html +++ b/module/layouts/_partials/components/guide/render-guide.html @@ -1,4 +1,13 @@ -{{- $isComingSoon := and .Date (lt now .Date) (eq hugo.Environment "production") }} +{{- $isTranslationDraft := and .Params.translationDraft (eq hugo.Environment "production") }} +{{- $isTranslationPreview := .Params.translationDraft}} +{{- if $isTranslationDraft }} + {{- warnf "This guide is a translation draft and may not be fully complete or accurate." }} +{{- end }} + +{{- /* Check if content is available */ -}} +{{- $contentAvailable := and .Page.Content (gt (len .Page.Content) 500) (not $isTranslationDraft) }} + +
@@ -44,7 +53,7 @@

{{ i18n "guide_ta
- {{- if and .Page.Content (gt (len .Page.Content) 100) }} + {{- if $contentAvailable }} {{ .Page.TableOfContents }} {{ else }} {{- /* Get the default guide content as fallback */ -}} @@ -67,7 +76,8 @@

{{ i18n "guide_ta
-
+
+ {{- /* Header with title, date, and download buttons */ -}}

{{ .Title }}

@@ -180,9 +190,7 @@

{{ i18n "guide_ta

- {{- if $isComingSoon }} - - {{ else }} + {{- /* Version notice for historical versions */ -}} {{ partial "components/guide/guide-version-notice.html" . }} @@ -227,7 +235,13 @@

{{ i18n "guide_ta {{- end }} {{- /* Check if content is empty and provide fallback */ -}} - {{- if .Content }} + {{- if $contentAvailable }} + {{- if $isTranslationPreview }} + + {{- end -}} {{ .Content }} {{- else }} {{- /* Get the default guide content as fallback */ -}} @@ -237,11 +251,15 @@

{{ i18n "guide_ta {{- if not $thisPageDefault }} {{- fmt.Errorf "thisPageDefault page not found" }} {{- end }} - + {{- if $thisPageDefault }}
{{ $thisPageDefault.Content }} @@ -254,8 +272,6 @@

{{ i18n "guide_ta

{{- end }} {{- end }} - - {{- end }}