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

header.html 6.0 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
  1. <script>
  2. // Constants
  3. const THEME_LOCAL_STORAGE_NAME = 'dagshub-docs-theme-mode',
  4. THEME_ATTRIBUTE = 'data-md-color-scheme',
  5. DARK_THEME = 'slate',
  6. LIGHT_THEME = 'default';
  7. current_theme = localStorage.getItem(THEME_LOCAL_STORAGE_NAME);
  8. if (current_theme) {
  9. const attr = THEME_ATTRIBUTE;
  10. document
  11. .body
  12. .setAttribute(attr, current_theme);
  13. }
  14. $(document).ready(() => {
  15. const attr = THEME_ATTRIBUTE;
  16. let darkmode_toggle = document.getElementById("dark-mode-toggle")
  17. darkmode_toggle.addEventListener("click", function (e) {
  18. e.preventDefault();
  19. e.stopImmediatePropagation();
  20. let current_mode = document.body.getAttribute(attr);
  21. let next_mode = current_mode === DARK_THEME ? LIGHT_THEME : DARK_THEME;
  22. document.body.setAttribute(attr, next_mode);
  23. localStorage.setItem(THEME_LOCAL_STORAGE_NAME, next_mode);
  24. })
  25. // Dropdown handling functions
  26. $(".dropdown.md-tabs__item").hover(function(e) {
  27. $(this).children(".menu").slideToggle(100);
  28. })
  29. })
  30. </script>
  31. <!-- Application header -->
  32. <header class="md-header" data-md-component="header">
  33. <!-- Top-level navigation -->
  34. <nav class="md-header-nav md-grid" aria-label="{{ lang.t('header.title') }}">
  35. <!-- Button to toggle drawer -->
  36. <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer">
  37. {% include ".icons/material/menu" ~ ".svg" %}
  38. </label>
  39. <a href="/"
  40. title="{{ config.site_name }}"
  41. class="md-header-nav__button md-logo"
  42. aria-label="{{ config.site_name }}">
  43. <img src="{{ config.theme.logo | url }}" height="50"/>
  44. </a>
  45. <!-- Header title -->
  46. <div class="md-header-nav__title" data-md-component="title">
  47. <!-- Links -->
  48. <nav class="extra-links">
  49. <div class="md-grid">
  50. <div>
  51. <a class="md-tabs__item" href="/explore/repos/" title="Explore">Explore</a>
  52. <div class="md-tabs__item dropdown">
  53. Resources &nbsp;&nbsp;<i class="fas fa-angle-down"></i>
  54. <div class="menu">
  55. {% if page.title == "FAQ" %}
  56. <a class="item" href="/docs/" title="Docs">Docs</a>
  57. <a class="item active" href="/docs/faq" title="FAQ">FAQ</a>
  58. {% else %}
  59. <a class="item active" href="/docs/" title="Docs">Docs</a>
  60. <a class="item" href="/docs/faq" title="FAQ">FAQ</a>
  61. {% endif %}
  62. <a class="item" href="/blog" title="Blog">Blog</a>
  63. </div>
  64. </div>
  65. <div class="md-tabs__item dropdown">
  66. Company &nbsp;&nbsp;<i class="fas fa-angle-down"></i>
  67. <div class="menu">
  68. <a class="item" href="/about/" title="Our Story">Our Story</a>
  69. <a class="item" href="/careers/" title="Careers">Careers</a>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </nav>
  75. {% block site_name %}
  76. {% if config.site_name == page.title %}
  77. {{ config.site_name }}
  78. {% else %}
  79. <span class="md-header-nav__topic">
  80. {{ config.site_name }}
  81. </span>
  82. <span class="md-header-nav__topic">
  83. {{ page.title }}
  84. </span>
  85. {% endif %}
  86. {% endblock %}
  87. </div>
  88. <div class="discord">
  89. <a href="https://discord.com/invite/9gU36Y6" class="md-header-nav__button md-icon">
  90. <i class="fab fa-discord fa-3x"></i>
  91. </a>
  92. </div>
  93. <!-- Button to open search dialogue -->
  94. {% if "search" in config["plugins"] %}
  95. <label class="md-header-nav__button md-icon" for="__search">
  96. {% include ".icons/material/magnify.svg" %}
  97. </label>
  98. {% include "partials/search.html" %}
  99. {% endif %}
  100. <div class="md-tabs__item cta button signup">
  101. <a href="/user/sign_up">
  102. <i class="fas fa-user-plus"></i>
  103. &nbsp;&nbsp;Sign Up
  104. </a>
  105. </div>
  106. <div class="md-theme-toggle">
  107. <div class="toggle-dark-mode-btn">
  108. <div class="toggleWrapper" title="Toggle Dark Mode">
  109. <input type="checkbox" class="dn" id="dark-mode-toggle" title="Toggle Dark Mode" checked="checked">
  110. <label for="dark-mode-toggle" class="toggle">
  111. <span class="toggle__handler">
  112. <span class="crater crater--1"></span>
  113. <span class="crater crater--2"></span>
  114. <span class="crater crater--3"></span>
  115. </span>
  116. <span class="star star--1"></span>
  117. <span class="star star--2"></span>
  118. <span class="star star--3"></span>
  119. <span class="star star--4"></span>
  120. <span class="star star--5"></span>
  121. <span class="star star--6"></span>
  122. </label>
  123. </div>
  124. </div>
  125. </div>
  126. </nav>
  127. </header>
Tip!

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

Comments

Loading...