-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
92 lines (91 loc) · 3.02 KB
/
main.js
File metadata and controls
92 lines (91 loc) · 3.02 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
window.$docsify = {
name: 'VR Escape Game',
repo: 'https://github.com/Timingmerkat83/VR-Escape-Game/blob/main/README.md',
auto2top: true,
loadSidebar: false,
autoHeader: true,
fallbackLanguages: ['en', 'fr'],
loadNavbar: false,
nativeEmoji: true,
subMaxLevel: 3,
copyCode: {
buttonText: 'Copy Code Snippet',
errorText: '⚠️ Copy Failed',
successText: '✅ Code Copied!',
},
search: {
maxAge: 86400000, // Cache search results for one day
paths: 'auto', // Enable automatic search paths
},
share: {
reddit: true,
linkedin: true,
facebook: false,
twitter: true,
whatsapp: true,
telegram: true,
},
plugins: [
// Lightbox plugin
function (hook, vm) {
hook.doneEach(() => {
import('https://gllmar.github.io/docsify-lightbox/docsify-lightbox.js').then(module => {
const images = document.querySelectorAll('img');
const lightbox = new module.default({
closeWithEsc: true,
captions: true
});
lightbox.initialize(images);
}).catch(err => console.error('Failed to load Lightbox plugin', err));
});
},
// WaveSurfer plugin
function (hook, vm) {
hook.doneEach(() => {
import('https://gllmar.github.io/docsify-wavesurfer-plugin/docsify-wavesurfer-plugin.js').then(module => {
module.initWaveSurfer({
barWidth: 3,
waveColor: '#3498db',
progressColor: '#2ecc71'
});
}).catch(err => console.error('Failed to load WaveSurfer plugin', err));
});
},
// Loading Spinner
function (hook) {
hook.beforeEach(() => {
document.body.classList.add('loading');
});
hook.doneEach(() => {
document.body.classList.remove('loading');
});
},
// Comments Plugin (if available)
function (hook, vm) {
hook.doneEach(() => {
// Add your comments integration here
// Example: load comments from Disqus or another service
});
},
],
themeColor: 'green',
logo: 'path/to/logo.png',
footer: {
text: '© 2024 VR Escape Game. All rights reserved.',
links: [
{ text: 'Privacy Policy', href: '/privacy' },
{ text: 'Terms of Service', href: '/terms' }
]
},
css: [
'https://style.css' // Link to your custom CSS
]
};
document.addEventListener('DOMContentLoaded', () => {
const toggleButton = document.createElement('button');
toggleButton.textContent = 'Toggle Dark Mode';
toggleButton.onclick = () => {
document.body.classList.toggle('dark-mode');
};
document.body.appendChild(toggleButton);
});