We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6269acc + a442d62 commit a70f3dfCopy full SHA for a70f3df
2 files changed
blocks/iframe/iframe.css
@@ -0,0 +1,14 @@
1
+@media (min-width: 100px) {
2
+ main .section > div.iframe-wrapper {
3
+ margin: 0 auto;
4
+ padding: 0;
5
+ max-width: 1000px;
6
+ }
7
+
8
+ main iframe {
9
+ border: none;
10
+ width: 100%;
11
+ height: 4000px;
12
+ max-height: calc(100vh - var(--nav-height));
13
14
+}
blocks/iframe/iframe.js
@@ -0,0 +1,7 @@
+export default function decorate(block) {
+ const iframe = document.createElement('iframe');
+ iframe.src = new URL(block.textContent.trim());
+ iframe.sandbox = 'allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-forms allow-storage-access-by-user-activation';
+ block.innerHTML = '';
+ block.append(iframe);
0 commit comments