adding in font size persistence

This commit is contained in:
Roy Yang 2012-06-24 23:02:37 -07:00
parent e91b254e45
commit 64c559c754
14 changed files with 510 additions and 349 deletions

View file

@ -18,10 +18,12 @@
}
@property (nonatomic, retain) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (nonatomic, retain) IBOutlet UILabel *smallFontSizeLabel;
@property (nonatomic, retain) IBOutlet UILabel *largeFontSizeLabel;
@property (retain, nonatomic) IBOutlet UISegmentedControl *fontStyleSegment;
@property (retain, nonatomic) IBOutlet UISegmentedControl *fontSizeSgement;
- (IBAction)changeFontStyle:(id)sender;
- (IBAction)changeFontSize:(id)sender;
- (void)setSanSerif;
- (void)setSerif;
@end

View file

@ -13,8 +13,8 @@
@implementation FontSettingsViewController
@synthesize appDelegate;
@synthesize smallFontSizeLabel;
@synthesize largeFontSizeLabel;
@synthesize fontStyleSegment;
@synthesize fontSizeSgement;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@ -29,13 +29,46 @@
{
self.contentSizeForViewInPopover = CGSizeMake(274.0,130.0);
[super viewDidLoad];
}
- (void)viewWillAppear:(BOOL)animated {
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([userPreferences stringForKey:@"fontStyle"]) {
if ([[userPreferences stringForKey:@"fontStyle"] isEqualToString:@"NB-san-serif"]) {
[self setSanSerif];
} else if ([[userPreferences stringForKey:@"fontStyle"] isEqualToString:@"NB-serif"]) {
[self setSerif];
}
}
int userPreferenceFontSize = [userPreferences integerForKey:@"fontSize"];
if(userPreferenceFontSize){
switch (userPreferenceFontSize) {
case 12:
[fontSizeSgement setSelectedSegmentIndex:0];
break;
case 14:
[fontSizeSgement setSelectedSegmentIndex:1];
break;
case 16:
[fontSizeSgement setSelectedSegmentIndex:2];
break;
case 22:
[fontSizeSgement setSelectedSegmentIndex:3];
break;
case 26:
[fontSizeSgement setSelectedSegmentIndex:4];
break;
default:
break;
}
}
// Do any additional setup after loading the view from its nib.
}
- (void)viewDidUnload
{
smallFontSizeLabel = nil;
largeFontSizeLabel = nil;
[self setFontStyleSegment:nil];
[self setFontSizeSgement:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
@ -48,31 +81,49 @@
- (void)dealloc {
[appDelegate release];
[smallFontSizeLabel release];
[largeFontSizeLabel release];
[fontStyleSegment release];
[fontSizeSgement release];
[super dealloc];
}
- (IBAction)changeFontStyle:(id)sender {
if ([sender selectedSegmentIndex] == 0) {
UIFont *smallFont = [UIFont fontWithName:@"Helvetica" size:15.0];
[self.smallFontSizeLabel setFont:smallFont];
UIFont *largeFont = [UIFont fontWithName:@"Georgia" size:24.0];
[self.largeFontSizeLabel setFont:largeFont];
[appDelegate.storyDetailViewController setFontStyle:@"Helvetica"];
[self setSanSerif];
} else {
UIFont *smallFont = [UIFont fontWithName:@"Georgia" size:15.0];
[self.smallFontSizeLabel setFont:smallFont];
UIFont *largeFont = [UIFont fontWithName:@"Georgia" size:24.0];
[self.largeFontSizeLabel setFont:largeFont];
[appDelegate.storyDetailViewController setFontStyle:@"Georgia"];
[self setSerif];
}
}
- (IBAction)changeFontSize:(UISlider *)sender {
[appDelegate.storyDetailViewController setFontSize:[sender value]];
- (IBAction)changeFontSize:(id)sender {
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([sender selectedSegmentIndex] == 0) {
[appDelegate.storyDetailViewController setFontSize:12];
[userPreferences setInteger:12 forKey:@"fontSize"];
} else if ([sender selectedSegmentIndex] == 1) {
[appDelegate.storyDetailViewController setFontSize:14];
[userPreferences setInteger:14 forKey:@"fontSize"];
} else if ([sender selectedSegmentIndex] == 2) {
[appDelegate.storyDetailViewController setFontSize:16];
[userPreferences setInteger:16 forKey:@"fontSize"];
} else if ([sender selectedSegmentIndex] == 3) {
[appDelegate.storyDetailViewController setFontSize:22];
[userPreferences setInteger:22 forKey:@"fontSize"];
} else if ([sender selectedSegmentIndex] == 4) {
[appDelegate.storyDetailViewController setFontSize:26];
[userPreferences setInteger:26 forKey:@"fontSize"];
}
[userPreferences synchronize];
}
- (void)setSanSerif {
[fontStyleSegment setSelectedSegmentIndex:0];
[appDelegate.storyDetailViewController setFontStyle:@"Helvetica"];
}
- (void)setSerif {
[fontStyleSegment setSelectedSegmentIndex:1];
[appDelegate.storyDetailViewController setFontStyle:@"Georgia"];
}
@end

View file

@ -11,11 +11,9 @@
<string key="NS.object.0">1181</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBUISlider</string>
<string>IBUISegmentedControl</string>
<string>IBUIView</string>
<string>IBUILabel</string>
<string>IBProxyObject</string>
<string>IBUIView</string>
<string>IBUISegmentedControl</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -37,87 +35,13 @@
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUILabel" id="154305918">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 90}, {42, 21}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="259839465"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">A</string>
<object class="NSColor" key="IBUITextColor" id="237543767">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="12707086">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{232, 89}, {42, 21}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">A</string>
<reference key="IBUITextColor" ref="237543767"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">24</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">24</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUISlider" id="259839465">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{48, 90}, {178, 23}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="12707086"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<float key="IBUIValue">100</float>
<float key="IBUIMinValue">50</float>
<float key="IBUIMaxValue">150</float>
</object>
<object class="IBUISegmentedControl" id="301635770">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 20}, {234, 30}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="154305918"/>
<reference key="NSNextKeyView" ref="583946447"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@ -145,6 +69,55 @@
<reference ref="4"/>
</array>
</object>
<object class="IBUISegmentedControl" id="583946447">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 81}, {234, 30}}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBSegmentControlStyle">2</int>
<int key="IBNumberOfSegments">5</int>
<int key="IBSelectedSegmentIndex">2</int>
<array key="IBSegmentTitles">
<string>12pt</string>
<string>14pt</string>
<string>16pt</string>
<string>22pt</string>
<string>26pt</string>
</array>
<array class="NSMutableArray" key="IBSegmentWidths">
<real value="0.0"/>
<real value="0.0"/>
<real value="0.0"/>
<real value="0.0"/>
<real value="0.0"/>
</array>
<array class="NSMutableArray" key="IBSegmentEnabledStates">
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="YES"/>
<boolean value="YES"/>
</array>
<array class="NSMutableArray" key="IBSegmentContentOffsets">
<string>{0, 0}</string>
<string>{0, 0}</string>
<string>{0, 0}</string>
<string>{0, 0}</string>
<string>{0, 0}</string>
</array>
<array class="NSMutableArray" key="IBSegmentImages">
<reference ref="4"/>
<reference ref="4"/>
<reference ref="4"/>
<reference ref="4"/>
<reference ref="4"/>
</array>
</object>
</array>
<string key="NSFrameSize">{274, 130}</string>
<reference key="NSSuperview"/>
@ -177,28 +150,19 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">largeFontSizeLabel</string>
<string key="label">fontStyleSegment</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="12707086"/>
<reference key="destination" ref="301635770"/>
</object>
<int key="connectionID">19</int>
<int key="connectionID">32</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">smallFontSizeLabel</string>
<string key="label">fontSizeSgement</string>
<reference key="source" ref="841351856"/>
<reference key="destination" ref="154305918"/>
<reference key="destination" ref="583946447"/>
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">changeFontSize:</string>
<reference key="source" ref="259839465"/>
<reference key="destination" ref="841351856"/>
<int key="IBEventType">13</int>
</object>
<int key="connectionID">13</int>
<int key="connectionID">33</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
@ -209,6 +173,15 @@
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">changeFontSize:</string>
<reference key="source" ref="583946447"/>
<reference key="destination" ref="841351856"/>
<int key="IBEventType">13</int>
</object>
<int key="connectionID">29</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@ -234,9 +207,7 @@
<reference key="object" ref="766721923"/>
<array class="NSMutableArray" key="children">
<reference ref="301635770"/>
<reference ref="154305918"/>
<reference ref="12707086"/>
<reference ref="259839465"/>
<reference ref="583946447"/>
</array>
<reference key="parent" ref="0"/>
</object>
@ -246,18 +217,8 @@
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="12707086"/>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="154305918"/>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="259839465"/>
<int key="objectID">28</int>
<reference key="object" ref="583946447"/>
<reference key="parent" ref="766721923"/>
</object>
</array>
@ -269,15 +230,14 @@
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<integer value="2" key="28.IUISegmentedControlInspectorSelectedSegmentMetadataKey"/>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">22</int>
<int key="maxID">33</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -410,6 +370,28 @@
<string key="minorKey">./Classes/BaseViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDashboardViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="toolbar">UIToolbar</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="appDelegate">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo" key="toolbar">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/FeedDashboardViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedDetailViewController</string>
<string key="superclassName">BaseViewController</string>
@ -477,89 +459,41 @@
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">FeedsViewController</string>
<string key="superclassName">BaseViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="doAddButton">id</string>
<string key="doLogoutButton">id</string>
<string key="doSwitchSitesUnread">id</string>
<string key="sectionTapped:">UIButton</string>
<string key="sectionUntapped:">UIButton</string>
<string key="selectIntelligence">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="doAddButton">
<string key="name">doAddButton</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="doLogoutButton">
<string key="name">doLogoutButton</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="doSwitchSitesUnread">
<string key="name">doSwitchSitesUnread</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="sectionTapped:">
<string key="name">sectionTapped:</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBActionInfo" key="sectionUntapped:">
<string key="name">sectionUntapped:</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBActionInfo" key="selectIntelligence">
<string key="name">selectIntelligence</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="addButton">UIBarButtonItem</string>
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="feedScoreSlider">UISlider</string>
<string key="feedTitlesTable">UITableView</string>
<string key="feedViewToolbar">UIToolbar</string>
<string key="intelligenceControl">UISegmentedControl</string>
<string key="logoutButton">UIBarButtonItem</string>
<string key="sitesButton">UIBarButtonItem</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="addButton">
<string key="name">addButton</string>
<string key="className">FeedsMenuViewController</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">tapCancelButton:</string>
<string key="NS.object.0">UIBarButtonItem</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">tapCancelButton:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">tapCancelButton:</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="menuTableView">UITableView</string>
<string key="toolbar">UIToolbar</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="appDelegate">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo" key="feedScoreSlider">
<string key="name">feedScoreSlider</string>
<string key="candidateClassName">UISlider</string>
</object>
<object class="IBToOneOutletInfo" key="feedTitlesTable">
<string key="name">feedTitlesTable</string>
<object class="IBToOneOutletInfo" key="menuTableView">
<string key="name">menuTableView</string>
<string key="candidateClassName">UITableView</string>
</object>
<object class="IBToOneOutletInfo" key="feedViewToolbar">
<string key="name">feedViewToolbar</string>
<object class="IBToOneOutletInfo" key="toolbar">
<string key="name">toolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo" key="intelligenceControl">
<string key="name">intelligenceControl</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo" key="logoutButton">
<string key="name">logoutButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo" key="sitesButton">
<string key="name">sitesButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/FeedsViewController.h</string>
<string key="minorKey">./Classes/FeedsMenuViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@ -595,6 +529,7 @@
<string key="addSitesView">UIView</string>
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="googleReaderButton">UIButton</string>
<string key="logo">UIImageView</string>
<string key="nextButton">UIBarButtonItem</string>
<string key="toolbar">UIToolbar</string>
<string key="toolbarTitle">UIButton</string>
@ -621,6 +556,10 @@
<string key="name">googleReaderButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="logo">
<string key="name">logo</string>
<string key="candidateClassName">UIImageView</string>
</object>
<object class="IBToOneOutletInfo" key="nextButton">
<string key="name">nextButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
@ -662,6 +601,8 @@
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="fontSizeSgement">UISegmentedControl</string>
<string key="fontStyleSegment">UISegmentedControl</string>
<string key="largeFontSizeLabel">UILabel</string>
<string key="smallFontSizeLabel">UILabel</string>
</dictionary>
@ -670,6 +611,14 @@
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo" key="fontSizeSgement">
<string key="name">fontSizeSgement</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo" key="fontStyleSegment">
<string key="name">fontStyleSegment</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo" key="largeFontSizeLabel">
<string key="name">largeFontSizeLabel</string>
<string key="candidateClassName">UILabel</string>
@ -939,8 +888,10 @@
<string key="superclassName">BaseViewController</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="addSiteViewController">AddSiteViewController</string>
<string key="feedDashboardViewController">FeedDashboardViewController</string>
<string key="feedDetailViewController">FeedDetailViewController</string>
<string key="feedsViewController">FeedsViewController</string>
<string key="feedsMenuViewController">FeedsMenuViewController</string>
<string key="feedsViewController">NewsBlurViewController</string>
<string key="firstTimeUserViewController">FirstTimeUserViewController</string>
<string key="fontSettingsViewController">FontSettingsViewController</string>
<string key="googleReaderViewController">GoogleReaderViewController</string>
@ -948,6 +899,7 @@
<string key="moveSiteViewController">MoveSiteViewController</string>
<string key="navigationController">UINavigationController</string>
<string key="originalStoryViewController">OriginalStoryViewController</string>
<string key="shareViewController">ShareViewController</string>
<string key="splitStoryController">UISplitViewController</string>
<string key="splitStoryDetailNavigationController">UINavigationController</string>
<string key="splitStoryDetailViewController">SplitStoryDetailViewController</string>
@ -959,13 +911,21 @@
<string key="name">addSiteViewController</string>
<string key="candidateClassName">AddSiteViewController</string>
</object>
<object class="IBToOneOutletInfo" key="feedDashboardViewController">
<string key="name">feedDashboardViewController</string>
<string key="candidateClassName">FeedDashboardViewController</string>
</object>
<object class="IBToOneOutletInfo" key="feedDetailViewController">
<string key="name">feedDetailViewController</string>
<string key="candidateClassName">FeedDetailViewController</string>
</object>
<object class="IBToOneOutletInfo" key="feedsMenuViewController">
<string key="name">feedsMenuViewController</string>
<string key="candidateClassName">FeedsMenuViewController</string>
</object>
<object class="IBToOneOutletInfo" key="feedsViewController">
<string key="name">feedsViewController</string>
<string key="candidateClassName">FeedsViewController</string>
<string key="candidateClassName">NewsBlurViewController</string>
</object>
<object class="IBToOneOutletInfo" key="firstTimeUserViewController">
<string key="name">firstTimeUserViewController</string>
@ -995,6 +955,10 @@
<string key="name">originalStoryViewController</string>
<string key="candidateClassName">OriginalStoryViewController</string>
</object>
<object class="IBToOneOutletInfo" key="shareViewController">
<string key="name">shareViewController</string>
<string key="candidateClassName">ShareViewController</string>
</object>
<object class="IBToOneOutletInfo" key="splitStoryController">
<string key="name">splitStoryController</string>
<string key="candidateClassName">UISplitViewController</string>
@ -1021,6 +985,87 @@
<string key="minorKey">./Classes/NewsBlurAppDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NewsBlurViewController</string>
<string key="superclassName">BaseViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="doSwitchSitesUnread">id</string>
<string key="sectionTapped:">UIButton</string>
<string key="sectionUntapped:">UIButton</string>
<string key="selectIntelligence">id</string>
<string key="showMenuButton">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="doSwitchSitesUnread">
<string key="name">doSwitchSitesUnread</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="sectionTapped:">
<string key="name">sectionTapped:</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBActionInfo" key="sectionUntapped:">
<string key="name">sectionUntapped:</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBActionInfo" key="selectIntelligence">
<string key="name">selectIntelligence</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="showMenuButton">
<string key="name">showMenuButton</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="feedScoreSlider">UISlider</string>
<string key="feedTitlesTable">UITableView</string>
<string key="feedViewToolbar">UIToolbar</string>
<string key="homeButton">UIBarButtonItem</string>
<string key="intelligenceControl">UISegmentedControl</string>
<string key="popoverController">UIPopoverController</string>
<string key="sitesButton">UIBarButtonItem</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="appDelegate">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo" key="feedScoreSlider">
<string key="name">feedScoreSlider</string>
<string key="candidateClassName">UISlider</string>
</object>
<object class="IBToOneOutletInfo" key="feedTitlesTable">
<string key="name">feedTitlesTable</string>
<string key="candidateClassName">UITableView</string>
</object>
<object class="IBToOneOutletInfo" key="feedViewToolbar">
<string key="name">feedViewToolbar</string>
<string key="candidateClassName">UIToolbar</string>
</object>
<object class="IBToOneOutletInfo" key="homeButton">
<string key="name">homeButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
<object class="IBToOneOutletInfo" key="intelligenceControl">
<string key="name">intelligenceControl</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo" key="popoverController">
<string key="name">popoverController</string>
<string key="candidateClassName">UIPopoverController</string>
</object>
<object class="IBToOneOutletInfo" key="sitesButton">
<string key="name">sitesButton</string>
<string key="candidateClassName">UIBarButtonItem</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/NewsBlurViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">OriginalStoryViewController</string>
<string key="superclassName">BaseViewController</string>
@ -1102,6 +1147,72 @@
<string key="minorKey">./Classes/OriginalStoryViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">ShareViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="doCancelButton:">id</string>
<string key="doShareThisStory:">id</string>
<string key="doToggleButton:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="doCancelButton:">
<string key="name">doCancelButton:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="doShareThisStory:">
<string key="name">doShareThisStory:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="doToggleButton:">
<string key="name">doToggleButton:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="appDelegate">NewsBlurAppDelegate</string>
<string key="commentField">UITextView</string>
<string key="facebookButton">UIButton</string>
<string key="fontSizeSegment">UISegmentedControl</string>
<string key="siteFavicon">UIImageView</string>
<string key="siteInformation">UILabel</string>
<string key="twitterButton">UIButton</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="appDelegate">
<string key="name">appDelegate</string>
<string key="candidateClassName">NewsBlurAppDelegate</string>
</object>
<object class="IBToOneOutletInfo" key="commentField">
<string key="name">commentField</string>
<string key="candidateClassName">UITextView</string>
</object>
<object class="IBToOneOutletInfo" key="facebookButton">
<string key="name">facebookButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="fontSizeSegment">
<string key="name">fontSizeSegment</string>
<string key="candidateClassName">UISegmentedControl</string>
</object>
<object class="IBToOneOutletInfo" key="siteFavicon">
<string key="name">siteFavicon</string>
<string key="candidateClassName">UIImageView</string>
</object>
<object class="IBToOneOutletInfo" key="siteInformation">
<string key="name">siteInformation</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="twitterButton">
<string key="name">twitterButton</string>
<string key="candidateClassName">UIButton</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/ShareViewController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">SplitStoryDetailViewController</string>
<string key="superclassName">UIViewController</string>
@ -1127,6 +1238,7 @@
<dictionary class="NSMutableDictionary" key="actions">
<string key="doNextUnreadStory">id</string>
<string key="doPreviousStory">id</string>
<string key="doShareButton:">id</string>
<string key="toggleFontSize:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
@ -1138,6 +1250,10 @@
<string key="name">doPreviousStory</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="doShareButton:">
<string key="name">doShareButton:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="toggleFontSize:">
<string key="name">toggleFontSize:</string>
<string key="candidateClassName">id</string>

