Small tweaks to blurblogs. iPadifying blurblogs.

This commit is contained in:
Samuel Clay 2012-07-11 21:20:38 -07:00
parent 5225395b40
commit bfa00d8bd4
4 changed files with 65 additions and 38 deletions

View file

@ -65,6 +65,11 @@ header {
text-shadow: 1px 1px 0 #E0E0E0;
overflow: hidden;
}
@media all and (max-width: 500px) {
header {
padding: 24px 0;
}
}
.NB-header-table {
padding: 0;
@ -84,6 +89,16 @@ header {
.NB-title-photo img {
max-width: 148px;
max-height: 148px;
border-radius: 4px;
}
@media all and (max-width: 500px) {
.NB-title-photo img {
max-width: 72px;
max-height: 72px;
}
.NB-header-right {
display: none;
}
}
.NB-title {
vertical-align: middle;
@ -163,7 +178,7 @@ header {
.NB-header .NB-header-right {
z-index: 1;
vertical-align: top;
vertical-align: middle;
padding: 24px 12px;
}
.NB-header .NB-title-logo {
@ -252,6 +267,12 @@ header {
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
}
@media all and (max-width: 500px) {
.NB-feed {
padding-right: 12px;
}
}
.NB-feed-title {
padding: 2px 0;
}
@ -311,24 +332,18 @@ header {
border-top: 1px solid #FFF;
}
@media all and (max-width: 500px) {
.NB-story-header {
padding: 6px 12px 12px 12px;
}
}
.NB-story-header-wrapper {
border-bottom: 1px solid #D0D0D0;
border-right: 1px solid #A6A6A6;
border-left: 1px solid #A6A6A6;
}
@media all and (max-width: 800px) {
.NB-story-header {
padding-right: 268px;
}
}
@media all and (max-width: 500px) {
.NB-story-header {
padding-top: 36px;
padding-right: 12px;
}
}
.NB-story-title {
clear: both;
font-weight: bold;
@ -383,14 +398,18 @@ header {
text-transform: uppercase;
}
@media all and (max-width: 800px) {
.NB-story-date {
top: 6px;
}
.NB-story-date-break {
display: block;
}
}
@media all and (max-width: 500px) {
.NB-story-date {
right: none;
left: 32px;
position: static;
margin: 0 0 6px 0;
font-size: 13px;
}
.NB-story-date-break {
display: inline;
@ -442,7 +461,7 @@ header {
padding: 12px 222px 24px 28px;
position: relative;
}
@media all and (max-width: 800px) {
/*@media all and (max-width: 800px) {
.NB-story-content {
padding-right: 100px;
}
@ -452,9 +471,10 @@ header {
padding-right: 50px;
}
}
@media all and (max-width: 600px) {
*/
@media all and (max-width: 500px) {
.NB-story-content {
padding-right: 0px;
padding: 12px 12px 12px;
}
}
@ -491,6 +511,7 @@ header {
/* ======================= */
.NB-story-comments-container {
clear: both;
}
.NB-story-comments a {
@ -503,7 +524,6 @@ header {
border: none;
}
.NB-story-comments {
max-width: 800px;
border-top: 2px solid #626262;
border-bottom: 1px solid #EFEFEF;
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
@ -814,6 +834,11 @@ header {
text-align: center;
width: 162px;
}
@media all and (max-width: 500px) {
.NB-feed-story-sideoptions-container {
display: none;
}
}
.NB-sideoption {
cursor: pointer;

View file

@ -3423,14 +3423,14 @@
refresh_interval *= 2;
}
if (feed_count > 250) {
refresh_interval *= 4;
refresh_interval *= 2;
}
if (feed_count > 500) {
refresh_interval *= 1.5;
}
if (this.flags['feed_refreshing_in_realtime'] && !this.flags['has_unfetched_feeds'] &&
this.socket && this.socket.socket.connected) {
refresh_interval *= 20;
refresh_interval *= 10;
}
if (new_feeds && feed_count < 250) {
@ -3446,14 +3446,10 @@
this.flags.feed_refresh = setInterval(function() {
if (!self.flags['pause_feed_refreshing']) {
self.model.refresh_feeds(_.bind(function(updated_feeds) {
self.post_feed_refresh(updated_feeds);
}, self), self.flags['has_unfetched_feeds'], null, function(e) {
NEWSBLUR.log(["Feed refresh error", e]);
});
self.force_feeds_refresh();
}
}, refresh_interval);
// NEWSBLUR.log(["Setting refresh interval to every " + refresh_interval/1000 + " seconds."]);
NEWSBLUR.log(["Setting refresh interval to every " + refresh_interval/1000 + " seconds."]);
},
force_feed_refresh: function(feed_id, new_feed_id) {

View file

@ -7,7 +7,7 @@
<title>{{ social_profile.feed_title }}</title>
<link rel="alternate" type="application/rss+xml" href="{% url shared-stories-rss-feed social_profile.user_id social_profile.username|slugify %}" title="{{ social_profile.feed_title }} RSS feed">
<link rel="shortcut icon" HREF="{{ social_profile.photo_url }}">
<meta name="viewport" content="width=440">
<meta name="viewport" content="initial-scale=1, maximum-scale=1.5">
{% include_stylesheets "blurblog" %}
@ -146,6 +146,12 @@
_.extend(NEWSBLUR.Preferences, {% if user_profile.preferences %}{{ user_profile.preferences|safe }}{% else %}{}{% endif %});
</script>
<script>
if ($(window).width() < 600) {
$('meta[name=viewport]').attr('content','initial-scale=0.9, maximum-scale=1.5');
}
</script>
</body>
</html>

View file

@ -19,6 +19,16 @@
<div class="NB-story-header-wrapper">
<div class="NB-story-header">
<div class="NB-story-date">
{% if story.has_modifications %}
<div class="NB-story-modifications-button" title="Show story changes"></div>
{% endif %}
{{ story.shared_date|date:"D F j<\s\u\p>S</\s\u\p>, Y"|safe }}
<span class="NB-story-date-break"></span>
<small>at</small>
{{ story.shared_date|date:"g:i A"|safe }}
</div>
{% if story.story_authors %}
<div class="NB-story-author">{{ story.story_authors }}</div>
{% endif %}
@ -32,16 +42,6 @@
<div class="NB-story-title">
<a href="{{ story.story_permalink }}">{{ story.story_title }}</a>
</div>
<div class="NB-story-date">
{% if story.has_modifications %}
<div class="NB-story-modifications-button" title="Show story changes"></div>
{% endif %}
{{ story.shared_date|date:"D F j<\s\u\p>S</\s\u\p>, Y"|safe }}
<span class="NB-story-date-break"></span>
<small>at</small>
{{ story.shared_date|date:"g:i A"|safe }}
</div>
</div>
</div>