mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Merge branch 'django1.7' into django1.8
* django1.7: Not every story is from a feed. Styling background colors for newsletters. Styling more newsletter elements. Using the correct attribute. Typo in template Attempting to style newsletters in dark mode. Loading dark theme if selected on load. Adding scrollbar colors. Using request body for ios subscription.
This commit is contained in:
commit
fcbbd4ac25
7 changed files with 53 additions and 8 deletions
|
@ -689,10 +689,10 @@ def email_optout(request):
|
|||
|
||||
@json.json_view
|
||||
def ios_subscription_status(request):
|
||||
logging.debug(" ---> iOS Subscription Status: %s" % request.__dict__)
|
||||
logging.debug(" ---> iOS Subscription Status: %s" % request.body)
|
||||
|
||||
subject = "iOS Subscription Status"
|
||||
message = """%s""" % (request.__dict__)
|
||||
message = """%s""" % (request.body)
|
||||
mail_admins(subject, message)
|
||||
|
||||
return {
|
||||
|
|
|
@ -104,6 +104,7 @@ def dashboard(request, **kwargs):
|
|||
statistics = MStatistics.all()
|
||||
social_profile = MSocialProfile.get_user(user.pk)
|
||||
custom_styling = MCustomStyling.get_user(user.pk)
|
||||
preferences = json.decode(user.profile.preferences)
|
||||
|
||||
if not user.is_active:
|
||||
url = "https://%s%s" % (Site.objects.get_current().domain,
|
||||
|
@ -114,6 +115,7 @@ def dashboard(request, **kwargs):
|
|||
|
||||
return {
|
||||
'user_profile' : user.profile,
|
||||
'preferences' : preferences,
|
||||
'feed_count' : feed_count,
|
||||
'custom_styling' : custom_styling,
|
||||
'account_images' : range(1, 4),
|
||||
|
|
|
@ -78,15 +78,20 @@ body.NB-dark {
|
|||
/* = Scrollbars = */
|
||||
/* ============== */
|
||||
|
||||
.NB-dark {
|
||||
scrollbar-color: #565859 #262829;
|
||||
}
|
||||
.NB-dark ::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.NB-dark ::-webkit-scrollbar-thumb {
|
||||
.NB-dark ::-webkit-scrollbar-thumb,
|
||||
.NB-dark::-webkit-scrollbar-thumb {
|
||||
background-color: #565859;
|
||||
}
|
||||
|
||||
.NB-dark ::-webkit-scrollbar-track {
|
||||
.NB-dark ::-webkit-scrollbar-track,
|
||||
.NB-dark::-webkit-scrollbar-track {
|
||||
background-color: #262829;
|
||||
}
|
||||
|
||||
|
@ -1164,6 +1169,23 @@ background-color: #5d8392;
|
|||
color: #c0c0c0;
|
||||
background-color: #191b1c;
|
||||
}
|
||||
.NB-dark .NB-newsletter p,
|
||||
.NB-dark .NB-newsletter div,
|
||||
.NB-dark .NB-newsletter span,
|
||||
.NB-dark .NB-newsletter td {
|
||||
color: #c0c0c0 !important;
|
||||
}
|
||||
.NB-dark .NB-newsletter td {
|
||||
background-color: #191b1c;
|
||||
}
|
||||
.NB-dark .NB-newsletter h1,
|
||||
.NB-dark .NB-newsletter h2,
|
||||
.NB-dark .NB-newsletter h3,
|
||||
.NB-dark .NB-newsletter h4,
|
||||
.NB-dark .NB-newsletter h5,
|
||||
.NB-dark .NB-newsletter h6 {
|
||||
color: #c0c0c0 !important;
|
||||
}
|
||||
|
||||
/* Quote blocks found in stories */
|
||||
.NB-dark .NB-feed-story blockquote {
|
||||
|
|
|
@ -15,7 +15,21 @@ body {
|
|||
text-rendering: optimizeLegibility;
|
||||
background-color: white;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-color: #C2C2C2 #FAFAFA;
|
||||
}
|
||||
|
||||
/*::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
}
|
||||
*/
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #C2C2C2;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
.NB-layout {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
|
|
|
@ -23,6 +23,10 @@ NEWSBLUR.Models.Story = Backbone.Model.extend({
|
|||
this.public_comments = new NEWSBLUR.Collections.Comments(this.get('public_comments'));
|
||||
},
|
||||
|
||||
feed: function() {
|
||||
return NEWSBLUR.assets.get_feed(this.get('story_feed_id'));
|
||||
},
|
||||
|
||||
score: function() {
|
||||
if (NEWSBLUR.reader.flags['starred_view']) {
|
||||
return 2;
|
||||
|
|
|
@ -230,7 +230,7 @@ NEWSBLUR.Views.StoryDetailView = Backbone.View.extend({
|
|||
<div class="NB-feed-story-shares-container"></div>\
|
||||
<div class="NB-story-content-container">\
|
||||
<div class="NB-story-content-wrapper <% if (truncatable) { %>NB-story-content-truncatable<% } %>">\
|
||||
<div class="NB-feed-story-content">\
|
||||
<div class="NB-feed-story-content <% if (feed && feed.get("is_newsletter")) { %>NB-newsletter<% } %>">\
|
||||
<% if (!options.skip_content) { %>\
|
||||
<%= story.story_content() %>\
|
||||
<% } %>\
|
||||
|
|
|
@ -36,9 +36,12 @@
|
|||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyclass %}NB-body-main{% endblock %}
|
||||
{% block content %}
|
||||
{% block bodyclass %}
|
||||
NB-body-main
|
||||
{% if preferences.theme == "dark" %}NB-dark{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="NB-splash-heading">NewsBlur</h1>
|
||||
<h2 class="NB-splash-heading">- The best stories from your friends and favorite blogs, all in one place.</h2>
|
||||
|
|
Loading…
Add table
Reference in a new issue