<style>
  body { background: white }
</style>

<div class="center">
  <%= image_tag 'logos/both-small.png', class: 'center' %>
</div>

<h1 style="font-size: 2em">Notebook.ai + SaS Con</h1>
<p>
  We're extremely excited to be sponsoring the virtual SaS Con for the second year in a row! This free two-day event is packed full of talks and events for writers, artists, and worldbuilders.
</p>
<p>
  To show our support, we're offering two free months of Premium on Notebook.ai to every attendee!
</p>

<blockquote class="card-panel">
  "I built Notebook.ai because I want to see powerful writing tools in the hands of more people. I'm excited to include 2 months of free Premium for the dreamers and creators that attend SaS Con."
  <br /><strong>- Andrew Brown, Notebook.ai creator</strong>
</blockquote>

<div class="center">
  <%= link_to 'Event schedule', 'https://www.sascon.online/panel-schedule', class: 'btn btn-large blue-text white' %>
</div>

<div style="font-size: 1.5em; padding-top: 100px; font-weight: bold" id="how-to-redeem">Redeeming your Notebook.ai Premium</div>
<div class="row">
  <div class="col s12 m6 l5">
    <p>
      Hurrah! First off: thank you for supporting not only Notebook.ai, but all of the amazing creators at SaS Con 2021. I really hope you enjoy Notebook.ai and and that it helps you build the amazing worlds and novels you dream of!
    </p>
    <p>
      That said, redeeming your Premium here on Notebook.ai is super simple.
    </p>
  </div>
  <div class="col s12 m6 l6 offset-l1">
    <div style="font-size: 1.3em;">Step 1: Create an account</div>
    <p>
      If you already have an account on Notebook.ai, you can skip this step &mdash; just log into your existing account.
      If you don't have an account, it takes about 30 seconds to create one.
    </p>
    <% if user_signed_in? %>
      <p>
        <i class="material-icons green-text left">check</i> You're signed in!
      </p>
    <% else %>
      <p>
        <%= link_to 'Create an account', new_user_registration_path, class: 'hoverable btn blue white-text' %>
        <span class="grey-text" style="margin: 0 1em">or</span> 
        <%= link_to 'Log in', new_user_session_path, class: 'hoverable btn blue white-text' %>
      </p>
    <% end %>

    <br/>
    <div style="font-size: 1.3em;">Step 2: Redeem your code</div>
    <% if user_signed_in? %>
      <p>
        Now that you're signed into a Notebook.ai account, you can paste the code you received from SaS Con 2021 into the box below.
        Your account will be immediately upgraded to Premium (<span class="grey-text">normally $9/month</span>) for 2 months.
      </p>
      <div>
        <%= form_for :promotional_code, url: redeem_path do |form| %>
          <div class="input-field col s12 m6">
            <%= form.text_field :promo_code %>
            <label for="promo_code">Code</label>
          </div>
          
          <div class="input-field col s12 m6">
            <%= form.submit 'Redeem code', class: 'white black-text btn' %>
          </div>
        <% end  %>
      </div>
      <div class="clearfix"></div>

    <% else %>
      <p>
        Once you've signed into a Notebook.ai account, you can paste the code you received from SaS Con 2021 into the box below.
        Your account will be immediately upgraded to Premium (<span class="grey-text">normally $9/month</span>) for 2 months.
      </p>
      <div>
        <%= form_for :promotional_code, url: redeem_path do |form| %>
          <div class="input-field col s12 m6">
            <%= form.text_field :promo_code, disabled: 'disabled' %>
            <label for="promo_code">Code</label>
          </div>
          
          <div class="input-field col s12 m6">
            <%= form.submit 'Redeem code', class: 'white black-text btn', disabled: 'disabled' %>
          </div>
        <% end  %>
      </div>
      <div class="clearfix"></div>
    <% end %>
    <p>
      At the end of the 2 months, you will be automatically downgraded back to the free Starter tier and won't be charged again. 
      <strong>
        You will have full access all pages you create, forever
      </strong>
      &mdash; once you create them, you're <em>your</em> pages; we just host them for you. 
    </p>
    <p>
      Of course, you can also upgrade again at any time in the future by clicking "Billing" in the sidebar and
      selecting a Premium plan that works for you.
    </p>

    <div style="font-size: 1.3em;">Step 3: Enjoy Premium!</div>
    <p>
      Premium unlocks a ton of new kinds of pages for you to create in Notebook.ai, which let you get super specific when creating your
      fictional worlds. You can browse the available page types and turn them on for your universe by clicking "Add more..." in your 
      logged-in notebook sidebar, or simply <%= link_to 'click here', customization_content_types_path %> to get started. You can also see
      a quick sampling below.
    </p>
  </div>
</div>

<div style="font-size: 1.5em; padding-top: 100px; font-weight: bold" id="how-to-redeem">Notebook pages available with Premium</div>
<p>
  Create any of these pages &mdash; and as many as you need &mdash; to start putting ideas to paper and flesh your world out one piece at a time.
  Each page comes with a fully-customizable template that will ask you questions to get you started, but stay out of your way when you've got your
  momentum.
</p>
<div class="row">
  <% (Rails.application.config.content_types[:all]).each do |content_type| %>
    <div class="col l4 m6 s12">
      <%= render partial: 'cards/intros/content_type_intro', locals: { content_type: content_type } %>
    </div>
  <% end %>
</div>
