<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	 {% if summary %}
	 <meta name="description" content="{{ summary|striptags }}">
    {% else %}
    <meta name="description" content="Documentation for {{ project }}">
	 {% endif %}
    <meta name="author" content="Chris MacMackin" >
    <link rel="icon" href="{{ project_url }}/favicon.png">

    <title>{% block title %} {{ project }} {% endblock title %}</title>

    <link href="{{ project_url }}/css/bootstrap.min.css" rel="stylesheet">
    <link href="{{ project_url }}/css/pygments.css" rel="stylesheet">
    <link href="{{ project_url }}/css/font-awesome.min.css" rel="stylesheet">
    <link href="{{ project_url }}/css/local.css" rel="stylesheet">
    {% if css %}
    <link href="{{ project_url }}/css/user.css" rel="stylesheet">
    {% endif %}

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <script src="{{ project_url }}/js/jquery-2.1.3.min.js"></script>
    <script src="{{ project_url }}/js/svg-pan-zoom.min.js"></script>

    {% if search|lower == 'true' %}
    <script src="{{ project_url }}/tipuesearch/tipuesearch_content.js"></script>
    <link  href="{{ project_url }}/tipuesearch/tipuesearch.css" rel="stylesheet">
    <script src="{{ project_url }}/tipuesearch/tipuesearch_set.js"></script>
    <script src="{{ project_url }}/tipuesearch/tipuesearch.js"></script>
    {% endif %}

  </head>

  <body>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="{{ project_url }}/index.html">{{ project }} {% if version %}<small>{{ version }}</small>{% endif %}</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
				{% if pages %}
            <li>{{ pages }}</li>
				{% endif %}
                {% if project.allfiles|length > 1 %}
            <li><a href="{{ project_url }}/lists/files.html">Source Files</a></li>
				{% else %}
            <li><a href="{{project.files[0].get_url()}}">Source File</a></li>
				{% endif %}
				{% if project.modules|length > 0 %}
            <li><a href="{{ project_url }}/lists/modules.html">Modules</a></li>
				{% endif %}
				{% if project.procedures|length > 0 %}
            <li><a href="{{ project_url }}/lists/procedures.html">Procedures</a></li>
				{% endif %}
				{% if project.absinterfaces|length > 0 %}
            <li><a href="{{ project_url }}/lists/absint.html">Abstract Interfaces</a></li>
				{% endif %}				{% if project.types|length > 0 %}
            <li><a href="{{ project_url }}/lists/types.html">Derived Types</a></li>
				{% endif %}
				{% if project.programs|length > 1 %}
            <li><a href="{{ project_url }}/lists/programs.html">Programs</a></li>
				{% elif project.programs|length == 1 %}
            <li><a href="{{ project.programs[0].get_url() }}">Program</a></li>
				{% endif %}
          </ul>
        {% if search|lower == 'true' %}
        <form action="{{ project_url }}/search.html" class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input" autocomplete="off" required>
        </div>
<!--
        <button type="submit" class="btn btn-default">Submit</button>
-->
        </form>
        {% endif %}
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">
    {% block body %}
    {% endblock body %}
    <hr>
    <footer>
        <div class="row">
        <div class="col-md-4">&copy; {{ year }} {{ license }}</div>
	<div class="col-md-4"><span class="text-center"> {{ project }} was developed by {{ author }}</span></div>
        <div class="col-md-4"><span class="pull-right">Documentation generated by <a href="https://github.com/cmacmackin/ford">FORD</a></span></div>
        </div>
        <br>
    </footer>
    </div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
<!--
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
-->
    <script src="{{ project_url }}/js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="{{ project_url }}/js/ie10-viewport-bug-workaround.js"></script>

    <!-- MathJax JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } },
        jax: ['input/TeX','input/MathML','output/HTML-CSS'],
        extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js'],
        'HTML-CSS': { 
           styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: '#000000 ! important'} }
        }
      });
    </script>
    <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  </body>
</html>
