<html>
  <head>
    <script
      src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
      integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E="
      crossorigin="anonymous">
    </script>
    <script>
      function search() {
          var search_string = $("#search").val().toLowerCase();
          $(".kwtable .kwname").each(function() {
              if ($(this).text().toLowerCase().indexOf(search_string) !== -1) {
                  $(this).parent().show();
              } else {
                  $(this).parent().hide();
              }
          })
      }
      $(document).ready(function() {
          $("#search").on("input", function() {
              search()
          })
          $("#search").keyup(function() {
              search()
          })
      });
    </script>
    <style>
      {{stylesheet}}
    </style>
  </head>
  <body>
    <div class="container">
      <div class="header">
        <div class="title">{{title}}</div>
        <div class="search right">search: <input id="search" type="search"></input></div>
      </div>
      {% for library in libraries %}
      <div class="section" id="library-{{library.name}}">
        <h1>{{library.src}}</h1>
        <div class="library-documentation">
        {{library.doc|robot_html}}
        </div>
        <table class="kwtable">
          <tbody>
            <tr><th>Keyword</th><th>Arguments</th><th>Documentation</th></tr>
            {% for keyword in library.keywords %}
            <tr class="kwrow" id="{{library.src}}.{{keyword.name}}">
              <td class="kwname">
                {{keyword.name}}
              </td>
              <td class="kwargs">
                  {% for arg in keyword.args %}
                  <i>{{arg}}</i>{% if not loop.last %}, {% endif %}
                  {% endfor %}
              </td>
              <td class="kwdoc">{{keyword.doc|robot_html}}</td>
            </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
      {% endfor %}
    </div>
    <div class="footer">
      Generated on {{date}} - cumulusci v{{cci_version}}
    </div>
  </body>
</html>
