💄 Optimized widget
This commit is contained in:
parent
138bbb0944
commit
9024d5246e
@ -3,7 +3,7 @@ import RootLayout from "../layouts/RootLayout.astro";
|
||||
---
|
||||
|
||||
<RootLayout>
|
||||
<iframe class="moments-frame" src="https://feed.smartsheep.studio/realms/1?embedded=yes" />
|
||||
<iframe class="moments-frame" src="https://feed.smartsheep.studio/realms/1?embedded=yes"></iframe>
|
||||
</RootLayout>
|
||||
|
||||
<style>
|
||||
|
@ -121,11 +121,9 @@ const embedOptions = new URLSearchParams({
|
||||
element.height = height ? `${height}px` : "360px";
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const element = document.querySelector<HTMLIFrameElement>("#interactive-iframe");
|
||||
if (element) {
|
||||
resizeInteractiveWidget(element);
|
||||
}
|
||||
const widget = document.querySelector<HTMLIFrameElement>("#interactive-iframe");
|
||||
widget?.addEventListener("onload", () => {
|
||||
resizeInteractiveWidget(widget);
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -152,4 +150,11 @@ const embedOptions = new URLSearchParams({
|
||||
grid-template-columns: 2fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
#interactive-iframe {
|
||||
display: block;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
min-height: 360px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user