{# Junja template based on the ESGF standard website template #}
{% block doctype -%}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
{% endblock %}
{% extends "basic/layout.html" %}

{% set projects = (
  ('installer', "http://esgf.org/esgf-installer-site/"),
  ('node-manager', "http://esgf.org/esg-node-site/"),
  ('publisher', "http://esgf.org/esg-publisher-site/"),
  ('idp', "http://esgf.org/esgf-idp-site/"),
  ('orp', "http://esgf.org/esg-orp-site"),
  ('security', "http://esgf.org/esgf-security-site"),
  ('search', "http://esgf.org/esg-search-site"),
  ('script-gen', "http://esgf.org/esg-script-gen-site"),
  ('drslib', "http://esgf.org/esgf-drslib-site"),
  ('stager', "http://esgf.org/esgf-stager-site"),
  ('...', "http://esgf.org/projects.html"),
)
%}

{% set internal_links = (
  ('esgf', "http://esgf.org/"),
  ('design', ""),
  ('download', "http://pypi.python.org/pypi/drslib"),
  ('quickstart', "intro.html#quick-start"),
  ('developer&nbsp;info', ""),
  ('performance', ""),
  ('repo', "http://esgf.org/gitweb/?p=esgf-drslib.git;a=summary"),
  ('code docs', "modules.html"),
  ('dep-report', ""),
  ('unit tests', "intro.html#testing"),
  ('coverage', ""),
  ('ci', ""),
  ('faq', ""),
  ('mailing list', ""),
  ('bugs', ""),
  ('wiki', ""),
  ('blog', ""),
)
%}  

{% macro projectbar() %}
<div class="projects">  <!-- projects -->   
  {%- for p, url in projects -%}
    {%- if p == theme_esgf_project %}
      <b>{{ p }}</b> &middot;
    {%- else %}
      <a href="{{ url }}">{{ p }}</a>
    {%- endif %}
  {%- endfor -%}
</div> <!-- projects -->    
{% endmacro %}

{% macro subprojectbar() %}
<div class="lsidebar">  <!-- lsidebar -->
  <ul>
    {%- for p, url in internal_links -%}
      {%- if url == "" %}
      <li class="missing">{{ p }}</li>
      {%- else %}      
      <li><a href="{{ url }}">{{ p }}</a></li>
      {%- endif %}
    {%- endfor -%}
  </ul>
</div> <!-- lsidebar -->
{% endmacro %}

<html>
  <head>
    {% block htmltitle %}
    <title>ESGF: esgf-drslib</title>
    {% endblock %}
    {% block extrahead %}
    <!-- the syle sheet link  -->
    <!-- favuorite icon - needs to have the http://full_path link  -->
    <link rel="icon" type="image/png" href="http://esgf.org/images/esgf-favicon.png">
    <!-- keywords for search  engines  -->
    <meta name="keywords" content="earth systems grid, go-essp, esgf, distributed computing, distributed storage, climage science">
    <meta name="description" content="A distributed database for structured data.">		
    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'> 
    {% endblock %}
  </head>
  
  <!-- the page code starts here -->    
  <body>
    <div >  <!-- body -->    
      {% block header %}
      <!-- header starts here -->
      <div id="header" style="overflow: hidden">
        <!-- image floats tot the right -->
        <div style='float: right; margin-right: 20px'> 
	  <img src='{{ pathto("_static/images/logo.png", 1) }}' width="70" height="70" >	 
        </div>
        
	<div id='logo' style='float: left; margin-right: 20px; margin-left: -10px'>
	  <a href="http://esgf.org/"><img src='http://esgf.org/images/esgf-logo.png' width="70" height="70" border="0"></a>
        </div>
	
	<div>  <!-- inside header -->   
	  <div class="title">ESGF</div>
	  <div class="subtitle">Earth System Grid Federation</div>
          <!-- projects top navigation -->  
	  {{ projectbar() }}
	  
        </div>  <!-- inside header -->
      </div>  <!-- header -->
      <!-- left side navigation bar starts here -->
      {# Support overriding left sidebar with template inheritance #}
      {% block lsidebar %}
      {{ subprojectbar() }}
      {% endblock lsidebar %}
      {% endblock %}
      <!-- main text comes here -->

      {%- block content %}
      {%- block sidebar1 %} {{ sidebar() }} {% endblock %}
      
      <div class="document">
	{%- block document %}
	<div class='content'>
	  {{ super() }}
	</div> <!-- content -->
	{%- endblock %}

	{%- block sidebar2 %}{% endblock %}
	<div class="clearer"></div>
      </div>
      {%- endblock %}

      <br class="clearfloat" />
      {% block footer %}
      <!-- footer section here -->
      <div id="footer"> 
	<div >  
	  <div class="projects"> 
	    <a href="http://www-pcmdi.llnl.gov" target="_other">PCMDI</a> &middot;
	    <a href="http://cmip-pcmdi.llnl.gov/cmip5/" target="_other">CMIP5</a> &middot; 
	    <a href="http://www.llnl.gov" target="_other">LLNL</a> &middot;
            <a href="https://www.llnl.gov/disclaimer.html" target="_other">Privacy &amp; Legal Notice</a> &middot;
            <a  > LLNL-WEB-460643 &nbsp;&nbsp;&nbsp; </a &middot;></div>
	</div>
      </div>    <!-- footer -->      
      {% endblock %}
    </div> <!-- body -->    
  </body>
</html>


