Skip to content

Commit

Permalink
Merge pull request #995 from WordPress/update/show-WP-embed
Browse files Browse the repository at this point in the history
Embed: use 100% width for iframe.
  • Loading branch information
mtias authored Jun 2, 2017
2 parents a6b507c + e1b0c8d commit c1afcdb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
4 changes: 4 additions & 0 deletions editor/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ body.toplevel_page_gutenberg {
max-width: 100%;
}

iframe {
width: 100%;
}

@include break-small() {
padding-top: $header-height;
}
Expand Down
30 changes: 21 additions & 9 deletions post-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ window._wpGutenbergPost = {
'<p>Try selecting and removing or editing the caption, now you don\'t have to be careful about selecting the image or other text by mistake and ruining the presentation.</p>',
'<!-- /wp:core/text -->',

'<!-- wp:core/embed url="https://www.youtube.com/watch?v=Nl6U7UotA-M" -->',
'<figure>https://www.youtube.com/watch?v=Nl6U7UotA-M<figcaption>State of the Word 2016</figcaption></figure>',
'<!-- /wp:core/embed -->',

'<!-- wp:core/heading -->',
'<h2>The <em>Inserter</em> Tool</h2>',
'<!-- /wp:core/heading -->',
Expand Down Expand Up @@ -113,6 +109,12 @@ window._wpGutenbergPost = {
'<p>Prima ridens denique his te, ferri illum volumus an his. Eu vel dicat homero qualisqu, vitae regione deserunt vis ei. Graeci incorrupte liberavisse no mea, saepe voluptaria usu ex, vis dicant euismod id. At dolor reprimique eos, quo altera detraxit moderatius id. Quo iudico utinam eu, ad alia munere mel.</p>',
'<!-- /wp:core/text -->',

'<!-- wp:core/code -->',
'<pre><code>export default function MyButton() {\n\
return &lt;Button&gt;Click Me!&lt;/Button&gt;;\n\
}</code></pre>',
'<!-- /wp:core/code -->',

'<!-- wp:core/image -->',
'<figure><img src="https://cldup.com/GCwahb3aOb.jpg" /></figure>',
'<!-- /wp:core/image -->',
Expand Down Expand Up @@ -149,11 +151,21 @@ window._wpGutenbergPost = {
'<table class="widefat"><thead><tr><th>Version</th><th>Musician</th><th>Date</th></tr></thead><tbody><tr><th><a href="https://wordpress.org/news/2015/12/clifford/">4.4</a></th><td>Clifford Brown</td><td>December 8, 2015</td></tr><tr class="alt"><th><a href="https://wordpress.org/news/2016/04/coleman/">4.5</a></th><td>Coleman Hawkins</td><td>April 12, 2016</td></tr><tr><th><a href="https://wordpress.org/news/2016/08/pepper/">4.6</a></th><td>Pepper Adams</td><td>August 16, 2016</td></tr><tr class="alt"><th><a href="https://wordpress.org/news/2016/12/vaughan/">4.7</a></th><td>Sarah Vaughan</td><td>December 6, 2016</td></tr></tbody></table>',
'<!-- /wp:core/table -->',

'<!-- wp:core/code -->',
'<pre><code>export default function MyButton() {\n\
return &lt;Button&gt;Click Me!&lt;/Button&gt;;\n\
}</code></pre>',
'<!-- /wp:core/code -->',
'<!-- wp:core/heading -->',
'<h2>All that you can embed!</h2>',
'<!-- /wp:core/heading -->',

'<!-- wp:core/embed url="https://www.youtube.com/watch?v=Nl6U7UotA-M" -->',
'<figure>https://www.youtube.com/watch?v=Nl6U7UotA-M<figcaption>State of the Word 2016</figcaption></figure>',
'<!-- /wp:core/embed -->',

'<!-- wp:core/embed url="https://twitter.com/photomatt/status/868657763970404352" -->',
'https://twitter.com/photomatt/status/868657763970404352',
'<!-- /wp:core/embed -->',

'<!-- wp:core/embed url="https://make.wordpress.org/core/2017/01/17/editor-technical-overview/" -->',
'https://make.wordpress.org/core/2017/01/17/editor-technical-overview/',
'<!-- /wp:core/embed -->',

].join( '' ),
},
Expand Down

0 comments on commit c1afcdb

Please sign in to comment.