forked from ShareX/xerahs.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfaq.html
More file actions
176 lines (152 loc) · 7.64 KB
/
faq.html
File metadata and controls
176 lines (152 loc) · 7.64 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
---
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FAQ - XerahS</title>
<meta name="description" content="Frequently asked questions about XerahS.">
<!-- Fonts -->
<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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<!-- Styles -->
<link rel="stylesheet" href="css/tokens.css">
<link rel="stylesheet" href="css/animations.css">
<link rel="stylesheet" href="css/components.css">
<link rel="stylesheet" href="css/layout.css">
<link rel="icon" href="../favicon.ico">
</head>
<body>
<!-- ═══════════════════════════════════════
BACKGROUND SYSTEM
═══════════════════════════════════════ -->
<div class="background-system">
<div class="gradient-base"></div>
<div class="noise-overlay"></div>
<div class="blob blob-primary"></div>
<div class="blob blob-secondary"></div>
<div class="blob blob-tertiary"></div>
<div class="blob blob-bottom"></div>
<div class="grid-overlay"></div>
</div>
<!-- ═══════════════════════════════════════
NAVIGATION
═══════════════════════════════════════ -->
{% include navbar.html %}
<main>
<!-- ═══════════════════════════════════════
FAQ HEADER
═══════════════════════════════════════ -->
<section class="page-header">
<div class="container">
<div class="page-header-content animate-on-scroll">
<h1 class="page-title gradient-text">FAQ</h1>
<p class="page-subtitle">Frequently asked questions about XerahS</p>
</div>
</div>
</section>
<!-- ═══════════════════════════════════════
FAQ CONTENT
═══════════════════════════════════════ -->
<section class="faq-section section-padding">
<div class="container container-narrow">
<div class="faq-container card">
<div class="spotlight"></div>
<div class="faq-content" id="faq-content">
<div class="faq-loading">
<i class="fa-solid fa-spinner fa-spin"></i>
<span>Loading FAQ...</span>
</div>
</div>
</div>
</div>
</section>
</main>
{% include footer.html %}
<!-- Marked.js for Markdown parsing -->
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<!-- ═══════════════════════════════════════
SCRIPTS
═══════════════════════════════════════ -->
<script>
// ─────────────────────────────────────────
// Scroll-triggered animations
// ─────────────────────────────────────────
const observerOptions = {
threshold: 0.15,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, observerOptions);
document.querySelectorAll('.animate-on-scroll').forEach(el => {
observer.observe(el);
});
// ─────────────────────────────────────────
// Mobile menu toggle
// ─────────────────────────────────────────
const navToggle = document.querySelector('.nav-toggle');
const navMobile = document.querySelector('.nav-mobile');
navToggle.addEventListener('click', () => {
const isActive = navToggle.classList.toggle('active');
navMobile.classList.toggle('active');
navToggle.setAttribute('aria-expanded', isActive);
});
// ─────────────────────────────────────────
// Theme toggle functionality
// ─────────────────────────────────────────
const themeToggles = document.querySelectorAll('.theme-toggle');
const html = document.documentElement;
function getPreferredTheme() {
const savedTheme = localStorage.getItem('theme');
if (savedTheme) return savedTheme;
return 'light'; // Default to light mode
}
function setTheme(theme) {
if (theme === 'light') {
html.setAttribute('data-theme', 'light');
} else {
html.removeAttribute('data-theme');
}
localStorage.setItem('theme', theme);
}
setTheme(getPreferredTheme());
themeToggles.forEach(toggle => {
toggle.addEventListener('click', () => {
const currentTheme = html.getAttribute('data-theme');
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
setTheme(newTheme);
});
});
// ─────────────────────────────────────────
// Fetch and render FAQ
// ─────────────────────────────────────────
const faqUrl = 'https://raw.githubusercontent.com/ShareX/XerahS/develop/FAQ.md';
const contentEl = document.getElementById('faq-content');
fetch(faqUrl)
.then(response => {
if (!response.ok) throw new Error('Failed to fetch');
return response.text();
})
.then(markdown => {
contentEl.innerHTML = marked.parse(markdown);
})
.catch(error => {
contentEl.innerHTML = `
<div class="error-message">
<i class="fa-solid fa-exclamation-circle"></i>
<span>Failed to load FAQ. <a href="https://github.com/ShareX/XerahS/blob/develop/FAQ.md" target="_blank">View on GitHub</a></span>
</div>
`;
});
</script>
</body>
</html>