<div class="container">
  <div class="row">
    <div class="library-container">
      <div class="col-md-12">

        <div class="row">
          <div class="col-md-8">
            {{{breadcrumbs}}}

            <h1 style="margin-top: 0;" id="library-name">{{library.name}}</h1>

            {{#watch}}
            <ul class="list-inline">
              <li><i class="fas fa-eye"></i><strong> {{watch}}</strong></li>
              <li><i class="fas fa-star"></i><strong> {{star}}</strong></li>
              <li><i class="fas fa-code-branch"></i><strong> {{fork}}</strong></li>
            </ul>
            {{/watch}}

            <p><a href="{{library.homepage}}">{{library.homepage}}</a></p>

            <ul class="list-inline">
              <li class="label" style="color: #000;">Links/Tags:</li>
              <li class="label label-default label-highlight">
                <a href="https://github.com/cdnjs/cdnjs/commits/master/ajax/libs/{{library.name}}"
                   title="Commit history of {{library.name}} on cdnjs">
                  commits/history
                </a>
              </li>
              <li class="label label-default label-highlight">
                <a href="https://api.cdnjs.com/libraries/{{library.name}}" title="api url of {{library.name}} on cdnjs">
                  cdnjs api
                </a>
                <a href="https://api.cdnjs.com/libraries/{{library.name}}?output=human"
                   title="Human readable api output of {{library.name}}">
                  &nbsp;<i class="fas fa-user"></i>
                </a>
              </li>&nbsp;
              <li class="label label-default label-highlight">
                <a href="{{library.autoupdate.url}}"
                   title="{{library.name}} has auto-update config, this is the link to upstream, click to checkout lastest version on official page.">
                  {{library.autoupdate.string}}
                </a>
              </li>

              {{#library.urls}}
              <li class="label label-default label-highlight">
                <a href="{{url}}" title="Link to {{library.name}}'s source code page.">repository</a>
              </li>
              {{/library.urls}}

              {{#licenses}}
              <li class="label label-default label-highlight">
                <a href="{{url}}" title="License info of {{library.name}}, click to see detail.">
                  Current license: {{type}}
                </a>&nbsp;
              </li>
              {{/licenses}}
            </ul>

            <p>{{library.description}}</p>
            <p><em>{{library.keywords}}</em></p>
          </div>

          <div class="col-md-4">
            <script src="https://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=cdnjscom"
                    id="_carbonads_js" defer></script>
          </div>
        </div>

        <div class="row">
          <div class="col-md-7">
            <div class="input-group version-dropdown">
              <div class="input-group-addon">Version</div>
              <select class="form-control version-selector">
                {{#assets}}
                <!-- linthtml-configure attr-name-style="false" -->
                <option value="{{version}}" {{selected}}>{{version}}</option>
                <!-- linthtml-configure attr-name-style="$previous" -->
                {{/assets}}
              </select>
            </div>
          </div>

          <div class="col-md-5">
            <div class="input-group version-dropdown">
              <div class="input-group-addon">CDN provider</div>
              <select class="form-control cdn-provider-selector" disabled>
                <option value="cloudflare" selected>Cloudflare</option>
              </select>
            </div>
          </div>
        </div>

        <div style="clear: both;"></div>
        <br />

        {{#selectedAssets}}
        <div data-library-version="{{version}}" class="assets library-table-container">
          {{#hasHidden}}
          <div id="control-hidden">
            <a id="show-hidden" class="btn btn-primary">
              Some files are hidden, click to show all files
            </a>
            <a id="hide-hidden" class="btn btn-primary" style="display: none;">
              All files are shown, click to hide non-essential files
            </a>
          </div>
          {{/hasHidden}}

          <!-- Nav tabs -->
          <ul class="nav nav-tabs" role="tablist">
            {{#fileArray}}
              <li role="presentation" class="{{#isActive}}active{{/isActive}}">
                <a href="#{{fileType}}" aria-controls="{{fileType}}" role="tab" data-toggle="tab">{{fileType}}</a>
              </li>
            {{/fileArray}}
          </ul>

          <!-- Tab panes -->
          <div class="tab-content">
            {{#fileArray}}
              <!-- linthtml-configure id-class-style="false" -->
              <div role="tabpanel" class="tab-pane {{#isActive}}active{{/isActive}}" id="{{fileType}}">
                <!-- linthtml-configure id-class-style="$previous" -->
                <table style="margin-top: 20px;" cellpadding="0" cellspacing="0" border="0" class="table table-striped">
                   <tbody>
                   {{#files}}
                   <tr class="library {{fileType}}-type {{defaultFile}} {{#isHidden}}hiddenFile{{/isHidden}}"
                       style="/*{{#isHidden}}*/display: none;/*{{/isHidden}}*/">
                     <td class="library-column" data-lib-name="{{library.name}}" style="position: relative;">
                       <p class="library-url">{{library.originalName}}/{{version}}/{{name}}</p>
                     </td>
                   </tr>
                   {{/files}}
                  </tbody>
                </table>
              </div>
            {{/fileArray}}
          </div>
        </div>
        {{/selectedAssets}}

        <h3>Related Tutorials</h3>
        <p style="margin-bottom: 50px;">
          Write your own awesome web development tutorials for the libraries on cdnjs!
          <a href="https://github.com/cdnjs/tutorials" target="_blank">Submit your community driven tutorials now!</a>
        </p>

        {{#tutorialsPresent}}
        <table class="table table-hover" style="margin-top: 25px;">
          <thead>
          <tr>
            <th scope="col">Tutorial</th>
            <th scope="col">Author</th>
          </tr>
          </thead>
          <tbody>
          {{#tutorials}}
          <tr>
            <td><a href="/libraries/{{libraryRealName}}/tutorials/{{slug}}">{{name}}</a></td>
            <td><a href="{{author.homepage}}">{{author.name}}</a></td>
          </tr>
          {{/tutorials}}
          </tbody>
        </table>
        {{/tutorialsPresent}}

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

<script>SRI={{{SRI}}}</script>
