mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
making share button larger and fixing tap zone for buttons
This commit is contained in:
parent
8fb1cfa269
commit
be89609470
5 changed files with 84 additions and 40 deletions
|
@ -171,6 +171,9 @@ static UIFont *indicatorFont = nil;
|
|||
CGContextAddLineToPoint(context, 5.0f, 81.0f);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
|
||||
// reset for borders
|
||||
CGContextSetAlpha(context, 1.0);
|
||||
CGContextSetLineWidth(context, 1.0f);
|
||||
if (self.highlighted || self.selected) {
|
||||
// top border
|
||||
|
|
|
@ -791,24 +791,30 @@
|
|||
NSDictionary *friendFeed;
|
||||
id feedId;
|
||||
NSString *feedIdStr;
|
||||
NSDictionary *story = [activeFeedStories objectAtIndex:activeIndex];
|
||||
NSMutableArray *otherFriendFeeds = [[self.activeStory objectForKey:@"shared_by_friends"] mutableCopy];
|
||||
|
||||
if (self.isSocialView) {
|
||||
if (self.isSocialView || self.isSocialRiverView) {
|
||||
feedId = [self.activeStory objectForKey:@"social_user_id"];
|
||||
feedIdStr = [NSString stringWithFormat:@"social:%@",feedId];
|
||||
feed = [self.dictSocialFeeds objectForKey:feedIdStr];
|
||||
|
||||
[otherFriendFeeds removeObject:feedId];
|
||||
NSLog(@"otherFriendFeeds is %@", otherFriendFeeds);
|
||||
|
||||
// make sure we set the active feed
|
||||
self.activeFeed = feed;
|
||||
} else {
|
||||
feedId = [self.activeStory objectForKey:@"story_feed_id"];
|
||||
feedIdStr = [NSString stringWithFormat:@"%@",feedId];
|
||||
feed = [self.dictFeeds objectForKey:feedIdStr];
|
||||
|
||||
// make sure we set the active feed
|
||||
self.activeFeed = feed;
|
||||
}
|
||||
|
||||
NSDictionary *story = [activeFeedStories objectAtIndex:activeIndex];
|
||||
// decrement all other friend feeds if they have the same story
|
||||
if (self.isSocialView) {
|
||||
if (self.isSocialView || self.isSocialRiverView) {
|
||||
for (int i = 0; i < otherFriendFeeds.count; i++) {
|
||||
feedIdStr = [NSString stringWithFormat:@"social:%@",
|
||||
[otherFriendFeeds objectAtIndex:i]];
|
||||
|
@ -817,9 +823,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// make sure we set the active feed
|
||||
self.activeFeed = feed;
|
||||
|
||||
[self.recentlyReadStories addObject:[NSNumber numberWithInt:activeLocation]];
|
||||
[self markStoryRead:story feed:feed];
|
||||
}
|
||||
|
|
|
@ -386,9 +386,9 @@
|
|||
if ([commentUserId isEqualToString:currentUserId]) {
|
||||
userEditButton = [NSString stringWithFormat:@
|
||||
"<div class=\"NB-story-comment-edit-button NB-story-comment-share-edit-button NB-button\">"
|
||||
"<div class=\"NB-story-comment-edit-button-wrapper\">"
|
||||
"<a href=\"http://ios.newsblur.com/edit-share/%@\">Edit</a>"
|
||||
"</div>"
|
||||
"<a href=\"http://ios.newsblur.com/edit-share/%@\"><div class=\"NB-story-comment-edit-button-wrapper\">"
|
||||
"Edit"
|
||||
"</div></a>"
|
||||
"</div>",
|
||||
commentUserId];
|
||||
} else {
|
||||
|
@ -403,17 +403,17 @@
|
|||
if (isInLikingUsers) {
|
||||
userLikeButton = [NSString stringWithFormat:@
|
||||
"<div class=\"NB-story-comment-like-button NB-button selected\">"
|
||||
"<div class=\"NB-story-comment-like-button-wrapper\">"
|
||||
"<a href=\"http://ios.newsblur.com/unlike-comment/%@\">Favorited</a>"
|
||||
"</div>"
|
||||
"<a href=\"http://ios.newsblur.com/unlike-comment/%@\"><div class=\"NB-story-comment-like-button-wrapper\">"
|
||||
"Favorited"
|
||||
"</div></a>"
|
||||
"</div>",
|
||||
commentUserId];
|
||||
} else {
|
||||
userLikeButton = [NSString stringWithFormat:@
|
||||
"<div class=\"NB-story-comment-like-button NB-button\">"
|
||||
"<div class=\"NB-story-comment-like-button-wrapper\">"
|
||||
"<a href=\"http://ios.newsblur.com/like-comment/%@\">Favorite</a>"
|
||||
"</div>"
|
||||
"<a href=\"http://ios.newsblur.com/like-comment/%@\"><div class=\"NB-story-comment-like-button-wrapper\">"
|
||||
"Favorite"
|
||||
"</div></a>"
|
||||
"</div>",
|
||||
commentUserId];
|
||||
}
|
||||
|
@ -446,9 +446,9 @@
|
|||
" <div class=\"NB-story-comment-username\">%@</div>"
|
||||
" <div class=\"NB-story-comment-date\">%@ ago</div>"
|
||||
" <div class=\"NB-story-comment-reply-button NB-button\">"
|
||||
" <div class=\"NB-story-comment-reply-button-wrapper\">"
|
||||
" <a href=\"http://ios.newsblur.com/reply/%@/%@\">Reply</a>"
|
||||
" </div>"
|
||||
" <a href=\"http://ios.newsblur.com/reply/%@/%@\"><div class=\"NB-story-comment-reply-button-wrapper\">"
|
||||
" Reply"
|
||||
" </div></a>"
|
||||
" </div>"
|
||||
" %@" //User Edit Button>"
|
||||
" %@" //User Like Button>"
|
||||
|
@ -482,9 +482,9 @@
|
|||
|
||||
"<div style=\"clear:both\">"
|
||||
" <div class=\"NB-story-comment-reply-button NB-button\">"
|
||||
" <div class=\"NB-story-comment-reply-button-wrapper\">"
|
||||
" <a href=\"http://ios.newsblur.com/reply/%@/%@\">Reply</a>"
|
||||
" </div>"
|
||||
" <a href=\"http://ios.newsblur.com/reply/%@/%@\"><div class=\"NB-story-comment-reply-button-wrapper\">"
|
||||
" Reply"
|
||||
" </div></a>"
|
||||
" </div>"
|
||||
" %@" //User Edit Button>"
|
||||
" %@" //User Like Button>"
|
||||
|
@ -527,9 +527,11 @@
|
|||
if ([replyUserId isEqualToString:currentUserId]) {
|
||||
userEditButton = [NSString stringWithFormat:@
|
||||
"<div class=\"NB-story-comment-edit-button NB-story-comment-share-edit-button NB-button\">"
|
||||
"<a href=\"http://ios.newsblur.com/edit-reply/%@/%@/%@\">"
|
||||
"<div class=\"NB-story-comment-edit-button-wrapper\">"
|
||||
"<a href=\"http://ios.newsblur.com/edit-reply/%@/%@/%@\">edit</a>"
|
||||
"edit"
|
||||
"</div>"
|
||||
"</a>"
|
||||
"</div>",
|
||||
commentUserId,
|
||||
replyUserId,
|
||||
|
@ -643,9 +645,11 @@
|
|||
sharingHtmlString = [NSString stringWithFormat:@
|
||||
"<div class='NB-share-header'></div>"
|
||||
"<div class='NB-share-wrapper'><div class='NB-share-inner-wrapper'>"
|
||||
"<div id=\"NB-share-button-id\" class='NB-share-button NB-button'><div>"
|
||||
"<a href=\"http://ios.newsblur.com/share\">Post to Blurblog</a>"
|
||||
"</div></div>"
|
||||
"<div id=\"NB-share-button-id\" class='NB-share-button NB-button'>"
|
||||
"<a href=\"http://ios.newsblur.com/share\"><div>"
|
||||
"Post to Blurblog"
|
||||
"</div></a>"
|
||||
"</div>"
|
||||
"</div></div>"];
|
||||
NSString *story_author = @"";
|
||||
if ([appDelegate.activeStory objectForKey:@"story_authors"]) {
|
||||
|
@ -1029,7 +1033,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
|||
[appDelegate markActiveStoryRead];
|
||||
|
||||
NSString *urlString;
|
||||
if (appDelegate.isSocialView) {
|
||||
if (appDelegate.isSocialView || appDelegate.isSocialRiverView) {
|
||||
urlString = [NSString stringWithFormat:@"http://%@/reader/mark_social_stories_as_read",
|
||||
NEWSBLUR_URL];
|
||||
} else {
|
||||
|
@ -1040,7 +1044,20 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
|||
NSURL *url = [NSURL URLWithString:urlString];
|
||||
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
|
||||
|
||||
if (appDelegate.isSocialView) {
|
||||
if (appDelegate.isSocialRiverView) {
|
||||
// grab the user id from the shared_by_friends
|
||||
NSArray *storyId = [NSArray arrayWithObject:[appDelegate.activeStory objectForKey:@"id"]];
|
||||
NSString *friendUserId = [NSString stringWithFormat:@"%@",
|
||||
[[appDelegate.activeStory objectForKey:@"shared_by_friends"] objectAtIndex:0]];
|
||||
NSDictionary *feedStory = [NSDictionary dictionaryWithObject:storyId
|
||||
forKey:[NSString stringWithFormat:@"%@",
|
||||
[appDelegate.activeStory objectForKey:@"story_feed_id"]]];
|
||||
|
||||
NSDictionary *usersFeedsStories = [NSDictionary dictionaryWithObject:feedStory
|
||||
forKey:friendUserId];
|
||||
|
||||
[request setPostValue:[usersFeedsStories JSONRepresentation] forKey:@"users_feeds_stories"];
|
||||
} else if (appDelegate.isSocialView) {
|
||||
NSArray *storyId = [NSArray arrayWithObject:[appDelegate.activeStory objectForKey:@"id"]];
|
||||
NSDictionary *feedStory = [NSDictionary dictionaryWithObject:storyId
|
||||
forKey:[NSString stringWithFormat:@"%@",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -55,6 +55,8 @@
|
|||
margin: 0 90px;
|
||||
}
|
||||
|
||||
.NB-ipad-wide#story_pane .nb-story-comments-public-teaser,
|
||||
.NB-ipad-wide#story_pane .nb-story-comments-public-header,
|
||||
.NB-ipad-wide#story_pane .NB-story-comments-shares-teaser {
|
||||
padding-left: 90px;
|
||||
padding-right: 90px;
|
||||
|
@ -72,6 +74,8 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* iPad Narrow Style
|
||||
*/
|
||||
|
@ -88,6 +92,8 @@
|
|||
margin: 0 30px;
|
||||
}
|
||||
|
||||
.NB-ipad-narrow#story_pane .nb-story-comments-public-teaser,
|
||||
.NB-ipad-narrow#story_pane .nb-story-comments-public-header,
|
||||
.NB-ipad-narrow#story_pane .NB-story-comments-shares-teaser {
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
|
@ -427,8 +433,8 @@ a.NB-show-profile {
|
|||
}
|
||||
|
||||
.NB-button.NB-share-button {
|
||||
float: left;
|
||||
padding: 0px 20px 20px 0px;
|
||||
float: none;
|
||||
padding: 0px 0px 20px 0px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
@ -451,8 +457,13 @@ a.NB-show-profile {
|
|||
}
|
||||
|
||||
.NB-button.NB-share-button div {
|
||||
padding: 4px 14px;
|
||||
padding: 8px 14px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
background: -webkit-gradient(
|
||||
linear, left top, left bottom,
|
||||
from(#42aaff),
|
||||
to(#003366));
|
||||
}
|
||||
|
||||
.NB-button .nb-story-comment-like-button-wrapper a {
|
||||
|
@ -472,8 +483,8 @@ a.NB-show-profile {
|
|||
background: transparent url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAFkSURBVCiRbZC/6xNBFMTn7e1mDVyhWIlgZSFYqSBEEsEQCUTBxsLKv0TBWrQWrGwtjFU603oEFP0T0ljYyt1lf+TNWgXCl5ty5g0f5gEDaprmQdM0T4cyuWhst1up6/o7gMs553vT6bQ/z83Fgvf+mXPuvnPuFskXg4TNZnNpPB5fE5GrdV1/9N7fIYkQwr5t25cA/qSU/q5Wq052u90ba+0jAHdFpLbWIsYIVcVoNELOGap6IPk75/zTkNyTfOi9r6uqwuFwQEoJKSV0XQeScM6NSU5KKXszmUw+hRAe933/DwBUFaUUAMDxeISIIITQppSez+fz9wYAZrPZtxjjK1UtzjmoKkiiqiqUUpBS+rBYLL4AgD2tL6W0JCEi8N7jnEYyDL31tjFGAIBkUtXWGAMRgareOB2dE673fY+c87sY41eSyVr7REReq+qVocLnruveLpfLX2fUH+v1eu2cu3ky/gOHFMgsTjV4FQAAAABJRU5ErkJggg==") no-repeat left 1px;
|
||||
}
|
||||
|
||||
.NB-button a,
|
||||
.NB-button.NB-share-button a {
|
||||
.NB-button a {
|
||||
display: block;
|
||||
padding-top: 1px;
|
||||
line-height: 16px;
|
||||
font-family: Helvetica, sans-serif;
|
||||
|
@ -484,6 +495,12 @@ a.NB-show-profile {
|
|||
0px 1px 0px rgba(255,255,255,1);
|
||||
}
|
||||
|
||||
.NB-button.NB-share-button a {
|
||||
color: #FFF;
|
||||
text-shadow: none;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.NB-button.hover a,
|
||||
.NB-button.selected a {
|
||||
color: rgba(255,255,255,1);
|
||||
|
|
Loading…
Add table
Reference in a new issue