publiclab/spectral-workbench

View on GitHub
app/views/layouts/application.html.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<% if @offline == "flush" %>
<html>
<% elsif @offline %>
<html manifest="/index.manifest">
<% else %>
<html lang="en">
<% end %>
  <head>
    <meta charset="utf-8">
    <title>SpectralWorkbench<%= ": "+@title unless @title.nil? %></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="An open source spectral library and DIY spectrometry community developing environmental testing techniques.">
    <meta name="author" content="Public Lab contributors">

    <link rel="apple-touch-icon" href="//spectralworkbench.org/images/spectral-workbench-256.png">
    <link rel="apple-touch-fa-precomposed" href="//spectralworkbench.org/images/spectral-workbench-256.png">
    <link rel="apple-touch-fa-precomposed apple-touch-icon" href="//spectralworkbench.org/images/spectral-workbench-256.png">
    <link rel="shortcut icon" href="//spectralworkbench.org/images/spectral-workbench-256.png" />

    <%= stylesheet_link_tag    "application", :media => "all" %>

    <% if params[:controller] == "capture" %>
      <%= javascript_include_tag "capture" %>
      <%= stylesheet_link_tag    "capture", :media => "all" %>
    <% else %>
      <%= javascript_include_tag "analyze" %>
    <% end %>

    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tag %>

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

      gtag('config', 'G-FL656WFRGB');
    </script>
    
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <script><%= render partial: 'layouts/locals', formats: [:js] %></script>

  </head>

  <body>

    <% unless logged_in? %>
    <div class="modal hide fade" id="loginmodal">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <b>Log in</b>
      </div>
      <div class="modal-body">
        <%= render :partial => 'sessions/login' %>
      </div>
    </div>
    <% end %>

    <!-- Facebook button needs this :-( -->
    <div id="fb-root"></div>

    <% if params[:controller] != "capture" %>
      <%= render :partial => 'layouts/header' %>
    <% end %>

    <div class="container" id="searchbar" style="display:none;">
      <%= render :partial => 'spectrums/search' %>
    </div>

    <%= yield %>

    <% if params[:controller] != "capture" %>
      <footer class="container-fluid">

        <hr />

        <div class="span3">
          <p><b>Spectral Workbench</b> is <a href="https://github.com/publiclab/spectral-workbench">open source software</a>, created by <a href="//publiclab.org">Public Lab</a> and hosted by the Public Lab non-profit. Please consider <a href="//publiclab.org/donate">donating to help keep it running</a>!</p>
        </div>

        <div class="span3">
          <p><b>Support and troubleshooting</b></p>
          <p>Report bugs and help improve this software <a href="https://github.com/publiclab/spectral-workbench/issues/new">on Github</a></p>
          <p>For help using the software, see the <a href="//publiclab.org/wiki/spectral-workbench-usage">wiki documentation</a>, <a href="//publiclab.org/post?tags=question:spectral-workbench&template=question">ask a question on the Public Lab website</a>, or <a href="//publiclab.org/lists">post to the discussion lists</a>.
        </div>

        <div class="span3">
          <p><b>Get involved</b></p>
          <p>Public Lab is a community! <a href="//publiclab.org/lists">Join discussion lists</a> for various topics and regions to give and get help with other members.</p>
          <p>Follow <b>SpectralWB</b> on Twitter to see code updates: <a href="https://twitter.com/SpectralWB" class="twitter-follow-button" data-show-count="false">Follow @SpectralWB</a></p>
        </div>

      </footer>
    <% end %>

</body>
</html>