From 13e6e7d4eef835aa8368dafdd3d9dc4144ebd72f Mon Sep 17 00:00:00 2001 From: "Dedy F. Setyawan" Date: Wed, 16 Jul 2025 23:51:25 +0700 Subject: [PATCH 1/3] fix(docs): Resolve logo overlap on tablet view Signed-off-by: Dedy F. Setyawan --- docs/layouts/partials/docs/top-header.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/layouts/partials/docs/top-header.html b/docs/layouts/partials/docs/top-header.html index 414d0a61e3ad..45394acb2b64 100644 --- a/docs/layouts/partials/docs/top-header.html +++ b/docs/layouts/partials/docs/top-header.html @@ -9,8 +9,8 @@ {{ end }}
- {{ with resources.Get "images/logos/logo.svg" }} - {{ .Content | safeHTML }} + {{ with resources.Get "images/logos/mark.svg" }} + Logo {{ end }}
@@ -44,7 +44,7 @@ {{ end }} {{ end -}} -
+
Star us on GitHub ! 
Star From 5013add8023bd81f97f24f169488668c089a947f Mon Sep 17 00:00:00 2001 From: "Dedy F. Setyawan" Date: Thu, 17 Jul 2025 23:27:24 +0700 Subject: [PATCH 2/3] fix(docs): Adjust header logo size Signed-off-by: Dedy F. Setyawan --- docs/assets/css/custom.css | 4 + docs/layouts/partials/docs/head.html | 116 +++++++++++++++++++++ docs/layouts/partials/docs/top-header.html | 6 +- 3 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 docs/assets/css/custom.css create mode 100644 docs/layouts/partials/docs/head.html diff --git a/docs/assets/css/custom.css b/docs/assets/css/custom.css new file mode 100644 index 000000000000..d912cb3ce1ab --- /dev/null +++ b/docs/assets/css/custom.css @@ -0,0 +1,4 @@ +.header-logo svg { + width: 32px; + height: 32px; +} diff --git a/docs/layouts/partials/docs/head.html b/docs/layouts/partials/docs/head.html new file mode 100644 index 000000000000..120ddd5a946f --- /dev/null +++ b/docs/layouts/partials/docs/head.html @@ -0,0 +1,116 @@ + + + + {{- $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} + {{- if eq $url "/" }} + {{- .Site.Title }} + {{- else }} + {{- if .Params.heading }} + {{ .Params.heading }} + {{ else }} + {{- if eq .Title .Site.Title }} + {{- .Title }} + {{- else }} + {{- .Title }} | {{ .Site.Params.docs.Title | default (.Site.Title) }} + {{- end }} + {{- end }} + {{- end -}} + + {{- if not hugo.IsProduction }} + + {{- end }} + + {{- with .Description | default ($.Param "description") }} + + {{- end }} + + + + + + + {{ block "favicon" . }}{{ partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/favicon.html") . }}{{ end }} + {{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/opengraph") . }} + {{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/twitter_cards") . }} + + {{- with .Site.Title }} + + {{- end }} + + {{ if eq .Site.Params.docs.darkMode true -}} + {{ $darkModeInit := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/darkmode-init.js") | js.Build | minify -}} + + {{ end -}} + + {{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}} + {{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}} + {{ else }} + {{ $flexSearch := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/flexsearch.bundle.js") }} + {{- if not hugo.IsServer }} + {{ $flexSearch := $flexSearch | minify | fingerprint "sha384" }} + + {{ else }} + + {{ end }} + {{ end }} + {{ end }} + + {{- partialCached "google-fonts" . }} + + {{- $options := dict "enableSourceMap" true }} + {{- if hugo.IsProduction}} + {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }} + {{- end }} + {{- $style := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/style.scss") }} + {{- $style = $style | resources.ExecuteAsTemplate (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/style.scss") . | css.Sass $options }} + {{- if hugo.IsProduction }} + {{- $style = $style | minify | fingerprint "sha384" }} + {{- end -}} + + {{- $customCss := resources.Get "css/custom.css" }} + {{- if hugo.IsProduction }} + {{- $customCss = $customCss | minify | fingerprint "sha384" }} + {{- end -}} + + + {{- if .Params.katex -}} + {{- $options := dict "enableSourceMap" true }} + {{- if hugo.IsProduction}} + {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }} + {{- end -}} + {{- $katexCSS := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/katex.scss") }} + {{- $katexCSS = $katexCSS | resources.ExecuteAsTemplate (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/katex.scss") . | css.Sass $options }} + {{- if hugo.IsProduction }} + {{- $katexCSS = $katexCSS | minify | fingerprint "sha384" }} + {{- end -}} + + {{- end -}} + + {{- if .Params.katex -}} + {{ $katex := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/katex.js") }} + {{ $katexAutoRender := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/auto-render.js") }} + {{ if hugo.IsProduction }} + {{ $katex = $katex | minify | fingerprint "sha384" }} + {{ $katexAutoRender = $katexAutoRender | minify | fingerprint "sha384" }} + {{- end -}} + + + {{ end -}} + + + {{ if .Params.katex }} + {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "footer/katex.html") . -}} + {{ end }} + + {{- if not hugo.IsServer }} + {{ if and (.Site.Params.plausible.scriptURL | default "https://plausible.io") (.Site.Params.plausible.dataDomain) -}} + {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/plausible") . }} + {{- end -}} + {{- end -}} + + {{- if not hugo.IsServer }} + {{- if .Site.Config.Services.GoogleAnalytics.ID }} + {{- template "_internal/google_analytics.html" . -}} + {{- end -}} + {{- end -}} + diff --git a/docs/layouts/partials/docs/top-header.html b/docs/layouts/partials/docs/top-header.html index 45394acb2b64..67e553bd18a3 100644 --- a/docs/layouts/partials/docs/top-header.html +++ b/docs/layouts/partials/docs/top-header.html @@ -8,9 +8,9 @@ {{ .Content | safeHTML }} {{ end }}
-
- {{ with resources.Get "images/logos/mark.svg" }} - Logo + From ec1e25b5e695a615b25fec2dfc8df397ad596560 Mon Sep 17 00:00:00 2001 From: "Dedy F. Setyawan" Date: Fri, 18 Jul 2025 20:39:02 +0700 Subject: [PATCH 3/3] refactor(docs): Rework header logo sizing implementation Signed-off-by: Dedy F. Setyawan --- docs/assets/css/custom.css | 4 - docs/layouts/partials/docs/head.html | 116 --------------------- docs/layouts/partials/docs/top-header.html | 6 ++ 3 files changed, 6 insertions(+), 120 deletions(-) delete mode 100644 docs/assets/css/custom.css delete mode 100644 docs/layouts/partials/docs/head.html diff --git a/docs/assets/css/custom.css b/docs/assets/css/custom.css deleted file mode 100644 index d912cb3ce1ab..000000000000 --- a/docs/assets/css/custom.css +++ /dev/null @@ -1,4 +0,0 @@ -.header-logo svg { - width: 32px; - height: 32px; -} diff --git a/docs/layouts/partials/docs/head.html b/docs/layouts/partials/docs/head.html deleted file mode 100644 index 120ddd5a946f..000000000000 --- a/docs/layouts/partials/docs/head.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - {{- $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} - {{- if eq $url "/" }} - {{- .Site.Title }} - {{- else }} - {{- if .Params.heading }} - {{ .Params.heading }} - {{ else }} - {{- if eq .Title .Site.Title }} - {{- .Title }} - {{- else }} - {{- .Title }} | {{ .Site.Params.docs.Title | default (.Site.Title) }} - {{- end }} - {{- end }} - {{- end -}} - - {{- if not hugo.IsProduction }} - - {{- end }} - - {{- with .Description | default ($.Param "description") }} - - {{- end }} - - - - - - - {{ block "favicon" . }}{{ partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/favicon.html") . }}{{ end }} - {{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/opengraph") . }} - {{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "head/twitter_cards") . }} - - {{- with .Site.Title }} - - {{- end }} - - {{ if eq .Site.Params.docs.darkMode true -}} - {{ $darkModeInit := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/darkmode-init.js") | js.Build | minify -}} - - {{ end -}} - - {{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}} - {{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}} - {{ else }} - {{ $flexSearch := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/flexsearch.bundle.js") }} - {{- if not hugo.IsServer }} - {{ $flexSearch := $flexSearch | minify | fingerprint "sha384" }} - - {{ else }} - - {{ end }} - {{ end }} - {{ end }} - - {{- partialCached "google-fonts" . }} - - {{- $options := dict "enableSourceMap" true }} - {{- if hugo.IsProduction}} - {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }} - {{- end }} - {{- $style := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/style.scss") }} - {{- $style = $style | resources.ExecuteAsTemplate (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/style.scss") . | css.Sass $options }} - {{- if hugo.IsProduction }} - {{- $style = $style | minify | fingerprint "sha384" }} - {{- end -}} - - {{- $customCss := resources.Get "css/custom.css" }} - {{- if hugo.IsProduction }} - {{- $customCss = $customCss | minify | fingerprint "sha384" }} - {{- end -}} - - - {{- if .Params.katex -}} - {{- $options := dict "enableSourceMap" true }} - {{- if hugo.IsProduction}} - {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }} - {{- end -}} - {{- $katexCSS := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/katex.scss") }} - {{- $katexCSS = $katexCSS | resources.ExecuteAsTemplate (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/katex.scss") . | css.Sass $options }} - {{- if hugo.IsProduction }} - {{- $katexCSS = $katexCSS | minify | fingerprint "sha384" }} - {{- end -}} - - {{- end -}} - - {{- if .Params.katex -}} - {{ $katex := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/katex.js") }} - {{ $katexAutoRender := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/auto-render.js") }} - {{ if hugo.IsProduction }} - {{ $katex = $katex | minify | fingerprint "sha384" }} - {{ $katexAutoRender = $katexAutoRender | minify | fingerprint "sha384" }} - {{- end -}} - - - {{ end -}} - - - {{ if .Params.katex }} - {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "footer/katex.html") . -}} - {{ end }} - - {{- if not hugo.IsServer }} - {{ if and (.Site.Params.plausible.scriptURL | default "https://plausible.io") (.Site.Params.plausible.dataDomain) -}} - {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/plausible") . }} - {{- end -}} - {{- end -}} - - {{- if not hugo.IsServer }} - {{- if .Site.Config.Services.GoogleAnalytics.ID }} - {{- template "_internal/google_analytics.html" . -}} - {{- end -}} - {{- end -}} - diff --git a/docs/layouts/partials/docs/top-header.html b/docs/layouts/partials/docs/top-header.html index 67e553bd18a3..ba2603bf3ac2 100644 --- a/docs/layouts/partials/docs/top-header.html +++ b/docs/layouts/partials/docs/top-header.html @@ -12,6 +12,12 @@ {{ with resources.Get "images/logos/logo.svg" }} {{ .Content | safeHTML }} {{ end }} +