This is a real pain since users simply just need to paste the link into the post which is the whole purpose of oEmbed and using WordPress as a user friendly CMS.
Any ideas?
BTW: Now that I have found my way around Roots it’s wonderful, well done & thanks guys for providing this to us as developers!
If you’re looking for a non-javascript fallback (it’s not a solution because the ratios will sometimes be off) you should also read through lib/config.php where $content_width is discussed. You can set this according to the maximum width of your content area like so:
Where 750 is the width in pixels of the content with a sidebar, 1140 is without a sidebar (I believe these are the BS3 defaults for large devices). You should then limit the .entry-content-asset container to max-width: 100%; to ensure it scales down as you go.
Foxaii, I have implemented your suggestion and now the OEmbed Youtibe url fits into the 750 content width and does not overflow into the sidebar anymore, so thanks for that.
However when I resize the browser the video is not responsive. You have made a suggestion with [quote=“Foxaii, post:4, topic:155”]
.entry-content-asset
[/quote]
for this.
The only reference I can find to it is in cleanup.php. Where am I supposed to implement it there?
The additional detail I gave was for a fallback, not for a solution. To keep the videos responsive, and in the correct ratios, you should use FitVids, FluidVids or the CSS in the example you posted.
Either way CSS changes should go in app.less (on master, formerly the grunt branch) or in app.css (on the classic branch, formerly the master).
Thanks, yes I have noticed it’s for fallback only.
I was actually working between the old branch and the new one on 2 local installations of WordPress and that is what most probably got me lost since I couldn’t find app.css anymore.
Now after you told me of the changes in the new branch I also found this great read for the latest branch - http://roots.io/modifying-bootstrap-in-roots/ - It also shows some tips to remove bloat. I have noticed with one of my other sites with the previous version of Bootstrap and some of the bloat removed I have the fastest WordPress installation I’ve ever had. No need for Cache plugins which I don’t really believe in anyway. WordPress + Bootstrap + NGINX = Speed and awesomeness.
Will let you know if I have any more hassles and thanks for the assistance thus far.
I don’t know whether I am missing something somewhere.
Before I implemented the responsive video css I decided to test app.less with a simple modification of the body font just like I did within app.css before just to make sure like so:
Ugh it looks like, with the latest build, one has to implement everything using grunt. Another hurdle to overcome first since I need to figure out first now how to compile it on my local Windows install as well as on my live Linux server.
Maybe I should just revert back to the previous build:-( without grunt.
There’s already a thread discussing the transition to Grunt. It shouldn’t be a hurdle on Windows, and you can always use the classic branch (which uses app.css and is linked to in the thread below) if you need to.
Anyone looking to incorporate FitVids.js into Roots with Grunt should check out Ben’s How Roots Uses Grunt screencast. It takes you through every step and what you learn can easily be applied to other plugins.