github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/docs/_includes/collection_browser/browser.html (about)

     1  <!-- Basic collection data -->
     2  {% assign collection_name = include.collection_name %}
     3  {% assign nav_title = include.nav_title %}
     4  {% assign nav_title_link = include.nav_title_link %}
     5  
     6  <!-- Get categories and tags from collection -->
     7  {% assign categories = "" | split: "|" %}
     8  {% assign tags = "" | split: "|" %}
     9  {% for doc in include.collection %}
    10      {% for category in doc.categories %}
    11          {% assign categories = categories | push: category | uniq %}
    12      {% endfor %}
    13  
    14      {% for tag in doc.tags %}
    15          {% assign tags = tags | push: tag | uniq %}
    16      {% endfor %}
    17  {% endfor %}
    18  
    19  <!-- Get posts grouped in categories -->
    20  {% assign docs_grouped = include.collection | group_by: "category" %}
    21  
    22    <div class="main">
    23  
    24      <div class="cb-section-white">
    25  
    26          <!-- Search -->
    27          {% include collection_browser/_search.html tags=tags collection_name=include.collection_name %}
    28          <div class="row">
    29            <div class="container-cb-lg">
    30              <div id="cb-doc-listings">
    31                <div class="row equal">
    32  
    33                  <!-- Sidebar -->
    34                  {% assign data_scroll_after_selector = '.cb-search-cmp' %}
    35                  {% assign data_scroll_until_selector = '.cb-doc-listing' %}
    36                  {% include collection_browser/_sidebar.html data_scroll_until_selector=data_scroll_until_selector data_scroll_after_selector=data_scroll_after_selector %}
    37  
    38                  <!-- Listing -->
    39                  {% include collection_browser/_docs-list.html categories=categories collection_name=include.collection_name docs_grouped=docs_grouped %}
    40  
    41                </div>
    42              </div>
    43            </div>
    44          </div>
    45  
    46        <!-- No results -->
    47        {% include collection_browser/_no-search-results.html %}
    48  
    49      </div>
    50  
    51    </div>
    52  
    53    <!-- CTA Section -->
    54    {% include collection_browser/_cta-section.html %}
    55  
    56    <script>
    57        var cName = "bc_{{include.collection_name}}Entries"
    58        window[cName] = [
    59            {% for doc_group in docs_grouped %}
    60              {% for doc in doc_group.items %}
    61                {
    62                    "id"       : "{{ doc.title | strip_html | slugify | downcase | split: ' ' | join: '-' | append: '-card' }}",
    63                    "title"    : "{{ doc.title | strip_html | slugify | escape | downcase}}",
    64                    "category" : "{{ doc.categories | join: ', ' | downcase}}",
    65                    "excerpt" : "{{ doc.excerpt | strip_html | strip_newlines | escape | downcase}}",
    66                    "content"  : {{ doc.content | strip_html | strip_newlines | jsonify | downcase }},
    67                    "tags"     : "{{ doc.tags | join: ', ' | downcase}}",
    68                    "cloud"     : "{{ doc.cloud | join: ', ' | downcase}}"
    69                },
    70              {% endfor %}
    71              {% unless forloop.last %},{% endunless %}
    72            {% endfor %}
    73        ];
    74    </script>