Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed: use 100% width for iframe. #995

Merged
merged 2 commits into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions editor/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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