Adding premium dashboard module.

This commit is contained in:
Samuel Clay 2016-01-31 13:29:37 -08:00
parent 4f1e922a8d
commit e96fb8b054
4 changed files with 54 additions and 4 deletions

View file

@ -6400,6 +6400,32 @@ form.opml_import_form input {
display: none;
}
/* ========================== */
/* = Premium Upgrade Module = */
/* ========================== */
.NB-account .NB-module-premium {
}
.NB-module-premium .NB-module-item-intro {
border: 1px solid #F7E7BC;
background-color: #FFFCF3;
padding: 12px;
overflow: hidden;
border-radius: 4px;
font-size: 14px;
text-align: center;
}
.NB-module-premium .NB-module-item .NB-modal-submit-button {
float: none;
}
.NB-module-premium .NB-module-premium-price {
font-size: 12px;
text-transform: uppercase;
margin: 12px 0 0;
color: #909090;
}
/* ================ */
/* = Stats Module = */
/* ================ */

View file

@ -5977,6 +5977,12 @@
self.open_intro_modal({page_number: 2});
}
});
$.targetIs(e, { tagSelector: '.NB-module-premium-button' }, function($t, $p){
e.preventDefault();
if (!$t.hasClass('NB-disabled')) {
self.open_feedchooser_modal({'premium_only': true});
}
});
$.targetIs(e, { tagSelector: '.NB-module-gettingstarted-hide' }, function($t, $p){
e.preventDefault();
if (!$t.hasClass('NB-disabled')) {

View file

@ -356,7 +356,7 @@ var classifier_prototype = {
$.make('h3', { className: 'NB-modal-subtitle' }, 'Here\'s what happens next:'),
$.make('ol', { className: 'NB-trainer-points' }, [
$.make('li', [
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL + '/img/reader/sample_classifier_tag.png', style: 'float: right', width: 135, height: 20 }),
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL + '/img/reader/sample_classifier_tag.png', style: 'float: right', width: 135 }),
$.make('b', 'You can change your opinions.'),
' You can click the ',
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL + '/img/reader/thumbs_up.png', style: 'vertical-align: middle;padding: 0 8px 0 2px', width: 14, height: 20 }),
@ -366,13 +366,13 @@ var classifier_prototype = {
$.make('li', [
$.make('img', { src: NEWSBLUR.Globals.MEDIA_URL + '/img/reader/intelligence_slider_positive.png', style: 'float: right', width: 114, height: 29 }),
$.make('b', 'As a reminder, use the intelligence slider to select a filter:'),
$.make('img', { className: 'NB-trainer-bullet', src: NEWSBLUR.Globals.MEDIA_URL + '/img/icons/silk/bullet_red.png'}),
$.make('img', { className: 'NB-trainer-bullet', src: NEWSBLUR.Globals.MEDIA_URL + '/img/icons/circular/g_icn_hidden.png'}),
' are stories you don\'t like',
$.make('br'),
$.make('img', { className: 'NB-trainer-bullet', src: NEWSBLUR.Globals.MEDIA_URL + '/img/icons/circular/g_icn_unread.png'}),
' are stories you have not yet rated',
$.make('br'),
$.make('img', { className: 'NB-trainer-bullet', src: NEWSBLUR.Globals.MEDIA_URL + '/img/icons/silk/bullet_green.png'}),
$.make('img', { className: 'NB-trainer-bullet', src: NEWSBLUR.Globals.MEDIA_URL + '/img/icons/circular/g_icn_focus.png'}),
' are stories you like'
]),

View file

@ -31,4 +31,22 @@
</div>
</div>
</div>
</div>
</div>
{% if not user_profile.is_premium %}
<div class="NB-module NB-module-premium">
<h5 class="NB-module-header">
Please Upgrade
</h5>
<div class="NB-module-item NB-module-item-intro">
<p>NewsBlur is a paid service and relies on premium subscribers.</p>
<p><b>Please upgrade your account to premium.</b></p>
<div class="NB-modal-submit-green NB-modal-submit-button NB-module-premium-button NB-javascript">Upgrade</div>
<p class="NB-module-premium-price">Only $24/year</p>
</div>
</div>
{% endif %}