This commit is contained in:
GRiker 2010-06-27 13:42:12 -06:00
parent 291982b2e1
commit 0809d2f6ee
4 changed files with 81 additions and 34 deletions

View File

@ -89,6 +89,7 @@ class NYTimes(BasicNewsRecipe):
'relatedSearchesModule', 'relatedSearchesModule',
'side_tool', 'side_tool',
'singleAd', 'singleAd',
'subNavigation clearfix',
'subNavigation tabContent active', 'subNavigation tabContent active',
'subNavigation tabContent active clearfix', 'subNavigation tabContent active clearfix',
]}), ]}),

View File

@ -76,6 +76,7 @@ class NYTimes(BasicNewsRecipe):
'relatedSearchesModule', 'relatedSearchesModule',
'side_tool', 'side_tool',
'singleAd', 'singleAd',
'subNavigation clearfix',
'subNavigation tabContent active', 'subNavigation tabContent active',
'subNavigation tabContent active clearfix', 'subNavigation tabContent active clearfix',
]}), ]}),

View File

@ -275,13 +275,43 @@ class iPadOutput(OutputProfile):
# touchscreen_news_css {{{ # touchscreen_news_css {{{
touchscreen_news_css = u''' touchscreen_news_css = u'''
/* hr used in articles */ /* hr used in articles */
.article_articles_list {
width:18%;
}
.article_link {
font-style: italic;
}
.article_next {
-webkit-border-top-right-radius:4px;
-webkit-border-bottom-right-radius:4px;
font-style: italic;
width:32%;
}
.article_prev {
-webkit-border-top-left-radius:4px;
-webkit-border-bottom-left-radius:4px;
font-style: italic;
width:32%;
}
.article_sections_list {
width:18%;
}
.articles_link {
font-weight: bold;
}
.sections_link {
font-weight: bold;
}
.caption_divider { .caption_divider {
border:#ccc 1px solid; border:#ccc 1px solid;
} }
.touchscreen_navbar { .touchscreen_navbar {
background:#ccc; background:#ccc;
border:#ccc 1px solid; border:#ccc 0px solid;
border-collapse:separate; border-collapse:separate;
border-spacing:1px; border-spacing:1px;
margin-left: 5%; margin-left: 5%;
@ -295,18 +325,6 @@ class iPadOutput(OutputProfile):
font-size:90%; font-size:90%;
padding: 5px; padding: 5px;
text-align:center; text-align:center;
}
.touchscreen_navbar td:first-child {
-webkit-border-top-left-radius:4px;
-webkit-border-bottom-left-radius:4px;
}
.touchscreen_navbar td:last-child {
-webkit-border-top-right-radius:4px;
-webkit-border-bottom-right-radius:4px;
}
.feed_link {
font-style: italic;
} }
/* Index formatting */ /* Index formatting */
@ -318,12 +336,47 @@ class iPadOutput(OutputProfile):
border-top:1px solid gray; border-top:1px solid gray;
} }
hr.caption_divider {
border-color:black;
border-style:solid;
border-width:1px;
}
/* Feed summary formatting */ /* Feed summary formatting */
.feed {
font-family:sans-serif;
font-weight:bold;
font-size:larger;
}
.feed_link {
font-style: italic;
}
.feed_next {
-webkit-border-top-right-radius:4px;
-webkit-border-bottom-right-radius:4px;
font-style: italic;
width:40%;
}
.feed_prev {
-webkit-border-top-left-radius:4px;
-webkit-border-bottom-left-radius:4px;
font-style: italic;
width:40%;
}
.feed_title { .feed_title {
text-align: center; text-align: center;
font-size: 160%; font-size: 160%;
} }
.feed_up {
font-weight: bold;
width:20%;
}
.summary_headline { .summary_headline {
font-weight:bold; font-weight:bold;
text-align:left; text-align:left;
@ -338,12 +391,6 @@ class iPadOutput(OutputProfile):
text-align:left; text-align:left;
} }
.feed {
font-family:sans-serif;
font-weight:bold;
font-size:larger;
}
''' '''
# }}} # }}}

View File

@ -269,11 +269,11 @@ class TouchscreenFeedTemplate(Template):
link = A(CLASS('feed_link'), link = A(CLASS('feed_link'),
trim_title(feeds[f-1].title), trim_title(feeds[f-1].title),
href = '../feed_%d/index.html' % int(f-1)) href = '../feed_%d/index.html' % int(f-1))
navbar_tr.append(TD(link, width="40%", align="center")) navbar_tr.append(TD(CLASS('feed_prev'),link))
# Up to Sections # Up to Sections
link = A(STRONG('Sections'), href="../index.html") link = A('Sections', href="../index.html")
navbar_tr.append(TD(link,width="20%",align="center")) navbar_tr.append(TD(CLASS('feed_up'),link))
# Next Section # Next Section
link = '' link = ''
@ -281,7 +281,7 @@ class TouchscreenFeedTemplate(Template):
link = A(CLASS('feed_link'), link = A(CLASS('feed_link'),
trim_title(feeds[f+1].title), trim_title(feeds[f+1].title),
href = '../feed_%d/index.html' % int(f+1)) href = '../feed_%d/index.html' % int(f+1))
navbar_tr.append(TD(link, width="40%", align="center", )) navbar_tr.append(TD(CLASS('feed_next'),link))
navbar_t.append(navbar_tr) navbar_t.append(navbar_tr)
top_navbar = navbar_t top_navbar = navbar_t
bottom_navbar = copy.copy(navbar_t) bottom_navbar = copy.copy(navbar_t)
@ -354,27 +354,25 @@ class TouchscreenNavBarTemplate(Template):
# | Previous # | Previous
if art > 0: if art > 0:
href = '%s../article_%d/index.html'%(prefix, art-1) link = A(CLASS('article_link'),'Previous',href='%s../article_%d/index.html'%(prefix, art-1))
navbar_tr.append(TD(A(EM('Previous'),href=href), navbar_tr.append(TD(CLASS('article_prev'),link))
width="32%"))
else: else:
navbar_tr.append(TD('', width="32%")) navbar_tr.append(TD(CLASS('article_prev'),''))
# | Articles | Sections | # | Articles | Sections |
href = '%s../index.html#article_%d'%(prefix, art) link = A(CLASS('articles_link'),'Articles', href='%s../index.html#article_%d'%(prefix, art))
navbar_tr.append(TD(A(STRONG('Articles'), href=href),width="18%")) navbar_tr.append(TD(CLASS('article_articles_list'),link))
href = '%s../../index.html#feed_%d'%(prefix, feed) link = A(CLASS('sections_link'),'Sections', href='%s../../index.html#feed_%d'%(prefix, feed))
navbar_tr.append(TD(A(STRONG('Sections'), href=href),width="18%")) navbar_tr.append(TD(CLASS('article_sections_list'),link))
# | Next # | Next
next = 'feed_%d'%(feed+1) if art == number_of_articles_in_feed - 1 \ next = 'feed_%d'%(feed+1) if art == number_of_articles_in_feed - 1 \
else 'article_%d'%(art+1) else 'article_%d'%(art+1)
up = '../..' if art == number_of_articles_in_feed - 1 else '..' up = '../..' if art == number_of_articles_in_feed - 1 else '..'
href = '%s%s/%s/index.html'%(prefix, up, next)
navbar_tr.append(TD(A(EM('Next'),href=href), link = A(CLASS('article_link'),'Next', href='%s%s/%s/index.html'%(prefix, up, next))
width="32%")) navbar_tr.append(TD(CLASS('article_next'),link))
navbar_t.append(navbar_tr) navbar_t.append(navbar_tr)
navbar.append(navbar_t) navbar.append(navbar_t)
#print "\n%s\n" % etree.tostring(navbar, pretty_print=True) #print "\n%s\n" % etree.tostring(navbar, pretty_print=True)