% if @code.nil? %>
This code is no longer valid.
<% elsif @code.uses_remaining.zero?%>
This code has been activated!
<%= link_to 'Click here to customize your notebook pages', customization_content_types_path, class: 'btn btn-large blue white-text' %>
<% else %>
Someone has gifted you
<%= pluralize(@code.days_active / 30, 'month') %>
of Notebook.ai Premium!
Activate your free Premium benefits
You can activate your Premium benefits by clicking "Activate" below.
Your account will be immediately upgraded for <%= pluralize @code.days_active, 'day' %>
and will automatically downgrade back to the free tier afterwards instead of renewing monthly.
This code can only be used <%= pluralize @code.uses_remaining, 'time' %>, so thank your friend!
<% if user_signed_in? %>
<% if current_user.on_premium_plan? %>
Since you already have a Premium subscription active, you can't activate this code yet.
An activation link will appear again whenever you don't have Premium active.
Don't worry—codes don't expire!
<% else %>
<%= form_for :promotional_code, url: redeem_path do |form| %>
<%= form.hidden_field :promo_code, value: @code.code %>
<%= form.submit 'Activate', class: 'hoverable btn btn-large blue white-text col s12', data: { confirm: "Are you sure you wish to activate this promo code? It can only be used once." } %>
<% end %>
<% end %>
<% else %>
Before activating your Premium, please either create a Notebook.ai account or log in to an existing one.
<%= link_to 'Create an account', new_user_registration_path, class: 'hoverable btn-large btn blue white-text', style: 'width: 100%' %>
<%= link_to 'Log in', new_user_session_path, class: 'hoverable btn-large btn blue white-text', style: 'width: 100%' %>
<% end %>
<% unless user_signed_in? %>
When you're logged in, return to this link so you can redeem this code!
<% end %>
Notebook pages available with Premium
Create any of these pages — and as many as you need — 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.
<% (Rails.application.config.content_types[:all]).each do |content_type| %>
<%= render partial: 'cards/intros/content_type_intro', locals: { content_type: content_type } %>
<% end %>
<% end %>