generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-overviewtab-hide
- Loading branch information
Showing
19 changed files
with
209 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.spline-viewer-wrapper :is(.block) { | ||
display: block | ||
} | ||
|
||
.spline-viewer-wrapper :is(.\!h-\[200px\]) { | ||
height: 200px !important | ||
} | ||
|
||
.spline-viewer-wrapper :is(.bg-danaherlightblue-50) { | ||
--tw-bg-opacity: 1; | ||
background-color: rgb(239 251 253 / var(--tw-bg-opacity)) | ||
} | ||
|
||
.spline-viewer-wrapper :is(.bg-danaherpurple-800) { | ||
--tw-bg-opacity: 1; | ||
background-color: rgb(64 0 165 / var(--tw-bg-opacity)) | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.spline-viewer-wrapper :is(.md\:\!h-\[600px\]) { | ||
height: 600px !important | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { loadScript } from '../../scripts/lib-franklin.js'; | ||
import { getFragmentFromFile } from '../../scripts/scripts.js'; | ||
|
||
export default async function decorate(block) { | ||
try { | ||
// get the content | ||
const fragment = await getFragmentFromFile('/fragments/spline.html'); | ||
block.innerHTML = ''; | ||
const parser = new DOMParser(); | ||
const fragmentHtml = parser.parseFromString(fragment, 'text/html'); | ||
const observer = new IntersectionObserver((entries) => { | ||
if (entries.some((e) => e.isIntersecting)) { | ||
observer.disconnect(); | ||
setTimeout(() => { | ||
loadScript(fragmentHtml?.head?.firstElementChild?.src, { type: 'module' }); | ||
block.append(fragmentHtml?.body?.firstElementChild); | ||
}, 2000); | ||
} | ||
}); | ||
observer.observe(block); | ||
block.classList.add('!h-[200px]', 'md:!h-[600px]'); | ||
} catch (e) { | ||
block.textContent = ''; | ||
// eslint-disable-next-line no-console | ||
console.warn(`cannot load snippet at ${e}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<script type="module" src="https://unpkg.com/@splinetool/[email protected]/build/spline-viewer.js"></script> | ||
<spline-viewer url="https://prod.spline.design/UBAIdqMtOkuDExkL/scene.splinecode"></spline-viewer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.