Fixing full bleed images on phone 6 and 6+.

This commit is contained in:
Samuel Clay 2014-09-24 12:00:47 -07:00
parent f7f9163384
commit 2f93bbecf0
2 changed files with 28 additions and 4 deletions

View file

@ -268,6 +268,9 @@
contentWidthClass = @"NB-iphone";
}
contentWidthClass = [NSString stringWithFormat:@"%@ NB-width-%d",
contentWidthClass, (int)floorf(CGRectGetWidth(self.view.frame))];
// Replace image urls that are locally cached, even when online
NSString *storyHash = [self.activeStory objectForKey:@"story_hash"];
NSArray *imageUrls = [appDelegate.activeCachedImages objectForKey:storyHash];
@ -1769,6 +1772,9 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
contentWidthClass = @"NB-iphone";
}
contentWidthClass = [NSString stringWithFormat:@"%@ NB-width-%d",
contentWidthClass, (int)floorf(CGRectGetWidth(self.view.frame))];
NSString *riverClass = (appDelegate.storiesCollection.isRiverView ||
appDelegate.storiesCollection.isSocialView ||
appDelegate.storiesCollection.isSavedView) ?

View file

@ -487,25 +487,43 @@ div + p {
height: auto !important;
}
.NB-width-375 .NB-story img.NB-large-image {
max-width: 375px;
margin-left: -12px !important;
width: 375px !important;
}
.NB-width-414 .NB-story img.NB-large-image {
max-width: 414px;
margin-left: -12px !important;
width: 414px !important;
}
.NB-ipad-narrow .NB-story img.NB-large-image {
max-width: 500px;
margin-left: -30px !important;
width: 500px !important;
height: auto !important;
}
.NB-ipad-wide .NB-story img.NB-large-image {
max-width: 656px;
margin-left: -90px !important;
width: 656px !important;
height: auto !important;
}
.NB-iphone-wide .NB-story img.NB-large-image {
max-width: 668px;
margin-left: -36px !important;
margin-left: -30px !important;
width: 668px !important;
height: auto !important;
}
.NB-width-667 .NB-story img.NB-large-image {
max-width: 667px;
margin-left: -30px !important;
width: 667px !important;
}
.NB-width-736 .NB-story img.NB-large-image {
max-width: 736px;
margin-left: -30px !important;
width: 736px !important;
}
.NB-story img.NB-small-image {