I just deployed a Rails 3.2.9 app for our website. On the home page I have the old Twitter widget where you could modify more features than it appears you can with the new ones. I have developed the site where it has responsive design for desktop and mobile devices using media queries in CSS3.
The problem is that the old widget does not allow percentages to be entered for the width and height from my experience. Of course the help for those widgets is no longer available. The new Twitter widgets do not allow you to modify the width, only the height. I want to be able to have different widths for the Twitter widget depending on the screen resolution. The only way I think this might be possible is if I can check the monitor size in my html/erb code somehow.
I have done searches attempting to find information on how to check this in Rails and HTML. All I have found requires that this is done using CSS3 media queries.
My Question: Is there a way to check the media parameters used in CSS media queries in HTML5 or using Rails 3?
Basically I'm looking for something like this or some HTML5 equivalent.
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<% if some media query parameters for smartphones %>
<script>Twitter widget</script>
<% elsif some media query parameters for tablets %>
<script>Twitter widget</script>
<% else %>
<script>Twitter widget</script>
<% end %>
Either that or maybe there exists help for the old Twitter widgets where you can use percentages instead of pixels.
Any help would be appreciated.