diff --git a/assets/docs/scss/custom/structure/_content.scss b/assets/docs/scss/custom/structure/_content.scss
index 6a5b0456..59c000e9 100644
--- a/assets/docs/scss/custom/structure/_content.scss
+++ b/assets/docs/scss/custom/structure/_content.scss
@@ -257,6 +257,33 @@ i {
}
}
+
+// goat diagrams
+figure.goat.svg-container {
+
+ padding: 0.1rem;
+ align-items: center;
+ width: 100%;
+ @include media-breakpoint-up(md) {
+ width: auto;
+ padding:.5rem;
+ padding-left: auto;
+ padding-right: auto;
+ }
+ @include media-breakpoint-up(lg) {
+ padding: 1rem;
+ }
+ svg {
+ width:100%;
+ @include media-breakpoint-up(lg) {
+ max-width: 60rem;
+ }
+ font-family: var(--bs-font-monospace);
+ font-size: 0.7rem;
+ }
+}
+
+
// Chroma Highlighter CSS
.docs-content .main-content td pre {
diff --git a/assets/js/app.js b/assets/js/app.js
index f182d2ef..cd885708 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -27,4 +27,12 @@ function toggleMenu() {
} else {
isOpen.style.display = "block";
}
-};
\ No newline at end of file
+};
+
+window.addEventListener("DOMContentLoaded", (ev) => {
+ const viewers = document.querySelectorAll(".image-compare");
+ viewers.forEach((element, i) => {
+ let view = new ImageCompare(element, JSON.parse(element.dataset.icConfig) ).mount();
+ });
+
+});
\ No newline at end of file
diff --git a/assets/scss/style.scss b/assets/scss/style.scss
index d14f0fda..396bb88f 100644
--- a/assets/scss/style.scss
+++ b/assets/scss/style.scss
@@ -27,25 +27,17 @@ $font-family-monospace: {{ .Site.Params.mono_font | default "SFMono-Regular, Me
// Structure
@import "custom/structure/general";
@import "custom/structure/topbar";
-// @import "custom/structure/content";
-// @import "custom/structure/sidebar-layouts";
-// @import "custom/structure/doc-nav";
-// @import "custom/structure/toc-layouts";
@import "custom/structure/footer";
-// // Components
+// Components
@import "custom/components/buttons";
@import "custom/components/badge";
-@import "custom/components/backgrounds";
-// @import "custom/components/alerts";
-// @import "custom/components/card";
-// // Pages
+// Pages
// @import "custom/pages/blog";
@import "custom/pages/features";
@import "custom/pages/helper";
@import "custom/pages/hero";
-{{ if ($.Scratch.Get "image_compare_enabled") }}@import "custom/pages/image-compare-viewer";{{ end }}
+@import "custom/pages/image-compare-viewer";
-// @import "custom/pages/simplebar";
diff --git a/data/landing.yaml b/data/landing_default.yaml
similarity index 100%
rename from data/landing.yaml
rename to data/landing_default.yaml
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 1f8aa7e2..c05981f2 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,31 +1,19 @@
-{{ $.Scratch.Delete "social_list" }}
+{{ $.Scratch.Delete "social_list" -}}
-{{ $social_params := slice "github" "twitter" "instagram" "rss" }}
-{{ range $social_params }}
+{{- $social_params := slice "github" "twitter" "instagram" "rss" -}}
+{{- range $social_params -}}
{{ if isset site.Params.social . }}
{{ $.Scratch.Add "social_list" (slice .) }}
{{ end }}
-{{ end }}
+{{- end -}}
-{{ $ic := newScratch }}
-{{ range $value := .Site.Data.landing }}
- {{ $template := string (replaceRE `( |-{1,})` "_" $value.template) }}
- {{ if eq $template "image_compare" }}
- {{ if $value.enable }}
- {{ $ic.Add "enabled" (slice $value.enable) }}
- {{ range $value.items }}
- {{ $ic.Add "config" (slice (.config | jsonify | safeJS)) }}
- {{ end }}
- {{ end }}
- {{- end }}
-{{ end }}
-
-{{ $.Scratch.Set "image_compare_enabled" (in ($ic.Get "enabled") true) }}
+{{$.Page.Scratch.Set "image_compare_config" (slice ) }}
+{{$.Page.Scratch.Set "image_compare_used" false }}
{{- partial "head.html" . -}}
@@ -38,28 +26,5 @@
{{- partial "footer.html" . -}}
-
- {{ $app := resources.Get "/js/app.js" }}
- {{- if not .Site.IsServer }}
- {{- $js := (slice $app) | resources.Concat "/js/bundle.js" | minify | fingerprint "sha384" }}
-
- {{- else }}
- {{- $js := (slice $app) | resources.Concat "/js/bundle.js" }}
-
- {{- end }}
-
-
- {{ if ($.Scratch.Get "image_compare_enabled") }}
-
- {{ end }}
-