Fix #883 Resize img accoring to device orientation

This commit is contained in:
Nicolas Le Goff
2013-06-18 18:08:33 +02:00
parent ca519612c6
commit 4b4c516a8e
2 changed files with 21 additions and 2 deletions

View File

@@ -107,7 +107,6 @@
{menu: "false",flashvars: "playerID=2&autostart=yes&noinfo=yes&animation=no&remaining=yes&soundFile={{thumbnail.get_url()}}", movie: "/include/jslibs/audio-player/player.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script> {menu: "false",flashvars: "playerID=2&autostart=yes&noinfo=yes&animation=no&remaining=yes&soundFile={{thumbnail.get_url()}}", movie: "/include/jslibs/audio-player/player.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script>
{% else %} {% else %}
<img class="record record_image imgTips zoomable thumb" oncontextMenu="return(false);" <img class="record record_image imgTips zoomable thumb" oncontextMenu="return(false);"
style="width:100%;"
src="{{thumbnail.get_url()}}" ondragstart="return false;"> src="{{thumbnail.get_url()}}" ondragstart="return false;">
<input type="hidden" name="width" value="{{thumbnail.get_width()}}"/> <input type="hidden" name="width" value="{{thumbnail.get_width()}}"/>
<input type="hidden" name="height" value="{{thumbnail.get_height()}}"/> <input type="hidden" name="height" value="{{thumbnail.get_height()}}"/>

View File

@@ -49,3 +49,23 @@ a.active_choice{
.valid_choice.disagree{ .valid_choice.disagree{
background-image: url(/skins/icons/delete.png); background-image: url(/skins/icons/delete.png);
} }
.thumb_wrapper {
text-align:center;
}
@media screen and (orientation: landscape) {
.thumb_wrapper img {
width: 50%;
}
}
@media screen and (orientation: portrait) {
.thumb_wrapper img {
width: 100%;
}
}