View file

@ -134,10 +134,9 @@
- (void)showLogin;
- (void)showFeedsMenu;
- (void)hideFeedsMenu;
- (void)pushFeedDetailToMasterPopover;
- (void)showAdd;
- (void)showMasterPopover;
- (void)showPopover;
- (void)showMoveSite;
- (void)loadFeedDetailView;
- (void)loadRiverFeedDetailView;

View file

@ -438,7 +438,7 @@
// the storyDetailView is full screen
if (self.feedDetailPortraitYCoordinate == 960) {
storyDetailViewController.view.frame = CGRectMake(0,0,storyDetailViewController.view.frame.size.width, 960);
storyDetailViewController.view.frame = CGRectMake(0, 0, 768, 960);
feedDashboardViewController.view.frame = CGRectMake(0,
0,
storyDetailViewController.view.frame.size.width,

View file

@ -18,14 +18,12 @@
@property (retain, nonatomic) IBOutlet UILabel *siteInformation;
@property (retain, nonatomic) IBOutlet UITextView *commentField;
@property (nonatomic, retain) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (retain, nonatomic) IBOutlet UIButton *facebookButton;
@property (retain, nonatomic) IBOutlet UIButton *twitterButton;
- (void)setSiteInfo;
- (IBAction)doCancelButton:(id)sender;
- (IBAction)doToggleButton:(id)sender;
- (IBAction)doShareThisStory:(id)sender;
@property (retain, nonatomic) IBOutlet UIButton *facebookButton;
@property (retain, nonatomic) IBOutlet UIButton *twitterButton;
@end

View file

@ -35,20 +35,14 @@
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
commentField.layer.borderWidth = 1.0f;
commentField.layer.cornerRadius = 8;
commentField.layer.borderColor = [[UIColor grayColor] CGColor];
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
NSLog(@"facebook %d", [userPreferences integerForKey:@"shareToFacebook"]);
NSLog(@"twitter %d", [userPreferences integerForKey:@"shareToTwitter"]);
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([userPreferences integerForKey:@"shareToFacebook"]){
facebookButton.selected = YES;
}
if ([userPreferences integerForKey:@"shareToTwitter"]){
twitterButton.selected = YES;
}
@ -133,18 +127,10 @@
[userPreferences setInteger:1 forKey:@"shareToTwitter"];
}
}
[userPreferences synchronize];
NSLog(@"facebook %d", [userPreferences integerForKey:@"shareToFacebook"]);
NSLog(@"twitter %d", [userPreferences integerForKey:@"shareToTwitter"]);
}
- (IBAction)doShareThisStory:(id)sender {
for (id key in appDelegate.activeStory) {
NSLog(@"Key in appDelegate.activeStory is %@" , key);
}
- (IBAction)doShareThisStory:(id)sender {
NSString *urlString = [NSString stringWithFormat:@"http://%@/social/share_story",
NEWSBLUR_URL];
@ -189,7 +175,7 @@
CGRect shareViewFrame = self.view.frame;
CGRect storyDetailViewFrame = appDelegate.storyDetailViewController.view.frame;
NSLog(@"Keyboard y is %f", keyboardFrame.size.height);
//NSLog(@"Keyboard y is %f", keyboardFrame.size.height);
shareViewFrame.origin.y = shareViewFrame.origin.y + keyboardFrame.size.height;
storyDetailViewFrame.size.height = storyDetailViewFrame.size.height + keyboardFrame.size.height;
@ -213,7 +199,7 @@
CGRect shareViewFrame = self.view.frame;
CGRect storyDetailViewFrame = appDelegate.storyDetailViewController.view.frame;
NSLog(@"Keyboard y is %f", keyboardFrame.size.height);
//NSLog(@"Keyboard y is %f", keyboardFrame.size.height);
shareViewFrame.origin.y = shareViewFrame.origin.y - keyboardFrame.size.height;
storyDetailViewFrame.size.height = storyDetailViewFrame.size.height - keyboardFrame.size.height;

View file

@ -37,7 +37,6 @@
@property (nonatomic, retain) IBOutlet UIView *feedTitleGradient;
@property (retain,nonatomic) UIPopoverController *popoverController;
- (void)showPopover;
- (void)setNextPreviousButtons;
- (void)markStoryAsRead;
- (void)showStory;

View file

@ -98,15 +98,23 @@
target:self
action:@selector(showOriginalSubview:)
];
UIBarButtonItem *fontSettingsButton = [[UIBarButtonItem alloc]
initWithTitle:@"Aa"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(toggleFontSize:)
];
if (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) {
appDelegate.splitStoryDetailViewController.navigationItem.rightBarButtonItem = originalButton;
appDelegate.splitStoryDetailViewController.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:originalButton, fontSettingsButton, nil];
} else {
self.navigationItem.rightBarButtonItem = originalButton;
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:originalButton, fontSettingsButton, nil];
}
[originalButton release];
[fontSettingsButton release];
[super viewDidAppear:animated];
}
@ -117,6 +125,7 @@
self.activeStoryId = nil;
[webView loadHTMLString:@"" baseURL:[NSURL URLWithString:@""]];
}
[popoverController dismissPopoverAnimated:YES];
}
#pragma mark -
@ -162,7 +171,7 @@
}
if (areFriends && [share_user_ids count]) {
avatarString = [avatarString stringByAppendingString:@"</div"];
avatarString = [avatarString stringByAppendingString:@"</div>"];
}
return avatarString;
@ -170,7 +179,6 @@
- (NSString *)getComments {
NSString *comments = @"";
NSLog(@"the sharecount is %@", [appDelegate.activeStory objectForKey:@"share_count"]);
if ([appDelegate.activeStory objectForKey:@"share_count"] != [NSNull null]) {
NSArray *comments_array = [appDelegate.activeStory objectForKey:@"comments"];
comments = [comments stringByAppendingString:[NSString stringWithFormat:@
@ -183,10 +191,9 @@
"<div class=\"NB-story-share-profiles NB-story-share-profiles-public\">"
"%@"
"</div>"
"%@"
"</div></div>",
[[appDelegate.activeStory objectForKey:@"share_count"] intValue] == 1
? [NSString stringWithFormat:@"1 person"] :
@ -194,8 +201,9 @@
[self getAvatars:NO],
[self getAvatars:YES]
]];
for (int i = 0; i < comments_array.count; i++) {
NSDictionary *comment_dict = [comments_array objectAtIndex:i];
NSDictionary *user = [self getUser:[[comment_dict objectForKey:@"user_id"] intValue]];
NSString *comment = [NSString stringWithFormat:@
@ -222,7 +230,6 @@
comments = [comments stringByAppendingString:comment];
}
comments = [comments stringByAppendingString:[NSString stringWithFormat:@"</div>"]];
}
return comments;
}
@ -262,15 +269,17 @@
}
- (void)showStory {
NSString *commentsString = [self getComments];
NSString *customImgCssString, *universalImgCssString, *sharingHtmlString;
NSString *customBodyClass = @"";
for (id key in appDelegate.activeStory) {
NSLog(@"key is: %@ value: %@", key, [appDelegate.activeStory objectForKey:key]);
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([userPreferences stringForKey:@"fontStyle"]){
customBodyClass = [customBodyClass stringByAppendingString:[userPreferences stringForKey:@"fontStyle"]];
} else {
customBodyClass = [customBodyClass stringByAppendingString:@"NB-san-serif"];
}
NSString *commentsString = [self getComments];
NSString *customImgCssString, *universalImgCssString, *sharingHtmlString;
// set up layout values based on iPad/iPhone
universalImgCssString = [NSString stringWithFormat:@
"<script src=\"zepto.js\"></script>"
@ -333,20 +342,21 @@
story_tags];
NSString *htmlString = [NSString stringWithFormat:@
"<html><head>%@ %@</head>"
"<body id=\"story_pane\">%@"
"<body id=\"story_pane\" class=\"%@\">%@"
"<div class=\"NB-story\">%@ </div>"
"%@" // comments
"%@" // share
"</body></html>",
universalImgCssString,
customImgCssString,
customBodyClass,
storyHeader,
[appDelegate.activeStory objectForKey:@"story_content"],
commentsString,
sharingHtmlString
];
// NSLog(@"\n\n\n\nstory content\n\n\n%@<div class=\"NB-story\">%@</div>\n\n\n", storyHeader, [appDelegate.activeStory objectForKey:@"story_content"]);
NSLog(@"\n\n\n\nhtmlString:\n\n\n%@\n\n\n", htmlString);
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
@ -414,9 +424,18 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
}
- (void)webViewDidStartLoad:(UIWebView *)webView {
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([userPreferences integerForKey:@"fontSize"]){
[self setFontSize:[userPreferences integerForKey:@"fontSize"]];
}
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([userPreferences integerForKey:@"fontSize"]){
[self setFontSize:[userPreferences integerForKey:@"fontSize"]];
}
}
#pragma mark -
@ -571,13 +590,21 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
}
- (void)setFontSize:(float)fontSize {
NSString *jsString = [[NSString alloc] initWithFormat:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '%f%%'",
NSString *jsString = [[NSString alloc] initWithFormat:@"document.getElementsByTagName('body')[0].style.fontSize= '%fpx'",
fontSize];
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
[jsString release];
}
- (void)setFontStyle:(NSString *)fontStyle {
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
if ([fontStyle isEqualToString:@"Helvetica"]) {
[userPreferences setObject:@"NB-san-serif" forKey:@"fontStyle"];
} else {
[userPreferences setObject:@"NB-serif" forKey:@"fontStyle"];
}
[userPreferences synchronize];
NSString *jsString = [[NSString alloc] initWithFormat:@"document.getElementsByTagName('body')[0].style.fontFamily= '%@'",
fontStyle];
[self.webView stringByEvaluatingJavaScriptFromString:jsString];

View file

@ -612,6 +612,8 @@
437AA8AB15922D13005463F5 /* FeedDashboardViewController.m */,
439DAB1D1590DA350019B0EB /* FeedsMenuViewController.h */,
439DAB1E1590DA350019B0EB /* FeedsMenuViewController.m */,
43763ACE158F90B100B3DBE2 /* FontSettingsViewController.h */,
43763ACF158F90B100B3DBE2 /* FontSettingsViewController.m */,
28D7ACF60DDB3853001CB0EB /* NewsBlurViewController.h */,
28D7ACF70DDB3853001CB0EB /* NewsBlurViewController.m */,
FFCE7AE513D49165009A98F6 /* FeedTableCell.h */,
@ -634,8 +636,6 @@
7842ECF611D44A530066CF9D /* StoryDetailViewController.m */,
FFE5322D144C8AC300ACFDE0 /* Utilities.h */,
FFE5322E144C8AC300ACFDE0 /* Utilities.m */,
43763ACE158F90B100B3DBE2 /* FontSettingsViewController.h */,
43763ACF158F90B100B3DBE2 /* FontSettingsViewController.m */,
);
path = Classes;
sourceTree = "<group>";

View file

@ -41,6 +41,7 @@
- (void)dealloc
{
[configuration release];
[super dealloc];
}
- (id)init

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,74 @@
body {
line-height: 1.6;
font-size: 17px;
font-family: 'Lucida Grande', Helvetica, Arial;
text-rendering: optimizeLegibility;
margin: 0;
background: #f6f6f6;
}
.NB-story-author {
color: #969696;
text-transform: uppercase;
margin: 4px 8px 0px 0;
text-shadow: 0 1px 0 #F9F9F9;
float: left;
}
.NB-story-tags {
overflow: hidden;
padding: 5px 0 0 0;
text-transform: uppercase;
}
.NB-story-tag {
float: left;
font-weight: normal;
padding: 0px 4px 0px;
margin: 0px 4px 4px 0;
background-color: #C6CBC3;
color: #505050;
text-shadow: 0 1px 0 #E7E7E7;
-webkit-border-radius: 4px;
}
.NB-story-date {
color: #454D6C;
}
/* FONT RENDERING */
body {
line-height: 1.6em;
font-size: 16px;
}
.NB-san-serif {
font-family: Helvetica;
}
.NB-serif {
font-family: georgia;
}
.NB-story-author {
font-size: 10px;
line-height: 12px
}
.NB-story-tags {
line-height: 12px;
}
.NB-story-tag {
font-size: 9px;
}
.NB-story-date {
font-size: 11px;
line-height: 13px;
}
/* END: FONT RENDERING */
h1, h2, h3, h4, h5, h6, div, table, span, pre, code {
overflow: auto;
}
@ -23,11 +85,11 @@ blockquote {
}
h1, h2, h3, h4, h5, h6, div, table, span, pre, code, img {
max-width: 588px;
max-width: 588px;
}
div {
width: auto !important;
width: auto !important;
}
p {
@ -40,15 +102,15 @@ small {
}
.NB-header {
font-size: 22px;
line-height: 29px;
font-weight: 600;
background-color: #E0E0E0;
border-bottom: 1px solid #A0A0A0;
padding: 15px 90px;
text-shadow: 1px 1px 0 #EFEFEF;
overflow: hidden;
max-width: none;
font-size: 22px;
line-height: 1.1em;
font-weight: 600;
background-color: #E0E0E0;
border-bottom: 1px solid #A0A0A0;
padding: 15px 90px;
text-shadow: 1px 1px 0 #EFEFEF;
overflow: hidden;
max-width: none;
}
.NB-story {
@ -59,10 +121,6 @@ small {
display: block;
}
.NB-story img.NB-tracker {
}
.NB-story img {
max-width: 572px !important;
margin: 0 auto;
@ -97,44 +155,6 @@ small {
margin: 30px 90px !important;
}
.NB-story-author {
color: #969696;
font-size: 10px;
text-transform: uppercase;
margin: 4px 8px 0px 0;
text-shadow: 0 1px 0 #F9F9F9;
float: left;
line-height: 12px
}
.NB-story-tags {
overflow: hidden;
line-height: 12px;
padding: 5px 0 0 0;
text-transform: uppercase;
}
.NB-story-tag {
float: left;
font-size: 10px;
font-weight: normal;
font-size: 9px;
padding: 0px 4px 0px;
margin: 0px 4px 4px 0;
background-color: #C6CBC3;
color: #505050;
text-shadow: 0 1px 0 #E7E7E7;
-webkit-border-radius: 4px;
}
.NB-story-date {
font-size: 11px;
color: #454D6C;
line-height: 13px;
}
.NB-story-title {
clear: left;
margin: 8px 0 4px;

View file

@ -15,7 +15,6 @@ Zepto(function($) {
$img.parent().addClass('NB-contains-image')
}
var width = $(img).width();
console.log('width is' + width);
if ($(img).attr('src').indexOf('feedburner') != -1) {
$(img).addClass('NB-feedburner');
} else if (width > 300) {