|
@@ -91,7 +91,7 @@ if (is_ie7down && 'attachEvent' in window){
|
|
|
|
|
|
// automatic responsive image resizing
|
|
|
$(function(){
|
|
|
- if($('.poster').length > 0){
|
|
|
+ if($('.poster').length > 0){ // inside of a normal topic
|
|
|
var $sheet = $('<style>').appendTo('head');
|
|
|
$(window).resize(function(){
|
|
|
// 90% - 88px - 15em(of .poster)
|
|
@@ -99,4 +99,11 @@ $(function(){
|
|
|
$sheet.html('img.bbc_img{max-width:'+w+'px;}');
|
|
|
}).resize();
|
|
|
}
|
|
|
+ if($('.dp_news').length > 0){ // front page news
|
|
|
+ $sheet = $('<style>').appendTo('head');
|
|
|
+ $(window).resize(function(){
|
|
|
+ var w = parseFloat($(window).width())*0.9 - 500;
|
|
|
+ $sheet.html('img.bbc_img{max-width:'+w+'px;}');
|
|
|
+ }).resize();
|
|
|
+ }
|
|
|
});
|