====== Embed share ====== The basic functionality of this shortcode is to print an iframe in the page with some additional functionality. {{ :skoda-ep:modules:shortcodes:embed-share:example.png?200 |}} **Default aspect ratio** of the resulting iframe **is 16/9** (16 points in width, 9 in height) and can be customized to any value, e.g. 4/3, 20/5 or even portrait versions of 3/4, 9/16 or a square 1/1. Invalid ratios are ignored and 16/9 is used instead (i.e. ratios with zero or a text) Optionally a **button can be appended** to the iframe. Once a user clicks the button they are presented with a popup where they can copy the iframe code (e.g. for use on their pages:) {{ :skoda-ep:modules:shortcodes:embed-share:embed-copy.png?200 |}} Optionally a **link can be appended** to the iframe. A new window with the iframe contents will be opened upon the link click: {{ :skoda-ep:modules:shortcodes:embed-share:new-window.png?200 |}} ===== PageBuilder widget ===== There is a page builder widget that comes with the shortcode for an easier use. The setup for the above example can be seen on the following image: {{ :skoda-ep:modules:shortcodes:embed-share:page-builder-settings.png?200 |}} ===== Shortcode ===== Name: [skoda-embed-share url="..."] URL attribute is required and should be a valid URL or a relative URL on the current domain, e.g. https://google.com or /en/interesting-page/ ===== Hiding iframe for unsupported resolutions ===== As of August 2018 it is possible to hide the embed when it becomes smaller than the resolution it can support. Instead a message will be shown to the user: {{ :skoda-ep:modules:shortcodes:embed-share:hiding-threshold.png | }} You can use this option by specifying a shortcode attribute or using the widget Embed Share and putting the number in the following field: {{ :skoda-ep:modules:shortcodes:embed-share:hide-below.png | }} ==== Optional attributes ==== Underlined values are defaults * **ratio**: a decimal value of the width vs height ratio. Can be supplied as two numbers width/height, i.e. __16/9__, 3/4, or just 1.5 * **button**: [ true | __false__ ] Whether or not to print the embed button * **new-window** [ true | __false__ | Some text ] Whether or not to print the link which opens the iframe in a new window. If you supply a custom text, it will be used instead of the default "Open in a new window" text * **hide-below** [ number ] When this attribute is used, the iframe will be hidden when it becomes smaller than the specified number (size is in pixels)