Adding logo to Original blurblogs.

This commit is contained in:
Samuel Clay 2012-05-02 19:00:17 -07:00
parent 86b6788cc2
commit 1d580554a5
5 changed files with 87 additions and 41 deletions

View file

@ -496,7 +496,8 @@ def shared_stories_rss_feed(request, user_id, username):
raise Http404
if user.username != username:
params = {'username': user.username, 'user_id': user.pk}
profile = MSocialProfile.objects.get(user_id=user.pk)
params = {'username': profile.username_slug, 'user_id': user.pk}
return HttpResponseRedirect(reverse('shared-stories-rss-feed', kwargs=params))
social_profile = MSocialProfile.objects.get(user_id=user_id)

14
fabfile.py vendored
View file

@ -31,11 +31,14 @@ env.VENDOR_PATH = "~/projects/code"
env.user = 'sclay'
env.roledefs ={
'local': ['localhost'],
'app': ['app01.newsblur.com',
'app02.newsblur.com'],
'dev': ['dev.newsblur.com'],
'web': ['www.newsblur.com',
'app02.newsblur.com'],
'dev': ['dev.newsblur.com'],
'app': ['app01.newsblur.com',
'app02.newsblur.com',
'app03.newsblur.com'],
'db': ['db01.newsblur.com',
'db02.newsblur.com',
'db03.newsblur.com',
@ -119,7 +122,10 @@ def deploy_node():
with cd(env.NEWSBLUR_PATH):
run('sudo supervisorctl restart node_unread')
run('sudo supervisorctl restart node_favicons')
def gunicorn_restart():
restart_gunicorn()
def restart_gunicorn():
with cd(env.NEWSBLUR_PATH):
with settings(warn_only=True):

View file

@ -21,10 +21,11 @@ header {
}
.NB-title-photo {
float: left;
margin: 24px 12px 0 14px;
margin: 36px 12px 0 14px;
z-index: 1;
position: relative;
position: absolute;
top: 0;
left: 0;
}
.NB-title-photo img {
max-width: 48px;
@ -59,8 +60,7 @@ header {
z-index: 0;
}
.NB-title-content {
float: left;
padding: 24px 14px 24px 0;
padding: 36px 14px 24px 74px;
z-index: 1;
position: relative;
}
@ -68,6 +68,7 @@ header {
font-size: 24px;
line-height: 24px;
float: left;
margin-right: 16px;
}
.NB-title.NB-title-no-bio .NB-title-name {
line-height: 48px;
@ -81,14 +82,14 @@ header {
font-size: 12px;
display: block;
padding: 2px 8px 1px;
margin: 4px 0 0 16px;
margin: 4px 16px 0 0;
text-transform: uppercase;
}
.NB-title.NB-title-no-bio .NB-title-location {
margin-top: 14px;
}
.NB-title .NB-title-bio {
clear: both;
clear: left;
color: #909090;
font-size: 18px;
line-height: 18px;
@ -97,6 +98,36 @@ header {
.NB-title.NB-title-no-bio .NB-title-bio {
padding: 0;
}
.NB-title .NB-title-logo {
float: right;
z-index: 1;
position: relative;
width: 92px;
height: 92px;
margin: 12px;
}
.NB-title .NB-title-logo img {
position: absolute;
width: 92px;
height: 92px;
right: 0;
top: 0;
border: none;
opacity: .4;
}
.NB-title .NB-title-logo .NB-hover-on {
opacity: 0;
-webkit-transition: all .22s ease-out;
-moz-transition: all .22s ease-out;
-o-transition: all .22s ease-out;
-ms-transition: all .22s ease-out;
}
.NB-title .NB-title-logo:hover .NB-hover-on {
opacity: 1;
}
.NB-title .NB-title-left {
overflow: hidden;
}
/* ===================== */
/* = Story Feed Header = */
/* ===================== */
@ -133,19 +164,21 @@ header {
.NB-feed a {
color: white;
text-decoration: none;
text-shadow: 1px 1px 0 black;
text-shadow: 0 1px 0 #202020;
}
.NB-feed.NB-feed-black a {
color: black;
text-shadow: 1px 1px 0 white;
text-shadow: 0 1px 0 #F0F0F0;
}
.NB-feed a:hover {
color: #C8DFFF;
color: #274C63;
text-shadow: 0 1px 0 #F0F0F0;
}
.NB-feed.NB-feed-black a:hover {
color: #1E2655;
color: #274C63;
text-shadow: 0 1px 0 #E0E0E0;
}
/* ================ */

View file

@ -3,7 +3,7 @@
<head>
<title>{{ social_profile.feed_title }}</title>
<link rel="alternate" type="application/rss+xml" href="{% url shared-stories-rss-feed user.pk user.username %}" title="{{ social_profile.feed_title }} RSS feed">
<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 }}">
<link rel="stylesheet" href="{{ MEDIA_URL }}css/social/social_page.css" type="text/css" media="screen" title="no title" charset="utf-8">
{% if social_profile.custom_css %}
@ -17,32 +17,38 @@
<header class="NB-header">
<h1 class="NB-title {% if not social_profile.bio %}NB-title-no-bio{% endif %}">
<a href="{% url index %}social/{{ social_profile.user_id }}/{{ social_profile.username|slugify }}" class="NB-title-logo">
<img src="{{ MEDIA_URL }}img/logo_128.png" class="NB-hover-off" />
<img src="{{ MEDIA_URL }}img/logo_newsblur_512.png" class="NB-hover-on" />
</a>
<div class="NB-title-background"></div>
<div class="NB-title-photo">
{% if social_profile.photo_url %}
<img src="{{ social_profile.photo_url }}" />
{% else %}
<img src="{{ MEDIA_URL }}img/reader/default_profile_photo.png" />
{% endif %}
</div>
<div class="NB-title-content">
<div class="NB-title-name">
{{ social_profile.feed_title }}
<div class="NB-title-left">
<div class="NB-title-photo">
{% if social_profile.photo_url %}
<img src="{{ social_profile.photo_url }}" />
{% else %}
<img src="{{ MEDIA_URL }}img/reader/default_profile_photo.png" />
{% endif %}
</div>
{% if social_profile.location %}
<div class="NB-title-location">
{{ social_profile.location }}
<div class="NB-title-content">
<div class="NB-title-name">
{{ social_profile.feed_title }}
</div>
{% endif %}
{% if social_profile.bio %}
<div class="NB-title-bio">
{{ social_profile.bio }}
</div>
{% endif %}
{% if social_profile.location %}
<div class="NB-title-location">
{{ social_profile.location }}
</div>
{% endif %}
{% if social_profile.bio %}
<div class="NB-title-bio">
{{ social_profile.bio }}
</div>
{% endif %}
</div>
</div>
</h1>
<div class="NB-header-feed">
{# <a type="application/rss+xml" href="{% url shared-stories-rss-feed user.pk user.username %}">RSS feed for this page</a> #}
{# <a type="application/rss+xml" href="{% url shared-stories-rss-feed social_profile.user_id social_profile.username|slugify %}">RSS feed for this page</a> #}
</div>
</header>

View file

@ -8,10 +8,10 @@ urlpatterns = patterns('',
(r'^reader/', include('apps.reader.urls')),
(r'^add/?', reader_views.index),
(r'^try/?', reader_views.index),
(r'^site/.*?', reader_views.index),
(r'^social/\d+/.*?', reader_views.index),
(r'^user/.*?', reader_views.index),
(r'^null/.*?', reader_views.index),
(r'^site/.*?', reader_views.index),
(r'^social/\d+/.*?', reader_views.index),
(r'^user/.*?', reader_views.index),
(r'^null/.*?', reader_views.index),
(r'^rss_feeds/', include('apps.rss_feeds.urls')),
(r'^classifier/', include('apps.analyzer.urls')),
(r'^profile/', include('apps.profile.urls')),