<!DOCTYPE html>
<html>
  <% if params[:print] %>
      <head>
        <%= csrf_meta_tags %>
        <%= action_cable_meta_tag %>
        <title>WrestlingDev</title>
        <%= stylesheet_link_tag "application", media: "all", "data-turbo-track": "reload" %>
        <%= javascript_importmap_tags %>
        <%= render 'layouts/cdn' %>
          <%= render 'layouts/shim' %>
      </head>
      <body>
        <%= yield %>
      </body>
  <% else %>
        <head>
          <title>WrestlingDev</title>
          <%= action_cable_meta_tag %>
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <% if Rails.env.production? %>
            <%= render 'layouts/analytics' %>
          <% end %>
          <%= stylesheet_link_tag "application", media: "all", "data-turbo-track": "reload" %>
          <%= javascript_importmap_tags %>
          <%= csrf_meta_tags %>
          <%= render 'layouts/cdn' %>
          <%= render 'layouts/shim' %>
        </head>
        <body style="padding-top: 100px;">
            <%= render 'layouts/header' %>
            <%= render 'layouts/tournament-navbar' %>

            <div class="container">
                <div class="navbar-roof"></div>

                  <div id="page-content">
                    <div class="row">
                      <div class="col-md-12">
                        <% unless hide_ads? %>
                          <%= render 'layouts/underheader' %>
                        <% end %>
                      </div>
                    </div>
                    <div class="row no-margin">
                        <div class="col-md-12" style="padding-left: 2%;">
                          <% if notice %>
                            <p id="notice" class="alert alert-success alert-dismissible"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><%= notice %></p>
                          <% end %>
                          <% if alert %>
                            <p id="alert" class="alert alert-danger alert-dismissible"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><%= alert %></p>
                          <% end %>
                          <div id="view" style="overflow-x: auto; overflow-y: hidden;"> <%# Horizontal scroll only %>
                            <br><br>
                            <%= yield %>
                          </div>
                        </div>
                    </div>
                  </div>
                  <%= render 'layouts/footer' %>
            </div>
        </body>
    <% end %>
</html>
