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

sidebar-product.html 5.1 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
  1. <!--
  2. Styling note:
  3. Categories, Maptopics, and Articles list items get a class of `active` when they correspond to content
  4. hierarchy of the current page. If an item's URL is also the same as the current URL, the item
  5. also gets an `is-current-page` class.
  6. -->
  7. {% include all-products-link %}
  8. {% unless currentProductTree.page.hidden %}
  9. {% if currentProductTree.renderedShortTitle %}{% assign productTitle = currentProductTree.renderedShortTitle %}{% else %}{% assign productTitle = currentProductTree.renderedFullTitle %}{% endif %}
  10. <li title="" class="sidebar-product mb-2">
  11. <a href="{{currentProductTree.href}}" class="pl-4 pr-5 pb-1 f4 color-text-primary">{{ productTitle }}</a>
  12. </li>
  13. <li>
  14. <ul class="sidebar-categories list-style-none">
  15. {% for childPage in currentProductTree.childPages %}
  16. {% unless childPage.page.hidden %}
  17. {% if childPage.page.documentType == "article" %}{% assign standaloneCategory = true %}{% else %}{% assign standaloneCategory = false %}{% endif %}
  18. <li class="sidebar-category py-1 {% if currentPath contains childPage.href %}active {% if currentPath == childPage.href %}is-current-page {% endif %}{% endif %}{% if standaloneCategory %}standalone-category{% endif %}">
  19. {% if childPage.renderedShortTitle %}{% assign childTitle = childPage.renderedShortTitle %}{% else %}{% assign childTitle = childPage.renderedFullTitle %}{% endif %}
  20. {% if standaloneCategory %}
  21. <a href="{{childPage.href}}" class="pl-4 pr-2 py-2 f6 text-uppercase d-block flex-auto mr-3 color-text-primary">{{ childTitle }}</a>
  22. {% else %}
  23. <details class="dropdown-withArrow details details-reset" {% if currentPath contains childPage.href or forloop.index < 4 %}open{% endif %}>
  24. <summary>
  25. <div class="d-flex flex-justify-between">
  26. <a href="{{childPage.href}}" class="pl-4 pr-2 py-2 f6 text-uppercase d-block flex-auto mr-3 color-text-primary">{{ childTitle }}</a>
  27. {% if forloop.index < 4 %}
  28. <svg xmlns="http://www.w3.org/2000/svg" class="octicon flex-shrink-0 arrow mr-3" style="margin-top:7px" viewBox="0 0 16 16" width="16" height="16"> <path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></svg>
  29. {% endif %}
  30. </div>
  31. </summary>
  32. {% endif %}
  33. <!-- some categories have maptopics with child articles -->
  34. {% if currentPath contains childPage.href or forloop.index < 4 %}
  35. {% if childPage.childPages[0].page.documentType == "mapTopic" %}
  36. <ul class="sidebar-topics list-style-none position-relative">
  37. {% for grandchildPage in childPage.childPages %}
  38. {% if grandchildPage.renderedShortTitle %}{% assign grandchildTitle = grandchildPage.renderedShortTitle %}{% else %}{% assign grandchildTitle = grandchildPage.renderedFullTitle %}{% endif %}
  39. <li class="sidebar-maptopic {% if currentPath contains grandchildPage.href %}active {% if currentPath == grandchildPage.href %}is-current-page{% endif %}{% endif %}">
  40. <a href="{{grandchildPage.href}}" class="pl-4 pr-5 py-2 color-text-primary">{{ grandchildTitle }} </a>
  41. <ul class="sidebar-articles my-2">
  42. {% for greatgrandchildPage in grandchildPage.childPages %}
  43. {% if greatgrandchildPage.renderedShortTitle %}{% assign greatgrandchildTitle = greatgrandchildPage.renderedShortTitle %}{% else %}{% assign greatgrandchildTitle = greatgrandchildPage.renderedFullTitle %}{% endif %}
  44. <li class="sidebar-article {% if currentPath contains greatgrandchildPage.href %}active {% if currentPath == greatgrandchildPage.href %}is-current-page{% endif %}{% endif %}">
  45. <a href="{{greatgrandchildPage.href}}" class="pl-6 pl-4 pr-5 py-1{% if forloop.last %} pb-2{% endif %} color-text-primary">{{ greatgrandchildTitle }}</a>
  46. </li>
  47. {% endfor %}
  48. </ul>
  49. </li>
  50. {% endfor %}
  51. </ul>
  52. <!-- some categories have no maptopics, only articles -->
  53. {% elsif childPage.childPages[0].page.documentType == "article" %}
  54. <ul class="sidebar-articles list-style-none">
  55. {% for grandchildPage in childPage.childPages %}
  56. {% if grandchildPage.renderedShortTitle %}{% assign grandchildTitle = grandchildPage.renderedShortTitle %}{% else %}{% assign grandchildTitle = grandchildPage.renderedFullTitle %}{% endif %}
  57. <li class="sidebar-article {% if currentPath contains grandchildPage.href %}active {% if currentPath == grandchildPage.href %}is-current-page{% endif %}{% endif %}">
  58. <a href="{{grandchildPage.href}}" class="pl-6 pl-4 pr-5 py-1{% if forloop.last %} pb-2{% endif %} color-text-primary">{{ grandchildTitle }}</a>
  59. </li>
  60. {% endfor %}
  61. </ul>
  62. {% endif %}
  63. {% endif %}
  64. </details>
  65. </li>
  66. {% endunless %}
  67. {% endfor %}
  68. </ul>
  69. </li>
  70. {% endunless %}
Tip!

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

Comments

Loading...