-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodern.html
More file actions
271 lines (253 loc) · 14.9 KB
/
Copy pathmodern.html
File metadata and controls
271 lines (253 loc) · 14.9 KB
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ page.title }}</title>
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:type" content="website" />
<meta property="og:image" content="{{ site.og | absolute_url }}" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
<meta name="color-scheme" content="light dark">
<meta name="referrer" content="strict-origin-when-cross-origin" />
{%- if page.robots -%}<meta name="robots" content="{{ page.robots }}" />{%- endif -%}
<meta name="keywords" content="{{ page.title }}" />
{%- if page.description == nil -%}<meta name="description" content="{{ page.title }}" />{%- else -%}<meta name="description" content="{{ page.description }}" />{%- endif -%}
<meta name="author" content="{{ site.architect }}" />
<link rel="icon" href="{{ site.icon | relative_url }}">
<link rel="stylesheet" href="{{ site.bs_css }}" integrity="{{ site.bs_cssi }}" crossorigin="anonymous">
<link rel="stylesheet" href="{{ site.bs_icons }}">
<link rel="stylesheet" type="text/css" href="{{ site.gd_color_css | relative_url }}">
<link rel="stylesheet" type="text/css" href="{{ site.gd_css | relative_url }}">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<script>
const getStoredTheme = () => localStorage.getItem('theme');
const setStoredTheme = theme => localStorage.setItem('theme', theme);
const getPreferredTheme = () => {
const storedTheme = getStoredTheme();
if (storedTheme) {
return storedTheme;
}
setStoredTheme('auto');
return 'auto';
};
const setTheme = theme => {
document.documentElement.setAttribute('data-bs-theme', (theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme));
document.dispatchEvent(new Event('themeChanged'));
};
setTheme(getPreferredTheme());
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
const storedTheme = getStoredTheme();
if (storedTheme !== 'light' && storedTheme !== 'dark') {
setTheme(getPreferredTheme());
}
});
</script>
<script defer src="{{ site.jquery }}"></script>
<script defer src="{{ site.bs_js }}" integrity="{{ site.bs_jsi }}" crossorigin="anonymous"></script>
<script defer src="{{ site.gd_js | relative_url }}"></script>
<script async src="{{ site.analytics }}"></script>
<link rel="preconnect" href="https://www.googletagmanager.com">
<base href="{{ '/' | relative_url }}">
</head>
{%- assign path = page.url | split: '/' -%}
{%- if path[1] == nil -%}{%- assign home = true -%}{%- endif -%}
{%- assign seg_key = path[1] | default: '' -%}
{%- assign seg_obj = site.data.gd.segments | where: 'url', seg_key | first -%}
{%- if seg_obj -%}
{%- assign segment = seg_obj.title -%}
{%- if seg_obj.parent -%}
{%- assign parent = seg_obj.parent -%}
{%- endif -%}
{%- else -%}
{%- assign segment = site.title -%}
{%- endif -%}
{%- assign gd = nil -%}
{%- if seg_key != '' -%}
{%- if site.data[seg_key] -%}
{%- assign gd_temp = site.data[seg_key] -%}
{%- if gd_temp.grandparent -%}{%- assign gd = gd_temp -%}
{%- elsif gd_temp[seg_key] and gd_temp[seg_key].grandparent -%}{%- assign gd = gd_temp[seg_key] -%}{%- endif -%}
{%- endif -%}
{%- if gd == nil -%}
{%- for data_file in site.data -%}
{%- assign sub_data = data_file[1] -%}
{%- if sub_data[seg_key] and sub_data[seg_key].grandparent -%}
{%- assign gd = sub_data[seg_key] -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- if gd -%}
{%- for item in gd.grandparent -%}
{%- if page.url contains item.url -%}
{%- assign child = item.subtree -%}
{%- if item.parent -%}
{%- assign segment = item.parent -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- unless parent -%}
{%- if seg_key == '' -%}
{%- assign parent = ' GoDarda' -%}
{%- else -%}
{%- assign parent = ' / ' | append: segment | append: ' / ' -%}
{%- endif -%}
{%- endunless -%}
<body>
{%- assign main_pages = "settings,shubhamrdarda,testapp,learn,tools" | split: ',' -%}
{%- if home or main_pages contains path[1] -%}{%- assign is_sidebar_page = false -%}
{%- else -%}{%- assign is_sidebar_page = true -%}{%- endif -%}
<nav class="navbar navbar-expand-md fixed-top">
<div class="container-fluid">
{%- unless is_sidebar_page -%}
<div class="navbar-brand" style="margin-left: 0px;">
<a {% unless home %}href=""{% endunless %}><img id="logo" alt="Logo" width="30" height="30" src="{{ site.icon | relative_url }}"></a>
<a id="fc-{{ path[1] }}"> {%- if path[1] != nil %}<i class="bi bi-chevron-compact-right"></i>{%- endif -%} {{ parent }} </a>
</div>
{%- else -%}
<div id="navbar-brand" class="navbar-brand">
{%- assign home_url = "" -%}
{%- assign learn_data = site.data.learn.learn | default: site.data.learn -%}
{%- assign tools_data = site.data.tools.tools | default: site.data.tools -%}
{%- assign learn_matches = learn_data.segments | where: "url", path[1] -%}
{%- assign tools_matches = tools_data.segments | where: "url", path[1] -%}
{%- if learn_matches.size > 0 -%}{%- assign home_url = "learn" -%}{%- elsif tools_matches.size > 0 -%}{%- assign home_url = "tools" -%}{%- else -%}{%- assign home_url = "/" -%}{%- endif -%}
<a href="{{ home_url | relative_url }}" aria-label="{{ site.title }}"><img id="logo" alt="{{ site.title }} Logo" width="30" height="30" src="{{ site.icon | relative_url }}"></a>
<a id="fc-{{ path[1] }}" href="{{ path[1] }}"><i class="bi bi-chevron-compact-right"></i> {{ parent }} <i class="bi bi-chevron-compact-right"></i></a>
{%- if path[2] != nil -%}
<a id="fc-{{ path[1] }}" href="{{ path[1] }}/{{ path[2] }}" class="d-inline-flex align-items-center"><span class="d-inline-block text-truncate" style="max-width: 20ch;">{{ child }}</span><i class="bi bi-chevron-compact-right ms-1"></i></a>
{%- endif -%}
</div>
<button id="lsidebar" class="navbar-toggler p-0" type="button" data-bs-toggle="leftsidebar" data-bs-target="#leftsidebar" aria-label="lsidebar"><span class="navbar-toggler-icon"></span></button>
<div id="leftsidebar" class="sidebar leftsidebar-collapse col-xs-3 col-sm-3 col-md-3 col-lg-3 col-xl-2 col-xxl-2">
{%- assign root_title = seg_obj.title | default: segment -%}
{%- assign root_url = seg_obj.url | default: path[1] -%}
{%- assign active_root = "" -%}
{%- if path[1] == root_url and path[2] == nil -%}{%- assign active_root = "sidebar-item-active" -%}{%- endif -%}
<a class="nav-link {{ active_root }} {{ path[1] }}" href="{{ root_url }}">{{ root_title }}</a>
{%- for item in gd.grandparent -%}
{%- assign active_item = "" -%}
{%- assign item_parts = item.url | split: '/' -%}
{%- if path[2] == item_parts[1] -%}{%- assign active_item = "sidebar-item-active" -%}{%- endif -%}
<a class="nav-link {{ active_item }} {{ path[1] }}" href="{{ item.url }}">{{ item.parent }}</a>
{%- endfor -%}
</div>
{%- endunless -%}
<a id="settings" href="settings" style="display: none; font-size: 20px;" class="ms-auto bi bi-gear{% if path[1] == 'settings' %} active{% endif %}"></a>
<button id="rsidebar" class="ms-auto navbar-toggler p-0" type="button" data-bs-toggle="rightsidebar" data-bs-target="#rightsidebar" aria-label="rsidebar" style="display: none;"><span class="navbar-toggler-icon"></span></button>
<div id="rightsidebar" class="rightsidebar-collapse navbar-collapse justify-content-end">
<ul class="navbar-nav mr-auto">
{%- if path[1] != nil -%}
<li class="nav-item"><a class="nav-link" href="{{ site.url }}"><i class="navsvg bi bi-house-heart"></i> Home</a></li>
{%- endif -%}
{%- if path[1] != "learn" -%}
<li class="nav-item"><a class="nav-link" href="learn"><i class="navsvg bi-journal-code"></i> Learn</a></li>
{%- endif -%}
{%- if path[1] != "tools" -%}
<li class="nav-item"><a class="nav-link" href="tools"><i class="navsvg bi bi-tools"></i> Tools</a></li>
{%- endif -%}
{%- if path[1] != "about" -%}
<li class="nav-item"><a class="nav-link" href="about"><i class="navsvg bi bi-info-circle"></i> About</a></li>
{%- endif -%}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="bd-theme" href="#" aria-expanded="false" data-bs-toggle="dropdown" aria-label="theme (dark)"><i class="bi bi-moon-stars me-2" id="bd-theme-icon"></i><span id="bd-theme-text">Theme</span></a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme" style="top: 45px;">
<li><button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="auto" aria-pressed="false"><i class="bi bi-circle-half me-2"></i>System Default</button></li>
<li><button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="true"><i class="bi bi-moon-stars me-2"></i>Dark</button></li>
<li><button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false"><i class="bi bi-sun me-2"></i>Light</button></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div data-bs-toggle="collapseall" class="d-flex flex-column flex-grow-1">
{%- if home -%}
{%- include search.html -%}
{%- endif -%}
{%- unless is_sidebar_page -%}
{%- if path[1] == "learn" or path[1] == "tools" or path[1] == "settings" -%}
<div class="jumbotron text-center">
<h3>{{ site.title }}</h3>
<h6 id="fc-{{ path[1] }}" style="padding-bottom: 5px;">{{ segment }}</h6>
{%- if path[2] == nil and path[1] != "settings" -%}{%- include search.html -%}{%- endif -%}
</div>
{%- endif -%}
<main class="flex-grow-1"><div class="container">{{ content }}</div></main>
{%- else -%}
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9 col-xl-10 col-xxl-10 ms-sm-auto px-md-4 jumbotron text-center">
<h3>{{ site.title }}</h3>
{%- assign tool_urls = site.data.tools.tools.segments | map: "url" -%}
{%- if tool_urls contains path[1] -%}<h6 id="fc-{{ path[1] }}">{{ page.title }}</h6>
{%- else -%}<h6 id="fc-{{ path[1] }}" style="padding-bottom: 5px;">{{ segment }}</h6>{%- endif -%}
{%- if path[2] == nil and path[1] != "settings" -%}{%- include search.html -%}{%- endif -%}
</div>
<main class="col-xs-12 col-sm-12 col-md-9 col-lg-9 col-xl-10 col-xxl-10 ms-sm-auto px-md-4 flex-grow-1" role="main">
<div class="container">
{{ content }}
{%- for parent in gd.grandparent -%}
{% if path[1] != "about" and path[2] == nil %}
<div class="board"><div class="boardtitle">{{ parent.parent }}</div>
{% for child in parent.children limit:4 %}<a class="card" href="{{ child.url }}">{{ child.title }}</a>{% endfor %}
{%- assign count = parent.children | size -%}
{%- if count >= 5 -%}<a class="card" href="{{ parent.url }}">Show More »</a>{%- endif -%}
</div>
{%- else -%}
{%- if path[1] != "about" and path[3] == nil -%}
{%- assign pu = parent.url | split: '/' -%}
{%- if pu[1] == path[2] -%}
<div class="board"><div class="boardtitle">{{ parent.parent }}</div>{%- for child in parent.children -%}<a class="card" href="{{ child.url }}">{{ child.title }}</a>{%- endfor -%}</div>
{%- endif -%}
{%- endif -%}{%- endif -%}{%- endfor -%}
{%- if path[1] != nil and path[1] != "about" -%}
{%- include comments.html -%}
{% include pagination.html %}
{%- endif -%}
</div>
</main>
{%- endunless -%}
{%- if is_sidebar_page -%}{%- assign footer_class = "col-xs-12 col-sm-12 col-md-9 col-lg-9 col-xl-10 col-xxl-10 ms-sm-auto footer-no-padding" -%}{%- else -%}{%- assign footer_class = "" -%}{%- endif -%}
<div class="{{ footer_class }}">{%- include footer_app.html -%}{%- include footer_web.html -%}</div>
</div>
<div id="global-action-pill">
<a href="{{ site.data.url.sponsor }}" target="_blank" rel="noopener noreferrer" title="Sponsor">
<i class="bi bi-suit-heart"></i>
</a>
<div></div>
<a id="pill-back-to-top" title="Back to Top">
<i class="bi bi-arrow-up-circle"></i>
</a>
<div></div>
<a id="pill-share-button" href="share:{{ site.url }}{{ page.url }}" title="Share">
<i class="bi bi-share"></i>
</a>
</div>
{%- if path[3] != nil -%}
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false"
aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel"><i class="bi bi-clipboard-heart"></i> Thank You</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p class="h6">Thank you for visiting GoDarda!</p>
<p>If you've found GoDarda helpful, please consider supporting our mission by starring our repo and following us. Your support helps us provide free, high-quality content for developers!</p>
</div>
<div class="modal-footer justify-content-center">
<a class="btn btn-sm btn-outline-secondary" href="{{ site.data.url.repo }}" title="GitHub Star" target="_blank" rel="noopener noreferrer"><i class="bi bi-star"></i> Star</a>
<a href="{{ site.data.url.linkedin }}" class="btn btn-sm btn-outline-secondary" title="LinkedIn" target="_blank" rel="noopener noreferrer"><i class="bi bi-linkedin"></i> LinkedIn</a>
</div>
</div>
</div>
</div>
{%- endif -%}
</body>
</html>