Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

product-articles-list.html 2.6 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  1. {% assign maxArticles = 10 %}
  2. {% if currentProductTree.renderedShortTitle %}{% assign productTitle = currentProductTree.renderedShortTitle %}{% else %}{% assign productTitle = currentProductTree.renderedFullTitle %}{% endif %}
  3. <div class="py-6 all-articles-list">
  4. <h2 class="font-mktg mb-4" id="all-docs"><a href="#all-docs">All {{ productTitle }} docs</a></h2>
  5. <div class="d-flex gutter flex-wrap">
  6. {% for childPage in currentProductTree.childPages %}
  7. {% if childPage.page.documentType == "article" %}{% assign standaloneCategory = true %}{% else %}{% assign standaloneCategory = false %}{% endif %}
  8. {% unless standaloneCategory %}
  9. <div class="col-12 col-lg-4 mb-6 height-full">
  10. <h4 class="mb-3"><a href="{{ childPage.href }}">{{ childPage.renderedFullTitle }}</a></h4>
  11. {% if childPage.childPages and childPage.childPages[0].page.documentType == "mapTopic" %}
  12. <ul class="list-style-none">
  13. {% for grandchildPage in childPage.childPages %}
  14. {% unless grandchildPage.page.hidden %}
  15. {% assign numArticles = childPage.childPages | obj_size %}
  16. <li class="mb-3 {% if forloop.index > maxArticles %}d-none{% endif %}">
  17. <a href="{{ grandchildPage.href }}">
  18. {{ grandchildPage.renderedFullTitle }}
  19. </a>
  20. </li>
  21. {% if numArticles > maxArticles %}
  22. <button class="js-all-articles-show-more btn-link Link--secondary">Show {{ numArticles | minus: maxArticles }} more {% octicon "chevron-up" class="v-align-text-bottom" %}</button>
  23. {% endif %}
  24. {% endunless %}
  25. {% endfor %}
  26. </ul>
  27. {% else %}
  28. <ul class="list-style-none">
  29. {% assign numArticles = childPage.childPages | obj_size %}
  30. {% for grandchildPage in childPage.childPages %}
  31. <li class="mb-3 {% if forloop.index > maxArticles %}d-none{% endif %}"><a href="{{ grandchildPage.href }}">{{ grandchildPage.renderedFullTitle }}</a></li>
  32. {% endfor %}
  33. </ul>
  34. {% if numArticles > maxArticles %}
  35. <button class="js-all-articles-show-more btn-link Link--secondary">Show {{ numArticles | minus: maxArticles }} more {% octicon "chevron-up" class="v-align-text-bottom" %}</button>
  36. {% endif %}
  37. {% endif %}
  38. </div>
  39. {% endunless %}
  40. {% endfor %}
  41. </div>
  42. </div>
  43. {% comment %}
  44. <small class="color-text-secondary d-inline-block">
  45. &bull; {{ article.childArticles | obj_size }} articles
  46. </small>
  47. {% endcomment %}
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...