2014-02-12 05:23:40 -05:00
extends ../layout
block content
2014-07-07 10:54:40 -04:00
.content.content-alt
.container.bonus
.row
.col-md-8.col-md-offset-2
.card
2014-07-21 11:41:22 -04:00
.container-fluid(ng-controller="BonusLinksController")
2014-07-07 10:54:40 -04:00
.row
.col-md-12
.page-header
2014-08-01 07:34:53 -04:00
h1 #{translate("help_us_spread_word")}.
2014-07-07 10:54:40 -04:00
.row
.col-md-10.col-md-offset-1
2014-08-01 07:34:53 -04:00
h2 #{translate("share_sl_to_get_rewards")}
2014-07-07 10:54:40 -04:00
.row
.col-md-8.col-md-offset-2.bonus-banner
.bonus-top
.row
.col-md-8.col-md-offset-2.bonus-banner
.title
2018-10-30 06:01:59 -04:00
a(href='https://twitter.com/share?text='+encodeURIComponent(translate("bonus_twitter_share_text"))+'&url='+encodeURIComponent(buildReferalUrl("t"))+'&counturl='+settings.social.twitter.counturl, target="_blank").twitter
2021-03-24 06:07:30 -04:00
i.fa.fa-fw.fa-2x.fa-twitter(aria-hidden="true")
2018-10-30 06:01:59 -04:00
|
| Tweet
2020-01-21 04:38:08 -05:00
2014-07-07 10:54:40 -04:00
.row
.col-md-8.col-md-offset-2.bonus-banner
.title
2018-10-30 06:01:59 -04:00
a(href='#', onclick='postToFeed(); return false;').facebook
2021-03-24 06:07:30 -04:00
i.fa.fa-fw.fa-2x.fa-facebook-square(aria-hidden="true")
2018-10-30 06:01:59 -04:00
|
| #{translate("post_on_facebook")}
2014-07-07 10:54:40 -04:00
.row
.col-md-8.col-md-offset-2.bonus-banner
.title
2018-10-30 06:01:59 -04:00
a(href='mailto:?subject='+encodeURIComponent(translate("bonus_email_share_header"))+'&body='+encodeURIComponent(translate("bonus_email_share_body")+' ')+encodeURIComponent(buildReferalUrl("e")), title='Share by Email').email
2021-03-24 06:07:30 -04:00
i.fa.fa-fw.fa-2x.fa-envelope-open-o(aria-hidden="true")
2018-10-30 06:01:59 -04:00
|
| #{translate("email_us_to_your_friends")}
2014-07-07 10:54:40 -04:00
.row
.col-md-8.col-md-offset-2.bonus-banner
.title
2018-10-30 06:01:59 -04:00
a(href='#link-modal', data-toggle="modal", ng-click="openLinkToUsModal()").link
2021-03-24 06:07:30 -04:00
i.fa.fa-fw.fa-2x.fa-globe(aria-hidden="true")
2018-10-30 06:01:59 -04:00
|
| #{translate("link_to_us")}
2014-07-07 10:54:40 -04:00
.row
.col-md-10.col-md-offset-1.bonus-banner
2014-08-01 07:34:53 -04:00
h2.direct-link #{translate("direct_link")}
2014-07-07 10:54:40 -04:00
pre.text-centered #{buildReferalUrl("d")}
.row.ab-bonus
.col-md-10.col-md-offset-1.bonus-banner
2014-08-20 03:14:36 -04:00
p.thanks !{translate("sl_gives_you_free_stuff_see_progress_below")}
2014-07-07 10:54:40 -04:00
.row.ab-bonus
.col-md-10.col-md-offset-1.bonus-banner(style="position: relative; height: 30px; margin-top: 20px;")
- for (var i = 0; i <= 10; i++) {
2021-03-24 06:09:43 -04:00
if (refered_user_count == i)
2017-01-31 09:57:22 -05:00
.number(style="left: "+i+"0%").active #{i}
2021-03-24 06:09:43 -04:00
else
2017-01-31 09:57:22 -05:00
.number(style="left: "+i+"0%") #{i}
2014-07-07 10:54:40 -04:00
- }
.row.ab-bonus
.col-md-10.col-md-offset-1.bonus-banner
.progress
2021-03-24 06:09:43 -04:00
if (refered_user_count == 0)
2014-08-01 07:34:53 -04:00
div(style="text-align: center; padding: 4px;") #{translate("spread_the_word_and_fill_bar")}
2017-01-31 09:57:22 -05:00
.progress-bar.progress-bar-info(style="width: "+refered_user_count+"0%")
2014-07-07 10:54:40 -04:00
.row.ab-bonus
2020-01-21 04:38:08 -05:00
.col-md-10.col-md-offset-1.bonus-banner(style="position: relative; height: 110px;")
2014-08-01 07:34:53 -04:00
.perk(style="left: 10%;", class = refered_user_count >= 1 ? "active" : "") #{translate("one_free_collab")}
.perk(style="left: 30%;", class = refered_user_count >= 3 ? "active" : "") #{translate("three_free_collab")}
2014-11-13 10:23:13 -05:00
.perk(style="left: 60%;", class = refered_user_count >= 6 ? "active" : "") #{translate("free_dropbox_and_history")} + #{translate("three_free_collab")}
.perk(style="left: 90%;", class = refered_user_count >= 9 ? "active" : "") #{translate("free_dropbox_and_history")} + #{translate("unlimited_collabs")}
.row
2014-07-07 10:54:40 -04:00
.row.ab-bonus
2020-07-27 05:01:31 -04:00
.col-md-10.col-md-offset-1.bonus-banner.bonus-status
2021-03-24 06:09:43 -04:00
if (refered_user_count == 0)
2014-08-13 10:44:30 -04:00
p.thanks !{translate("you_not_introed_anyone_to_sl")}
2021-03-24 06:09:43 -04:00
else if (refered_user_count == 1)
2020-10-30 08:33:35 -04:00
p.thanks !{translate("you_introed_small_number", {numberOfPeople: refered_user_count}, ['strong'])}
2021-03-24 06:09:43 -04:00
else
2020-10-30 08:33:35 -04:00
p.thanks !{translate("you_introed_high_number", {numberOfPeople: refered_user_count}, ['strong'])}
2020-01-21 04:38:08 -05:00
2014-07-21 11:41:22 -04:00
script(type="text/ng-template", id="BonusLinkToUsModal")
2014-07-07 10:54:40 -04:00
.modal-header
2014-07-21 11:41:22 -04:00
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
2020-01-27 08:53:27 -05:00
aria-label="Close"
)
span(aria-hidden="true") ×
2014-08-01 07:34:53 -04:00
h3 #{translate("link_to_sl")}
2014-07-21 11:41:22 -04:00
.modal-body.modal-body-share.link-modal
2014-08-01 07:34:53 -04:00
p #{translate("can_link_to_sl_with_html")}
2014-07-07 10:54:40 -04:00
p
2014-07-21 11:41:22 -04:00
textarea.col-md-12(readonly=true)
2018-10-30 06:01:59 -04:00
<a href="#{buildReferalUrl("d")}">#{translate("bonus_share_link_text")}</a>
2014-07-21 11:41:22 -04:00
2014-08-01 07:34:53 -04:00
p #{translate("thanks")}!
2014-07-21 11:41:22 -04:00
.modal-footer()
button.btn.btn-default(
ng-click="cancel()",
)
2014-08-01 07:34:53 -04:00
span #{translate("close")}
2014-07-21 11:41:22 -04:00
2019-12-16 10:02:29 -05:00
block append foot-scripts
2021-03-25 10:02:21 -04:00
script(type="text/javascript", nonce=scriptNonce).
2019-12-16 10:02:29 -05:00
$(document).ready(function () {
$.ajax({dataType: "script", cache: true, url: "//connect.facebook.net/en_US/all.js"}).done(function () {
window.fbAsyncInit = function() {
FB.init({appId: '#{settings.social.facebook.appId}', xfbml: true});
}
});
});
2014-07-21 11:41:22 -04:00
2019-12-16 10:02:29 -05:00
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
redirect_uri: '#{settings.social.facebook.redirectUri}',
link: '!{buildReferalUrl("fb")}',
picture: '#{settings.social.facebook.picture}',
name: '#{translate("bonus_facebook_name").replace(/\'/g, "\\x27")}',
caption: '#{translate("bonus_facebook_caption").replace(/\'/g, "\\x27")}',
description: '#{translate("bonus_facebook_description").replace(/\'/g, "\\x27")}'
};
2014-07-21 11:41:22 -04:00
2019-12-16 10:02:29 -05:00
if (typeof FB !== "undefined" && FB !== null) {
FB.ui(obj);
}
}
2014-02-12 05:23:40 -05:00
2021-03-25 10:02:21 -04:00
script(type="text/javascript", nonce=scriptNonce, src='//platform.twitter.com/widgets.js')
2014-02-12 05:23:40 -05:00
2021-03-25 10:02:21 -04:00
script(type="text/javascript", nonce=scriptNonce).
2014-02-12 05:23:40 -05:00
$(function() {
$(".twitter").click(function() {
2014-03-08 13:31:07 -05:00
ga('send', 'event', 'referal-button', 'clicked', "twitter")
2014-02-12 05:23:40 -05:00
});
$(".email").click(function() {
2014-03-08 13:31:07 -05:00
ga('send', 'event', 'referal-button', 'clicked', "email")
2014-02-12 05:23:40 -05:00
});
$(".facebook").click(function() {
2014-03-08 13:31:07 -05:00
ga('send', 'event', 'referal-button', 'clicked', "facebook")
2014-02-12 05:23:40 -05:00
});
$(".link").click(function() {
2014-03-08 13:31:07 -05:00
ga('send', 'event', 'referal-button', 'clicked', "direct-link")
2014-02-12 05:23:40 -05:00
});
});