Requirements
-
Piano Content widget created for mobile page
Instructions
The idea is an HTML page that renders only a Content widget and is loaded via an amp-iframe.
For example, the page should accept a widget ID and a context (URL) as query parameters.
|
On AMP pages, add an amp-iframe object referring to the HTML page:
|
You can see a live demo here: https://onb-de1.cxense.com/public/samples/content/amp-sample.html
Tips & Warnings
-
There are important requirements you must follow to make amp-iframe work. Notably:
-
They must be either 600px from the top or outside the first 75% of the viewport when scrolled to the top—whichever is smaller.
-
They must request resources only via HTTPS, a data-URI, or the srcdoc attribute.
-
-
The 'overflow' element in the example above is illustrative; modify it to fit your page design.
Related
-
amp-iframe object: https://www.ampproject.org/docs/reference/extended/amp-iframe.html