mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding pleasure border to blurblog posts.
This commit is contained in:
parent
8897836021
commit
edb43558b8
3 changed files with 118 additions and 103 deletions
|
@ -244,13 +244,11 @@ def load_feeds(request):
|
|||
def load_feed_favicons(request):
|
||||
user = get_user(request)
|
||||
feed_ids = request.REQUEST.getlist('feed_ids')
|
||||
user_subs = UserSubscription.objects.select_related('feed').filter(user=user, active=True)
|
||||
|
||||
# Removed these lines because they check if the user is subscribed to the feed.
|
||||
# if feed_ids and len(feed_ids) > 0:
|
||||
# user_subs = user_subs.filter(feed__in=feed_ids)
|
||||
if not feed_ids:
|
||||
user_subs = UserSubscription.objects.select_related('feed').filter(user=user, active=True)
|
||||
feed_ids = [sub['feed__pk'] for sub in user_subs.values('feed__pk')]
|
||||
|
||||
feed_ids = [sub['feed__pk'] for sub in user_subs.values('feed__pk')]
|
||||
feed_icons = dict([(i.feed_id, i.data) for i in MFeedIcon.objects(feed_id__in=feed_ids)])
|
||||
|
||||
return feed_icons
|
||||
|
|
|
@ -160,8 +160,8 @@ header {
|
|||
.NB-mark {
|
||||
margin: 0 auto 36px;
|
||||
max-width: 800px;
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 4px;
|
||||
border-top-left-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,13 @@ header {
|
|||
#E9EAEF 10%,
|
||||
#F5F8FA 84%
|
||||
);
|
||||
border-top: 1px solid #C0C0C0;
|
||||
}
|
||||
|
||||
.NB-story-header-wrapper {
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
border-right: 1px solid #909090;
|
||||
border-left: 1px solid #909090;
|
||||
}
|
||||
|
||||
@media all and (max-width: 800px) {
|
||||
|
@ -336,50 +342,59 @@ header {
|
|||
}
|
||||
|
||||
.NB-story {
|
||||
margin: 0 28px;
|
||||
padding: 12px 200px 24px 0;
|
||||
background-color: #FAFAFA;
|
||||
padding: 0 28px;
|
||||
max-width: 800px;
|
||||
border-right: 1px solid #909090;
|
||||
border-bottom: 1px solid #909090;
|
||||
border-left: 1px solid #909090;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.NB-story-content {
|
||||
padding: 12px 200px 24px 0;
|
||||
}
|
||||
@media all and (max-width: 800px) {
|
||||
.NB-story {
|
||||
.NB-story-content {
|
||||
padding-right: 100px;
|
||||
}
|
||||
}
|
||||
@media all and (max-width: 700px) {
|
||||
.NB-story {
|
||||
.NB-story-content {
|
||||
padding-right: 50px;
|
||||
}
|
||||
}
|
||||
@media all and (max-width: 600px) {
|
||||
.NB-story {
|
||||
.NB-story-content {
|
||||
padding-right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.NB-story a {
|
||||
.NB-story-content a {
|
||||
color: #1F4499;
|
||||
}
|
||||
|
||||
.NB-story a:hover {
|
||||
.NB-story-content a:hover {
|
||||
color: #99481D;
|
||||
}
|
||||
|
||||
.NB-story img {
|
||||
.NB-story-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.NB-story ins {
|
||||
.NB-story-content ins {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
.NB-story del {
|
||||
.NB-story-content del {
|
||||
display: none;
|
||||
}
|
||||
.NB-pref-show-changes .NB-story ins {
|
||||
.NB-pref-show-changes .NB-story-content ins {
|
||||
text-decoration: underline;
|
||||
color: #27452D;
|
||||
}
|
||||
.NB-pref-show-changes .NB-story del {
|
||||
.NB-pref-show-changes .NB-story-content del {
|
||||
display: block;
|
||||
color: #661616;
|
||||
}
|
||||
|
@ -398,7 +413,7 @@ header {
|
|||
border: none;
|
||||
}
|
||||
.NB-story-comments {
|
||||
margin: 0 28px 32px 28px;
|
||||
margin: 0 0 32px 0;
|
||||
padding: 1px 0 0;
|
||||
max-width: 800px;
|
||||
border-top: 2px solid #353535;
|
||||
|
|
|
@ -75,107 +75,109 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="NB-story-header">
|
||||
{% if story.story_authors %}
|
||||
<div class="NB-story-author">{{ story.story_authors }}</div>
|
||||
{% endif %}
|
||||
{% if story.story_tags %}
|
||||
<div class="NB-story-tags">
|
||||
{% for story_tag in story.story_tags %}
|
||||
<div class="NB-story-tag">{{ story_tag }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<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>
|
||||
<div class="NB-story-header-wrapper">
|
||||
<div class="NB-story-header">
|
||||
{% if story.story_authors %}
|
||||
<div class="NB-story-author">{{ story.story_authors }}</div>
|
||||
{% endif %}
|
||||
{% if story.story_tags %}
|
||||
<div class="NB-story-tags">
|
||||
{% for story_tag in story.story_tags %}
|
||||
<div class="NB-story-tag">{{ story_tag }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<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:"l, F j<\s\u\p>S</\s\u\p>, Y <\s\m\a\l\l>\a\t</\s\m\a\l\l> g:i A"|safe }}
|
||||
{{ story.shared_date|date:"l, F j<\s\u\p>S</\s\u\p>, Y <\s\m\a\l\l>\a\t</\s\m\a\l\l> g:i A"|safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="NB-story">
|
||||
<div class="NB-story-content">{{ story.story_content|safe }}</div>
|
||||
</div>
|
||||
|
||||
{% if story.share_count %}
|
||||
<div class="NB-story-comments">
|
||||
<div class="NB-story-comments-shares-teaser-wrapper">
|
||||
<div class="NB-story-comments-shares-teaser">
|
||||
{% if story.share_count %}
|
||||
<div class="NB-right">
|
||||
Shared by
|
||||
<b>{{ story.share_count }}</b>
|
||||
{{ story.share_count|pluralize:"person, people" }}
|
||||
</div>
|
||||
{% if story.share_count_public %}
|
||||
<div class="NB-story-share-profiles NB-story-share-profiles-public">
|
||||
{% for share_user in story.shared_by_public %}
|
||||
<a href="{{ share_user.feed_link }}" class="NB-user-avatar" title="{{ share_user.username }}">
|
||||
<img src="{{ share_user.photo_url }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if story.share_count %}
|
||||
<div class="NB-story-comments">
|
||||
<div class="NB-story-comments-shares-teaser-wrapper">
|
||||
<div class="NB-story-comments-shares-teaser">
|
||||
{% if story.share_count %}
|
||||
<div class="NB-right">
|
||||
Shared by
|
||||
<b>{{ story.share_count }}</b>
|
||||
{{ story.share_count|pluralize:"person, people" }}
|
||||
</div>
|
||||
{% if story.share_count_public %}
|
||||
<div class="NB-story-share-profiles NB-story-share-profiles-public">
|
||||
{% for share_user in story.shared_by_public %}
|
||||
<a href="{{ share_user.feed_link }}" class="NB-user-avatar" title="{{ share_user.username }}">
|
||||
<img src="{{ share_user.photo_url }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if story.share_count %}
|
||||
{% if story.share_count_friends %}
|
||||
<div class="NB-story-share-label">Shared by: </div>
|
||||
<div class="NB-story-share-profiles NB-story-share-profiles-friends">
|
||||
{% for share_user in story.shared_by_friends %}
|
||||
<a href="{{ share_user.feed_link }}" class="NB-user-avatar" title="{{ share_user.username }}">
|
||||
<img src="{{ share_user.photo_url }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if story.share_count %}
|
||||
{% if story.share_count_friends %}
|
||||
<div class="NB-story-share-label">Shared by: </div>
|
||||
<div class="NB-story-share-profiles NB-story-share-profiles-friends">
|
||||
{% for share_user in story.shared_by_friends %}
|
||||
<a href="{{ share_user.feed_link }}" class="NB-user-avatar" title="{{ share_user.username }}">
|
||||
<img src="{{ share_user.photo_url }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% for comment in story.comments %}
|
||||
<div class="NB-story-comment">
|
||||
<a href="{{ comment.user.feed_link }}" class="NB-user-avatar {% if comment.source_user_id %}NB-story-comment-reshare{% endif %}">
|
||||
<img src="{{ comment.user.photo_url }}">
|
||||
</a>
|
||||
<div class="NB-story-comment-author-container">
|
||||
{% if comment.source_user_id %}
|
||||
<div class="NB-story-comment-reshares">
|
||||
<a href="{{ comment.source_user.feed_link }}" class="NB-user-avatar" title="{{ comment.source_user.username }}">
|
||||
<img src="{{ comment.source_user.photo_url }}">
|
||||
{% for comment in story.comments %}
|
||||
<div class="NB-story-comment">
|
||||
<a href="{{ comment.user.feed_link }}" class="NB-user-avatar {% if comment.source_user_id %}NB-story-comment-reshare{% endif %}">
|
||||
<img src="{{ comment.user.photo_url }}">
|
||||
</a>
|
||||
<div class="NB-story-comment-author-container">
|
||||
{% if comment.source_user_id %}
|
||||
<div class="NB-story-comment-reshares">
|
||||
<a href="{{ comment.source_user.feed_link }}" class="NB-user-avatar" title="{{ comment.source_user.username }}">
|
||||
<img src="{{ comment.source_user.photo_url }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ comment.user.feed_link }}" class="NB-story-comment-username">{{ comment.user.username }}</a>
|
||||
<div class="NB-story-comment-date">{{ comment.shared_date }} ago</div>
|
||||
<div class="NB-story-comment-reply-button">
|
||||
<div class="NB-story-comment-reply-button-wrapper">reply</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="NB-story-comment-content">
|
||||
{{ comment.comments }}
|
||||
</div>
|
||||
{% if comment.replies %}
|
||||
<div class="NB-story-comment-replies">
|
||||
{% for reply in comment.replies %}
|
||||
<div class="NB-story-comment-reply">
|
||||
<a href="{{ reply.user.feed_link }}">
|
||||
<img class="NB-user-avatar NB-story-comment-reply-photo" src="{{ reply.user.photo_url }}" />
|
||||
</a>
|
||||
<a href="{{ reply.user.feed_link }}" class="NB-story-comment-username NB-story-comment-reply-username">{{ reply.user.username }}</a>
|
||||
<div class="NB-story-comment-date NB-story-comment-reply-date">{{ reply.publish_date }} ago</div>
|
||||
<div class="NB-story-comment-reply-content">{{ reply.comments }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ comment.user.feed_link }}" class="NB-story-comment-username">{{ comment.user.username }}</a>
|
||||
<div class="NB-story-comment-date">{{ comment.shared_date }} ago</div>
|
||||
<div class="NB-story-comment-reply-button">
|
||||
<div class="NB-story-comment-reply-button-wrapper">reply</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="NB-story-comment-content">
|
||||
{{ comment.comments }}
|
||||
</div>
|
||||
{% if comment.replies %}
|
||||
<div class="NB-story-comment-replies">
|
||||
{% for reply in comment.replies %}
|
||||
<div class="NB-story-comment-reply">
|
||||
<a href="{{ reply.user.feed_link }}">
|
||||
<img class="NB-user-avatar NB-story-comment-reply-photo" src="{{ reply.user.photo_url }}" />
|
||||
</a>
|
||||
<a href="{{ reply.user.feed_link }}" class="NB-story-comment-username NB-story-comment-reply-username">{{ reply.user.username }}</a>
|
||||
<div class="NB-story-comment-date NB-story-comment-reply-date">{{ reply.publish_date }} ago</div>
|
||||
<div class="NB-story-comment-reply-content">{{ reply.comments }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue