diff --git a/groups/home/bootstrap5/home1.js b/groups/home/bootstrap5/home1.js index 9475848..e69aa96 100644 --- a/groups/home/bootstrap5/home1.js +++ b/groups/home/bootstrap5/home1.js @@ -133,7 +133,7 @@ const onesearchComponent = {
- OneSearch + OneSearch
@@ -205,12 +205,25 @@ const onesearchComponent = { this.$refs.oneSearchForm.submit(); // submit the form }, }, + computed: { + logoSrc() { + return this.isDark ? "onesearch_logo3.png" : "onesearch_logo2.png"; + }, + }, data() { return { facet: "", // initialize the data from the radio selection mfacet: "", + isDark: false, }; }, + mounted() { + this.isDark = document.body.getAttribute("data-bs-theme") === "dark"; + var self = this; + new MutationObserver(function () { + self.isDark = document.body.getAttribute("data-bs-theme") === "dark"; + }).observe(document.body, { attributes: true, attributeFilter: ["data-bs-theme"] }); + }, }; const { createApp } = Vue; diff --git a/groups/home/bootstrap5/onesearch_logo2.png b/groups/home/bootstrap5/onesearch_logo2.png new file mode 100644 index 0000000..22d9900 Binary files /dev/null and b/groups/home/bootstrap5/onesearch_logo2.png differ diff --git a/groups/home/bootstrap5/onesearch_logo3.png b/groups/home/bootstrap5/onesearch_logo3.png new file mode 100644 index 0000000..a1f6dbe Binary files /dev/null and b/groups/home/bootstrap5/onesearch_logo3.png differ