<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width">

    <title>{{ currentpage.name }} - XRP Ledger Dev Portal</title>

    <!--[if lt IE 9]>
      <script src="/dist/js/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="/dist/js/respond/1.4.2/respond.min.js"></script>
    <![endif]-->


    <!-- favicon -->
    <link rel="icon" href="favicon.ico" type="image/x-icon">
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

    <!-- jQuery -->
    <script src="assets/vendor/jquery-1.11.1.min.js"></script>

    <!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
    <!-- <link href="assets/css/ripple.css" rel="stylesheet" /> -->
    <link href="assets/vendor/bootstrap.css" rel="stylesheet" />
    <link href="assets/css/devportal.css" rel="stylesheet" />

    <!-- Bootstrap JS -->
    <script src="assets/vendor/bootstrap.min.js"></script>

    <!-- fontawesome icons -->
    <link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />

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


    {% block head %}

    {% endblock %}

</head>

<body class="xrp-ledger-dev-portal {% if currentpage.sidebar != "disabled" %}sidebar-primary {% endif %}{% block bodyclasses %}{% endblock %}">

  <nav class="navbar fixed-top navbar-expand-lg navbar-light bg-white">
    <a href="index.html" class="navbar-brand"><img src="assets/img/XRPLedger_DevPortal_Gray.svg" class="logo" width="120" height="35" alt="XRP Ledger Dev Portal" /></a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarHolder" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarHolder">
      <ul class="nav navbar-nav mr-auto">
        {% set funnels = [] %}
        {% for page in pages %}
          {% if page.funnel is defined and page.funnel not in funnels %}
            {% set thisfunneltop = pages|selectattr('funnel', 'equalto', page.funnel)|first %}
            <li class="nav-item{% if currentpage == thisfunneltop %} active{% elif currentpage.funnel == thisfunneltop.name %} active-parent{% endif %}">
              <a class="nav-link" href="{{ thisfunneltop.html }}">{{ thisfunneltop.name }}</a>
            </li>
            {% set _ = funnels.append(page.funnel) %}
          {% endif %}
        {% endfor %}
      </ul><!-- /.navbar-nav -->
      <form class="navbar-form navbar-right" id="navbar-search" role="search" method="get" action="https://www.google.com/search">
        <div class="form-inline">
          <label class="sr-only" for="topsearchbar">Search this site</label>
          <input id="topsearchbar" name="q" type="text" class="form-control" class="top-search" placeholder="Search this site...">
          <input name="q" value="site:developers.ripple.com" type="hidden">
          <button type="submit" class="btn btn-default fa fa-search">&nbsp;</button>
        </div>
      </form>
      {% include 'template-github-edit.html' %}
    </div>
  </nav>

  <div class="container-fluid" role="document" id="main_content_wrapper">
    <div class="row">
      <!-- Right sidebar first so it's at the beginning for mobile layouts -->
      {% if currentpage.sidebar != "disabled" and currentpage.sidebar != "left_only" %}
      <aside class="right-sidebar col-lg-3 order-lg-4 p-0" role="complementary">
          {% block right_sidebar %}{% endblock %}
      </aside>
      {% endif %}

      <!-- main column -->
      <main class="main {% if currentpage.sidebar == "disabled" %}col-md-12{% else %}col-md-7 col-lg-6{% endif %} order-md-3 p-0 {% block mainclasses %}{% endblock %}" role="main" id="main_content_body">
          {% block breadcrumbs %}
            {% include 'template-breadcrumbs.html' %}
          {% endblock %}
          {% block main %}{% endblock %}
      </main>
      {% if currentpage.sidebar != "disabled" %}
      <!-- Left sidebar last so it's at the end for mobile -->
      <aside class="sidebar col-md-5 col-lg-3 p-0 order-md-1" role="complementary">
          {% block left_sidebar %}
            {% include "template-sidebar_nav.html" %}
          {% endblock %}
      </aside>
      {% endif %}
    </div><!--/.row (main layout)-->
  </div>

{% include 'template-footer.html' %}

{% block endbody %}{% endblock %}
</body>
</html>
