<!DOCTYPE html>
<html lang="en">
<head>
  <!-- Global site tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-47852178-4"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'UA-47852178-4');
  </script>

  <title><%= Rails.application.settings['name'] %>: <%= @paper.title %></title>
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_importmap_tags %>
  <%= javascript_import_module_tag 'custom/clipboards' %>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <%= csrf_meta_tags %>
  <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
  <link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
  <link rel="manifest" href="/manifest.json">
  <link rel="home" type="application/atom+xml" title="Papers" href="/papers.atom">
  <meta name="msapplication-TileColor" content="#ffffff">
  <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
  <meta name="theme-color" content="#ffffff">

  <!-- clipboard.js -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script>

  <!-- Altmetric -->
  <script type='text/javascript' src='https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js'></script>

  <!-- Dimensions -->
  <script async src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>

  <!-- facebook open graph tags -->
  <meta property="og:type" content="article" />
  <meta property="og:url" content="<%= @paper.seo_url %>" />
  <meta property="og:site_name" content="<%= Rails.application.settings['name'] %>" />
  <meta property="og:title" content="<%= @paper.title %>" />
  <meta property="og:description" content="<%= @paper.citation_string %>" />
  <meta property="og:image" content="<%= Rails.application.settings['logo_url'] %>" />

  <!-- twitter card tags additive with the og: tags -->
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:title" value="<%= @paper.title %>" />
  <meta name="twitter:site" content="<%= Rails.application.settings['twitter'] %>">
  <meta name="twitter:description" value="<%= @paper.citation_string %>" />
  <meta name="twitter:image" content="<%= Rails.application.settings['logo_url'] %>" />
  <meta name="twitter:url" value="<%= @paper.seo_url %>" />
  <meta name="twitter:label1" value="ISSN" />
  <meta name="twitter:data1" value="<%= Rails.application.settings['issn'] %>" />

  <!-- Google Scholar Tags -->

  <% if @paper.doi? %>
  <meta name="citation_title" content="<%= @paper.scholar_title %>">
  <%= scholar_author_tags(@paper.scholar_authors) %>
  <meta name="citation_publication_date" content="<%= @paper.accepted_at.strftime('%Y/%m/%d') %>">
  <meta name="citation_journal_title" content="<%= Rails.application.settings['name'] %>">
  <meta name="citation_doi" content="<%= @paper.doi %>">
  <meta name="citation_issn" content="<%= Rails.application.settings['issn'] %>">
  <meta name="citation_volume" content="<%= @paper.volume %>">
  <meta name="citation_issue" content="<%= @paper.issue %>">
  <meta name="citation_firstpage" content="<%= @paper.page %>">
  <meta name="citation_abstract_html_url" content="<%= @paper.seo_url %>">
  <meta name="citation_pdf_url" content="<%= @paper.seo_pdf_url %>">
  <% end %>
</head>
<body>
  <header class="container-fluid">
    <%= render partial: "content/layout/navbar" %>
  </header>

  <div class="container">
    <%= render partial: "shared/flashes" %>
    <%= render partial: "shared/profile" if show_profile_banner? %>
  </div>

  <% if @paper.doi? %>
    <%= render partial: "papers/show_published" %>
  <% else %>
    <%= render partial: "papers/show_unpublished" %>
  <% end %>

  <div class="container-fluid">
    <%= render partial: "content/layout/footer" %>
  </div>
</body>
</html>
