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-specific-product.html 4.9 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
77
78
79
80
81
82
  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. {% assign product = siteTree[currentLanguage][currentVersion].products[currentProduct] %}
  8. {% include all-products-link %}
  9. <li title="{{product.title}}" class="sidebar-product mb-2">
  10. {% unless page.hidden %}
  11. <a href="{{product.href}}" class="pl-4 pr-5 pb-1 f4">{{ product.title }}</a>
  12. {% endunless %}
  13. </li>
  14. <li>
  15. <ul class="sidebar-categories list-style-none">
  16. {% for category in product.categories %}
  17. {% capture fullPathToCategory %}{{category[1].href}}{% endcapture %}
  18. <li class="sidebar-category py-1 {% if breadcrumbs.category.href == category[1].href %}active {% if currentPath == fullPathToCategory %}is-current-page {% endif %}{% endif %}{% if category[1].standalone %}standalone-category{% endif %}">
  19. {% if category[1].shortTitle %}{% assign categoryTitle = category[1].shortTitle %}{% else %}{% assign categoryTitle = category[1].title %}{% endif %}
  20. {% if category[1].standalone %}
  21. <a href="{{fullPathToCategory}}" class="pl-4 pr-2 py-2 f6 text-uppercase d-block flex-auto mr-3">{{ categoryTitle }}</a>
  22. {% else %}
  23. <details class="dropdown-withArrow details details-reset" {% if breadcrumbs.category.href == category[1].href or forloop.index < 4 %}open{% endif %}>
  24. <summary>
  25. <div class="d-flex flex-justify-between">
  26. <a href="{{fullPathToCategory}}" class="pl-4 pr-2 py-2 f6 text-uppercase d-block flex-auto mr-3">{{ categoryTitle }}</a>
  27. {% if breadcrumbs.category.href == category[1].href or 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 breadcrumbs.category.href == category[1].href or forloop.index < 4 %}
  35. {% if category[1].maptopics %}
  36. <ul class="sidebar-topics list-style-none position-relative">
  37. {% for maptopic in category[1].maptopics %}
  38. {% unless maptopic[1].hidden %}
  39. {% capture fullPathToMaptopic %}{{maptopic[1].href}}{% endcapture %}
  40. {% if maptopic[1].shortTitle %}{% assign maptopicTitle = maptopic[1].shortTitle %}{% else %}{% assign maptopicTitle = maptopic[1].title %}{% endif %}
  41. <li class="sidebar-maptopic {% if breadcrumbs.maptopic.href == maptopic[1].href %}active {% if currentPath == fullPathToMaptopic %}is-current-page{% endif %}{% endif %}">
  42. <a href="{{fullPathToMaptopic}}" class="pl-4 pr-5 py-2">{{ maptopicTitle }}</a>
  43. <ul class="sidebar-articles my-2">
  44. {% for article in maptopic[1].articles %}
  45. {% unless article[1].hidden %}
  46. {% capture fullPathToArticle %}{{article[1].href}}{% endcapture %}
  47. {% if article[1].shortTitle %}{% assign articleTitle = article[1].shortTitle %}{% else %}{% assign articleTitle = article[1].title %}{% endif %}
  48. <li class="sidebar-article {% if breadcrumbs.article.href == article[1].href %}active {% if currentPath == fullPathToArticle %}is-current-page{% endif %}{% endif %}">
  49. <a href="{{fullPathToArticle}}" class="pl-6 pr-5 py-1{% if forloop.last %} pb-2{% endif %}">{{ articleTitle }}</a>
  50. </li>
  51. {% endunless %}
  52. {% endfor %}
  53. </ul>
  54. </li>
  55. {% endunless %}
  56. {% endfor %}
  57. </ul>
  58. <!-- some categories have no maptopics, only articles -->
  59. {% else %}
  60. <ul class="sidebar-articles list-style-none">
  61. {% for article in category[1].articles %}
  62. {% unless article[1].hidden %}
  63. {% capture fullPathToArticle %}{{article[1].href}}{% endcapture %}
  64. {% if article[1].shortTitle %}{% assign articleTitle = article[1].shortTitle %}{% else %}{% assign articleTitle = article[1].title %}{% endif %}
  65. <li class="sidebar-article {% if breadcrumbs.article.href == article[1].href %}active {% if currentPath == fullPathToArticle %}is-current-page{% endif %}{% endif %}">
  66. <a href="{{fullPathToArticle}}" class="pl-4 pr-5 py-1{% if forloop.last %} pb-2{% endif %}">{{ articleTitle }}</a>
  67. </li>
  68. {% endunless %}
  69. {% endfor %}
  70. </ul>
  71. {% endif %}
  72. {% endif %}
  73. </details>
  74. </li>
  75. {% endfor %}
  76. </ul>
  77. </li>
Tip!

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

Comments

Loading...