mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding a signup callout for unauthenticated user to compel them to signup.
This commit is contained in:
parent
4b3e9379f3
commit
a9f2bd5db6
3 changed files with 58 additions and 0 deletions
|
@ -174,6 +174,15 @@ a img {
|
|||
bottom: 51px;
|
||||
}
|
||||
|
||||
.NB-callout-ftux-signup {
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.NB-callout-ftux-signup .NB-callout-container .NB-callout-arrow {
|
||||
left: auto;
|
||||
right: -1px;
|
||||
}
|
||||
|
||||
/* ================ */
|
||||
/* = Content Pane = */
|
||||
/* ================ */
|
||||
|
@ -1036,6 +1045,11 @@ background: transparent;
|
|||
cursor: pointer;
|
||||
background: transparent url('../img/icons/silk/arrow_down.png') no-repeat center center;
|
||||
}
|
||||
.NB-taskbar .task_button.task_button_signup {
|
||||
cursor: pointer;
|
||||
background: transparent url('../img/icons/media-devices/imac.png') no-repeat center center;
|
||||
}
|
||||
|
||||
.NB-taskbar .task_button_view.NB-active {
|
||||
background-color: #A0A7B1;
|
||||
}
|
||||
|
|
|
@ -228,6 +228,10 @@
|
|||
$('.right-pane').show();
|
||||
$('#NB-splash').hide();
|
||||
$('#NB-splash-overlay').hide();
|
||||
|
||||
if (PROTOPUB.Globals.is_anonymous) {
|
||||
this.setup_ftux_signup_callout();
|
||||
}
|
||||
},
|
||||
|
||||
show_splash_page: function() {
|
||||
|
@ -1763,6 +1767,10 @@
|
|||
e.preventDefault();
|
||||
self.show_previous_story();
|
||||
});
|
||||
$.targetIs(e, { tagSelector: '.task_button_signup' }, function($t, $p){
|
||||
e.preventDefault();
|
||||
self.show_splash_page();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
@ -2240,6 +2248,30 @@
|
|||
.animate({'bottom': '-=2px'}, {'duration': 200, 'easing': 'easeInOutQuint'});
|
||||
}, 1000);
|
||||
});
|
||||
},
|
||||
|
||||
setup_ftux_signup_callout: function() {
|
||||
var self = this;
|
||||
|
||||
$('.NB-callout-ftux-signup .NB-callout-text').text('Signup');
|
||||
$('.NB-callout-ftux-signup').corner('5px');
|
||||
$('.NB-callout-ftux-signup').css({
|
||||
'opacity': 0,
|
||||
'display': 'block'
|
||||
}).animate({
|
||||
'opacity': 1,
|
||||
'bottom': 36
|
||||
}, {
|
||||
'duration': 750,
|
||||
'easing': 'easeInOutQuint'
|
||||
}).each(function() {
|
||||
var $this = $(this);
|
||||
self.flags['bouncing_callout'] = setInterval(function() {
|
||||
$this.animate({'bottom': '+=2px'}, {'duration': 200, 'easing': 'easeInOutQuint'})
|
||||
.animate({'bottom': '+=0px'}, {'duration': 50})
|
||||
.animate({'bottom': '-=2px'}, {'duration': 200, 'easing': 'easeInOutQuint'});
|
||||
}, 10000);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -143,9 +143,21 @@
|
|||
<span class="NB-task-title">Next Unread</span>
|
||||
</li>
|
||||
<li class="task_button task_button_story task_story_next"></li>
|
||||
{% if not user.is_authenticated %}
|
||||
<li class="task_button task_button_signup"></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
{% if not user.is_authenticated %}
|
||||
<div class="NB-callout-ftux-signup NB-callout">
|
||||
<div class="NB-callout-container">
|
||||
<div class="NB-callout-text"></div>
|
||||
<div class="NB-callout-arrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="story_pane" class="content-center">
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue