{# #######################
  header.html
##########################

This block gives the introduction content at the top of each report.
That is, the page title, welcome message, details of where the report
was generated and the button that launches the welcome tour.

#}

<h1 id="page_title">
    {% if config.custom_logo is not none %}
      <div class="pull-right">
      {{ '<a href="'+config.custom_logo_url+'" target="_blank">' if config.custom_logo_url is not none }}
        <img src="data:image/png;base64,{{ include_file(config.custom_logo, b64=True) }}" title="{{ config.custom_logo_title if config.custom_logo_title is not none }}">
      {{ '</a>' if config.custom_logo_url is not none }}
      </div>
    {% endif %}
    <a href="http://multiqc.info" target="_blank">
        <img src="data:image/png;base64,{{ include_file('assets/img/MultiQC_logo.png', b64=True) }}" title="MultiQC">
    </a>
</h1>
{% if config.title is not none or config.subtitle is not none %}
<h1>
  {{ config.title if config.title is not none }}
  {{ '<br>' if config.title is not none and config.subtitle is not none }}
  {{ '<small>'+config.subtitle+'</small>' if config.subtitle is not none }}
</h1>
{% endif %}

{% if config.intro_text != False %}
<p class="lead">
  {{ config.intro_text if config.intro_text is not none else 'A modular tool to aggregate results from bioinformatics analyses across many samples into a single report.' }}
</p>
{% endif %}

{% if config.report_comment and config.report_comment | length > 0 %}
<blockquote class="report_comment">{{ config.report_comment }}</blockquote>
{% endif %}

{% if config.report_header_info and config.report_header_info | length > 0 %}
<div class="well">
  <dl class="dl-horizontal" style="margin-bottom:0;">
    {% for d in config.report_header_info %}{% for k, v in d.items() %}
      <dt>{{ k }}</dt><dd>{{ v }}</dd>
    {% endfor %}{% endfor %}
  </dl>
</div>
{% endif %}

<noscript>
  <div class="alert alert-danger">
    <h4>JavaScript Disabled</h4>
    <p>MultiQC reports use JavaScript for plots and toolbox functions. It looks like
    you have JavaScript disabled in your web browser. Please note that many of the report
    functions will not work as intended.</p>
  </div>
</noscript>

<div class="alert alert-warning mqc_loading_warning" style="display:none;"><span class="glyphicon glyphicon-time"></span> &nbsp;Loading report..</div>

<div id="analysis_dirs_wrapper">
  <p>Report generated on {{ config.creation_date }} based on data in:
  {% if config.analysis_dir | length == 1 %}<code class="mqc_analysis_path">{{ config.analysis_dir[0] }}</code>
  {% else %}
  <ul>
    {% for d in config.analysis_dir %}
    <li><code class="mqc_analysis_path">{{ d }}</code></li>
    {%  endfor %}
  </ul>
  {% endif %}
</div>

{% if config.sample_names_rename_buttons | length > 0 %}
<p id="mqc_sname_switches_txt">Change sample names:
  <span class="btn-group btn-group-sm" role="group" id="mqc_sname_switches">
    {% for sn_t in config.sample_names_rename_buttons %}
      <button type="button" class="btn btn-primary mqc_sname_switches {% if loop.index == 1 %}active{% endif %}" data-index="{{ loop.index - 1 }}">{{ sn_t }}</button>
    {%- endfor %}
  </span>
</p>
{% endif %}

<hr id="mqc_header_hr">

<div class="alert alert-info alert-dismissible hidden-print" id="mqc_welcome" style="display: none;">
  <button type="button" data-dismiss="alert" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <button type="button" data-dismiss="alert" class="btn-link btn-sm" id="mqc_hide_welcome_btn">don't show again</button>
  <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  <strong>Welcome!</strong> Not sure where to start? &nbsp;
  <a href="https://www.youtube.com/watch?v=qPbIlO_KWN0" target="_blank" class="btn btn-info btn-sm">Watch a tutorial video</a>
  &nbsp; <small><em>(6:06)</em></small>
</div>

{% if report.num_hc_plots > 0 and report.general_stats_data | length > config.num_datasets_plot_limit %}
<div id="mqc-warning-many-samples" class="alert alert-warning alert-dismissible hidden-print">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
  Because this report contains a lot of samples, you may need to click 'Show plot' to see some graphs.
  <button id="mqc-render-all-plots" class="btn btn-default btn-sm">Render all plots</button>
</div>
{% endif %}
