<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="author" content="rdgai">
  <title>rdgai {{ doc }}</title>
    
  <!-- Favicons -->
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABgWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kc8rRFEUxz8zaORHFMnC4qVhNeRHDTbKTEJN0hhlsJl53syoeTOv92bSZKtsFSU2fi34C9gqa6WIlKxnTWzQc55RI5lzO/d87vfec7r3XHBH0qpuVfeBnsmZ4YmAMh9dUDxFPNTTRgtDMdUyxmZmQlS0tztcTrzpcWpVPvev1S9rlgquWuFR1TBzwpPCodWc4fC2cKuaii0Lnwr7TLmg8K2jx0tcdDhZ4g+HzUg4CO5mYSX5i+O/WE2ZurC8HK+ezqs/93Fe0qBl5mYldop3YBFmggAKU4wTxE8/IzL76WGAXllRIb/vO3+arOSqMhsUMFkhSYocPlHzUl2TmBBdk5Gm4PT/b1+txOBAqXpDAGqebPulCzxb8Llp2++Htv15BFWPcJEp52cPYPhV9M2y5t2HpnU4uyxr8R0434D2ByNmxr6lKnF3IgHPJ9AYhZZrqFss9exnn+N7iKzJV13B7h50y/mmpS925mftiwiumwAAAAlwSFlzAAALEwAACxMBAJqcGAAABDtJREFUWIXt1muIlFUcBvDfzI6zu3axtSwLI1cRdQsSDcMEazMk2rK0pKA1tg9a0KCBKF2IwD4VCBVT9CGxNsqsrCwVq1VUsmglSBe0yxoVtYEXhL3MvjM7O9uH9x15nTaNcOlDPfDnvZznnOc5F/7nz38diSy1+BATcH+Gb0ZSMMsMvIlfcVcKN2JB1H6/ETaAZjREMS+Jz3AQAV4aYXHIRloH0JbMMIiv0JXhp5FWjzS60J5hMDnSgmfDv24gVfkjy7VYjoVInyOdAj7CKxk6/tLAi1xc4nMcTfA2ColzYyCNxWjOMvFPBnIYJDHEmiGGMONJes6Ndogsa/Eb1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oqNjJs4PDebxfoZfhtP7H/8q/gD4EGVfq3MYqAAAAABJRU5ErkJggg==" />
  <meta name="theme-color" content="#940000">

  <style>
    {% include 'assets/css/bootstrap.rdgai.min.css' %}
    {% include 'assets/css/rdgai.min.css' %}
  </style>
</head>

<body>

  <header class="navbar navbar-dark sticky-top bg-light flex-md-nowrap p-0 shadow">
    <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse"
      data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
  </header>

  <div class="container-fluid">
    <div class="row">

      <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block sidebar collapse">
        <div id="brand">
          <a href="https://rbturnbull.github.io/rdgai/" target="_blank">{% include 'assets/img/rdgai-logo-tall.svg' %}</a>
        </div>
        <h2>{{ doc.path.name }}</h2>
  
        <div  style="height: 400px; overflow-y: auto;">
          <ul class="nav flex-column pt-2">
            {% for app in doc.apps %}
              <li class="nav-item">
                <a class="nav-link {% if loop.first %}active{% endif %}" aria-current="page" href="#"  id="{{ app }}-tab" data-bs-toggle="tab" data-bs-target="#{{ app }}" type="button" role="tab" aria-controls="{{ app }}" aria-selected="true">
                  {% include 'assets/img/feather-code.svg' %}
                  {{ app }}
                </a>
              </li>
            {% endfor %}
          </ul>
          <hr>
          <ul class="nav flex-column pt-2">
            {% for relation_type in doc.relation_types.values() %}
            <li class="nav-item">
              <a class="nav-link" aria-current="page" href="#"  id="{{ relation_type }}-tab" data-bs-toggle="tab" data-bs-target="#{{ relation_type }}" type="button" role="tab" aria-controls="{{ relation_type }}" aria-selected="true">
                {% include 'assets/img/feather-list.svg' %}
                {{ relation_type }}
              </a>
            </li>
          {% endfor %}
          </ul>
        </div>
      </nav>

      <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
        <div class="tab-content" id="rdgai-tab-content">
            {% for app in doc.apps %}
                <div class="tab-pane fade show {% if loop.first %}active{% endif %}" id="{{ app }}" role="tabpanel" aria-labelledby="{{ app }}-tab" data-app='{{ mapper.key(app) }}'>
                    <h1>{{ app }}</h1>
                    <p class="verse"><span>{{ app.text_before() }}</span> <span class='highlight'>{{ app.text_with_signs() }}</span> <span>{{ app.text_after() }}</span></p>
                    <div class="row justify-content-center text-center">
                      {% for reading in app.readings %}
                      <div class="col-sm-3">
                        <div class="card bg-secondary text-white">
                          <div class="card-body">
                            <p class="card-text small">{{ reading.n}}</p>
                            <h5 class="card-title large">{{ reading }}</h5>
                            <p class="card-text">{{reading.witnesses_str()}}</p>
                          </div>
                        </div>
                      </div>
                      {% endfor %}
                    </div>
        
                      {% for pair in (app.pairs if all_apps else app.non_redundant_pairs) %}
                        <p class="relation"><span>{{ pair.active }}</span> &lrm;➜ <span>{{ pair.passive }}</span></p>
                        <div class="row justify-content-center text-center">              
                          {% for relation_type in doc.relation_types.values() %}
                          <div class="col-2 mb-2">
                            <button type="button" class="btn relation-btn {% if relation_type in pair.types %}btn-primary{%else%}btn-secondary{% endif %} btn-block" 
                            data-pair='{{ mapper.key(pair) }}'
                            data-relationtype='{{ mapper.key(relation_type) }}'
                            {% if relation_type.description %}data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ relation_type.description }}" data-bs-delay="2000" {% endif %}>
                              {{ relation_type }}
                            </button>
                          </div>
                          {% endfor %}
                          {% if pair.rdgai_responsible() %}<div class="logo-small">{% include 'assets/img/rdgai-logo-tall.svg' %}</div>{% endif %}
                          <div class="desc">{{ pair.get_description() }}</div>
                        </div>
                      {% endfor %}
                </div>
            {% endfor %}     
            {% for relation_type in doc.relation_types.values() %}
                <div class="tab-pane fade show " id="{{ relation_type }}" role="tabpanel" aria-labelledby="{{ relation_type }}-tab" >
                    <h1>{{ relation_type }}</h1>
                    <ul class="nav flex-column pt-2" style='font-size: 3rem;'>
                    {% for pair in relation_type.pairs_sorted() %}
                      <li class="nav-item">
                      <a class="nav-link" aria-current="page" href="#"  id="{{ pair.app }}-tab" data-bs-toggle="tab" data-bs-target="#{{ pair.app }}" type="button" role="tab" aria-controls="{{ pair.app }}" aria-selected="true">
                        {{ pair.app }}: <span>{{ pair.active }}</span> &lrm;➜ <span>{{ pair.passive }}</span>
                      </a>
                      </li>
                    {% endfor %}
                      </ul>
                </div>
            {% endfor %}        

        </div>        
        
      </main>
    </div>
  </div>

  <script>
    {% include 'assets/js/bootstrap.min.js' %}
  </script>
  <script>
    {% include 'assets/js/rdgai.js' %}
  </script>

</body>

</html>