-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
87 lines (85 loc) · 3.94 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<base href="" id="base-href">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Graph API Viewer</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/mobile.css"> <!-- Add this line -->
<link rel="shortcut icon" href="#" />
<script>
// Automatically detect and set correct base path
(function() {
const getBasePath = () => {
// For GitHub Pages
if (location.hostname.includes('github.io')) {
const repo = location.pathname.split('/')[1]; // Get repo name
return `/${repo}/`;
}
// For local development or other hosts
return '/';
};
document.getElementById('base-href').setAttribute('href', getBasePath());
// Store base path for use in main.js
window.__BASE_PATH__ = getBasePath();
})();
</script>
</head>
<body>
<div class="container-fluid">
<div class="row vh-100">
<!-- Add mobile menu toggle button -->
<button id="mobile-menu-toggle" class="d-md-none btn btn-link position-fixed">
<i class="bi bi-list"></i>
</button>
<!-- Add mobile-sidebar class to aside -->
<aside id="sidebar" class="p-0 mobile-sidebar">
<div class="sidebar">
<div class="sidebar-header d-flex align-items-center justify-content-between mb-2">
<div class="d-flex gap-2">
<button id="home-button" class="btn btn-link" title="Go to home">
<i class="bi bi-house-door"></i>
</button>
<a href="https://github.com/uniQuk/GraphAPI-Viewer"
class="btn btn-link"
title="View source on GitHub"
target="_blank"
rel="noopener noreferrer">
<i class="bi bi-github"></i>
</a>
<button id="theme-toggle" class="btn btn-link">
<i class="bi bi-sun-fill"></i>
</button>
</div>
</div>
<div class="version-selector mb-2">
<select id="version-select" class="form-select">
<option value="v1.0">Microsoft Graph v1.0</option>
<option value="beta">Microsoft Graph Beta</option>
</select>
</div>
<div id="categories-list">
<!-- Categories will be dynamically populated -->
</div>
</div>
</aside>
<main>
<div id="api-content">
<div class="text-center text-muted" id="empty-state">
<i class="bi bi-arrow-left-circle fs-1"></i>
<h4 class="mt-3">Select a category from the sidebar</h4>
</div>
<button class="btn btn-link btn-sm copy-tag" data-tag="${tag}" title="Copy link to section">
<i class="bi bi-link-45deg"></i>
</button>
</div>
</main>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>