-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
61 lines (52 loc) · 2.69 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta charset="UTF-8" />
<title>Juncture</title>
<link href="https://v3.juncture-digital.org/images/favicon.svg" rel="icon" type="image/svg+xml"/>
<link href="https://v3.juncture-digital.org/images/favicon.png" rel="icon" type="image/png"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/themes/pure.css" />
<!-- <link rel="stylesheet" href="https://v3.juncture-digital.org/wc/dist/css/index.css" /> -->
<link rel="stylesheet" href="docs/custom.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Juncture',
logo: 'https://v3.juncture-digital.org/images/logo.svg',
homepage: '/docs/README.md',
auto2top: true,
alias: { '.*/_sidebar.md': '/docs/sidebar.md' },
loadSidebar: true,
routerMode: 'hash', // hash or history
};
</script>
<script src="https://v3.juncture-digital.org/wc/dist/js/index.js" type="module"></script>
<!-- Docsify -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script type="module">
let referrer = document.referrer ? new URL(document.referrer) : null
if (referrer?.host === 'github.com') {
console.log('Referrer:', referrer);
let [acct, repo, branch, ...path] = referrer.pathname.split('/').filter(pe => pe && pe !== 'blob' && pe !== 'tree')
path = path.join('/').replace(/\/(README|index)\.md$/,'').replace(/\.md$/,'')
branch = branch || 'main'
console.log(`acct: ${acct}, repo: ${repo}, branch: ${branch}, path: ${path}`);
let redirect = `https://v3.juncture-digital.org/${acct}/${repo}/${path}${branch !== 'main' ? `?ref=${branch}` : ''}`
location.href = redirect
}
// Close sidebar on desktop
function toggleSidebar() { document.body.classList.toggle('close') }
const isMobile = ('ontouchstart' in document.documentElement && /mobi/i.test(navigator.userAgent) )
if (!isMobile && (!location.hash || location.hash === '#/')) toggleSidebar()
window.addEventListener('popstate', (evt) => { if (location.hash !== '#/') document.body.classList.remove('close') }) // The URL changed...
window.config = { source: { owner:'rsnyder', repository: 'juncture', branch: 'main', dir: '/docs/' } }
setTimeout(() => {
if (location.href === 'https://v3.juncture-digital.org/#/') window.history.replaceState({}, null, 'https://v3.juncture-digital.org/') // Remove hash from root URL
}, 100)
</script>
</body>
</html>