<% provide :title do %><%= @proposal.title %><% end %>
<% provide :social_media_meta_tags do %>
<%= render "shared/social_media_meta_tags",
            social_url: proposal_url(@proposal),
            social_title: @proposal.title,
            social_description: @proposal.summary %>
<% end %>
<% content_for :canonical do %>
  <%= render "shared/canonical", href: proposal_url(@proposal) %>
<% end %>

<% cache [locale_and_user_status(@proposal), @proposal, @proposal.author, Flag.flagged?(current_user, @proposal), @proposal_votes] do %>
  <div class="proposal-show">
    <div id="<%= dom_id(@proposal) %>" class="row">
      <div class="small-12 medium-8 column">

        <h1><%= t("proposals.proposal.created") %></h1>

        <p>
          <span class="lead"><%= t("proposals.proposal.share.guide") %></span><br>
          <%= t("proposals.proposal.share.edit") %>
        </p>

        <%= render partial: 'shared/social_share', locals: {
          title: @proposal.title,
          url: proposal_url(@proposal),
          description: @proposal.summary
        } %>

        <% if @proposal_improvement_path.present? %>
          <div class="callout highlight margin-top text-center">
            <p class="lead"><strong><%= t("proposals.proposal.improve_info") %></strong></p>
            <%= link_to t("proposals.proposal.improve_info_link"), @proposal_improvement_path, class: "button" %>
          </div>
        <% end %>

        <div class="small margin-bottom">
          <%= link_to t("proposals.proposal.share.view_proposal"), proposal_path(@proposal) %>
        </div>
      </div>

      <div class="small-12 medium-4 column">
        <div class="callout light">
          <p>
            <strong><%= @proposal.title %></strong><br>
            <%= t("proposals.show.code") %> <%= @proposal.code %>
          </p>
        </div>
      </div>
    </div>
  </div>
<% end %>
