Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
10 kB
1
Indexable
Never
{% capture output %}

  

  {% capture referralTiers %}
    
      Behind-The-Scenes Access | 3 | Every 2-weeks, I send out an exclusive newsletter that details what I've been experimenting with, what's worked, what has failed horribly, and all the gory details, numbers, and figures that you'll hopefully find helpful.
      
      ***
      
      $100 Off Mastering ConvertKit | 10 | Get 10% off ($100) of my flagship course, Mastering ConvertKit, after you've shared this newsletter with 10 others. A single tweet or Facebook post might just do it!
      
      ***
      
      Free Strategy Session | 25 | You + me + an hour spent on Zoom talking about your email marketing = exactly what you need to upgrade your business. Have you thought about sharing a link to the Create & Sell in your weekly newsletter?
      
      ***
      
      Free copy of Mastering ConvertKit | 100 | Once you hit 100 referrals, you'll get a free copy of the self-study tier of Mastering ConvertKit. (Retails for $1,000)
      
  {% endcapture %}
  {% assign referralCtaLabel = "Share Create & Sell" %}
  {% if article_url %}
    {% assign referralCtaLabel = "Share This Email" %}
  {% endif %}

  {% assign totalRefs = testTotalRef | default: subscriber.rh_totref | plus: 0 %}
  {% assign currentTier = -1 %}
  {% assign refsToGo = "" %}
  {% assign tierProgress = "" %}
  {% assign previousTierQuota = 0 %}
  {% assign difference = "" %}
  {% assign nextTierName = "" %}
  {% assign nextTierDescription = "" %}

  {% assign allTiers = referralTiers | split: '***' %}
  {% for tier in allTiers %}
    {% assign tierInfo = tier | split: '|' %}
    {% assign tierName = tierInfo[0] | strip %}
    {% assign tierQuota = tierInfo[1] | strip | plus: 0 %}
    {% assign tierDescription = tierInfo[2] | strip %}
    {% assign currentTier = currentTier | plus: 1 %}

    {% if totalRefs < tierQuota %}
      {% assign nextTierName = tierName %}
      {% assign nextTierDescription = tierDescription %}
      {% assign refsToGo = tierQuota | minus: totalRefs %}
      {% assign tierProgress = totalRefs | minus: previousTierQuota | times: 1.0 %}
      {% assign difference = tierQuota | minus: previousTierQuota %}
      {% break %}
    {% endif %}

    {% assign previousTierQuota = tierQuota %}

  {% endfor %}

  {% assign percentage = tierProgress | divided_by: difference | times: 100.0 %}
  {% if percentage < 20 %}
    {% assign percentage = 20 %}
  {% endif %}

  {% unless nextTierName == blank %}
  <div class="my-60" style="margin-top: 60px; margin-bottom: 60px;">
    <div class="w-full p-5 bg-backsplash rounded-2xl" style="width: 100%; border-radius: 16px; background-color: #f9f8f4; padding: 5px;">
      <div class="py-6 pr-12 text-sm font-bold text-right uppercase text-referral-progressBarText bg-referral-progressBarBackground rounded-xl" style="width: {{ percentage }}%; border-radius: 12px; background-color: #993d4b; padding-top: 6px; padding-bottom: 6px; padding-right: 12px; text-align: right; font-size: 14px; font-weight: 700; text-transform: uppercase; color: #ffffff;">
        {{ tierProgress | floor }} of {{ difference | floor }}
      </div>
    </div>

    <div class="mt-20" style="margin-top: 20px;">
      <div class="w-4-5 mx-auto text-xl text-center font-headline" style="margin-left: auto; margin-right: auto; width: 80%; text-align: center; font-family: CeraPRO, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 20px;">
        You're just 
        <span class="font-bold" style="font-weight: 700;">{{ refsToGo }} {% if refsToGo == 1 %}referral{% else %}referrals{% endif %}</span> away from unlocking 
        <span class="font-bold" style="font-weight: 700;">{{ nextTierName }}</span>
      </div>
      <div class="flex mt-32 font-headline" style="margin-top: 32px; display: flex; font-family: CeraPRO, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;">
        <div class="w-3-5 pr-12" style="width: 60%; padding-right: 12px;">
          <div class="text-xs uppercase opacity-50 text-primary-lighter" style="font-size: 12px; text-transform: uppercase; color: #374151; opacity: 0.5;">Next Reward</div>
          <div class="mt-10 text-base font-medium text-primary" style="margin-top: 10px; font-size: 16px; font-weight: 500; color: #272343;">
            {{ nextTierName }}
          </div>
          <div class="mt-6 text-sm text-primary-lighter" style="margin-top: 6px; font-size: 14px; color: #374151;">
            {{ nextTierDescription }}
          </div>
        </div>
        <div class="w-2-5 pl-12" style="width: 40%; padding-left: 12px;">
          <div class="mb-10 text-xs uppercase opacity-50 text-primary-lighter" style="margin-bottom: 10px; font-size: 12px; text-transform: uppercase; color: #374151; opacity: 0.5;">{{ currentTier }} Unlocked Rewards</div>
          {% assign tierLoopIdx = 0 %}
          {% for tier in allTiers %}
            {% assign tierLoopIdx = tierLoopIdx | plus: 1 %}
            {% assign tierArr = tier | split: '|' %}
            {% assign curTierName = tierArr[0] | strip %}
            {% assign curTierQuota = tierArr[1] | strip | plus: 0 %}
            {% if tierLoopIdx <= currentTier %}
              <div class="my-12 text-sm font-bold text-primary-lighter" style="margin-top: 12px; margin-bottom: 12px; font-size: 14px; font-weight: 700; color: #374151;">
                {{ curTierName }}
              </div>
            {% else %}
              <div class="my-12 text-sm opacity-50 text-primary-lighter" style="margin-top: 12px; margin-bottom: 12px; font-size: 14px; color: #374151; opacity: 0.5;">
                {{ curTierName }} ({{ curTierQuota | minus: totalRefs }} referrals to go)
              </div>
            {% endif %}
          {% endfor %}
          <div class="mb-10 text-xs opacity-50 text-primary-lighter" style="margin-bottom: 10px; font-size: 12px; color: #374151; opacity: 0.5;">
            Total referrals: {{ totalRefs }} – <em>thanks!</em>
          </div>
        </div>
      </div>
      <div class="mt-24 text-center" style="margin-top: 24px; text-align: center;">
        {% if article_url %}
          <div class="mb-12 text-sm font-bold text-referral-progressBarBackground" style="margin-bottom: 12px; font-size: 14px; font-weight: 700; color: #993d4b;">
            Share and get rewarded:
          </div>
        {% endif %}
        <div>
          
            
              

                  {% assign socialUrl = "https://sparklp.co/" | append: subscriber.rh_code | append: "?utm_source=facebook" | url_encode %}
                  {% if article_url %}
                    {% assign socialUrl = article_url | append: "?rh_ref=" | append: subscriber.rh_code | append: "&utm_source=facebook" | url_encode %}
                  {% endif %}
                  {% assign fullSocialUrl = "https://www.facebook.com/sharer.php?u=" | append: socialUrl %}

                  <raw>
                  <a title="Share via facebook" target="_blank" href="{{ fullSocialUrl }}" class="bg-referral-buttonBackground" style="color: #3b82f6; display: inline-block; padding: 0px; margin-bottom: 10px; margin-right: 20px; width: 40px; height: 40px; border-radius: 5px; text-decoration: none; background-image: url('https://sparkloop-static-images.s3-us-west-1.amazonaws.com/facebook.png'); background-position: center center; background-repeat: no-repeat; background-size: auto 19px; background-color: #eebbc3;"></a>
                  </raw>

                
            
              

                  {% assign socialUrl = "https://sparklp.co/" | append: subscriber.rh_code | append: "?utm_source=twitter" | url_encode %}
                  {% if article_url %}
                    {% assign socialUrl = article_url | append: "?rh_ref=" | append: subscriber.rh_code | append: "&utm_source=twitter" | url_encode %}
                  {% endif %}
                  {% assign fullSocialUrl = "https://twitter.com/intent/tweet?text=" | append: socialUrl %}

                  <raw>
                  <a title="Share via twitter" target="_blank" href="{{ fullSocialUrl }}" class="bg-referral-buttonBackground" style="color: #3b82f6; display: inline-block; padding: 0px; margin-bottom: 10px; margin-right: 20px; width: 40px; height: 40px; border-radius: 5px; text-decoration: none; background-image: url('https://sparkloop-static-images.s3-us-west-1.amazonaws.com/twitter.png'); background-position: center center; background-repeat: no-repeat; background-size: auto 19px; background-color: #eebbc3;"></a>                  

                </raw>
            
              

                  {% assign socialUrl = "https://sparklp.co/" | append: subscriber.rh_code | append: "?utm_source=whatsapp" | url_encode %}
                  {% if article_url %}
                    {% assign socialUrl = article_url | append: "?rh_ref=" | append: subscriber.rh_code | append: "&utm_source=whatsapp" | url_encode %}
                  {% endif %}
                  {% assign fullSocialUrl = "https://api.whatsapp.com/send?text=" | append: socialUrl %}

                  <raw>
                  <a title="Share via whatsapp" target="_blank" href="{{ fullSocialUrl }}" class="bg-referral-buttonBackground" style="color: #3b82f6; display: inline-block; padding: 0px; margin-bottom: 10px; margin-right: 0px; width: 40px; height: 40px; border-radius: 5px; text-decoration: none; background-image: url('https://sparkloop-static-images.s3-us-west-1.amazonaws.com/whatsapp.png'); background-position: center center; background-repeat: no-repeat; background-size: auto 19px; background-color: #eebbc3;"></a>
                </raw>

                
            
          </div>
        <div class="mt-12 text-xs" style="margin-top: 12px; font-size: 12px;">
          {% assign socialUrl = "https://sparklp.co/" | append: subscriber.rh_code | append: "?utm_source=email" %}
          {% if article_url %}
            {% assign socialUrl = article_url | append: "?rh_ref=" | append: subscriber.rh_code | append: "&utm_source=email" %}
          {% endif %}

          <div><strong>Your shareable link:</strong></div>
          
          <a href="{{ socialUrl }}" style="color: #3b82f6;">
            {{ socialUrl }}
          </a>
          
        </div>
      </div>
    </div>
  </div>
  {% endunless %}
{% endcapture %}