-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharticle.html
More file actions
348 lines (299 loc) · 16.3 KB
/
article.html
File metadata and controls
348 lines (299 loc) · 16.3 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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
---
layout: null
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="page-title">Article - Lucid Computing</title>
<!-- Lucid Computing Design System 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=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body class="page-article">
<nav class="navbar">
<a href="index.html" class="nav-brand">
<img src="lucid-logo.svg" alt="Lucid Computing Logo" class="nav-logo">
<div class="nav-text">
<span>Lucid</span>
<span>Computing</span>
</div>
</a>
<!-- Hamburger Menu Toggle -->
<button class="nav-toggle" aria-label="Toggle navigation" aria-expanded="false">
<span class="nav-toggle-icon"></span>
</button>
<div class="nav-links">
<div class="nav-item-dropdown">
<a href="#" class="nav-link has-dropdown">Solutions</a>
<div class="dropdown-menu">
<a href="solutions/iso-42001-readiness.html" class="dropdown-link">ISO 42001 Readiness</a>
<a href="solutions/eu-ai-act-conformity.html" class="dropdown-link">EU AI Act Conformity</a>
<a href="solutions/hiring-fairness.html" class="dropdown-link">Hiring Fairness</a>
<a href="solutions/clean-data-copyright.html" class="dropdown-link">Clean Data & Copyright</a>
<a href="solutions/clinical-validation-fda.html" class="dropdown-link">Clinical Validation (FDA)</a>
<a href="solutions/sovereign-shield.html" class="dropdown-link">Sovereign Shield</a>
</div>
</div>
<div class="nav-item-dropdown">
<a href="#" class="nav-link has-dropdown">Industries</a>
<div class="dropdown-menu">
<a href="industries/finance.html" class="dropdown-link">Finance & Banking</a>
<a href="industries/healthcare.html" class="dropdown-link">Healthcare & Life Sciences</a>
<a href="industries/public-sector.html" class="dropdown-link">Public Sector & Government</a>
<a href="industries/cloud-providers.html" class="dropdown-link">Cloud & Infrastructure</a>
</div>
</div>
<a href="insights.html" class="nav-link active">Insights</a>
<a href="site/index.html" class="nav-link nav-link-highlight">Docs</a>
<a href="https://app.lucidcomputing.ai/login" class="nav-link">Log In</a>
<a href="index.html#cta" class="nav-link nav-cta-btn">Book a Demo</a>
</div>
</nav>
<a href="insights.html" class="back-btn">
< BACK</a>
<!-- Hero Image -->
<div class="hero-overlay" id="hero-container">
<div class="loader">Loading article...</div>
</div>
<!-- Article Container -->
<div class="article-container">
<!-- Table of Contents -->
<aside class="toc-sidebar" id="toc-sidebar">
<div class="toc-title">Table of Contents</div>
<ul class="toc-list" id="toc-list">
<!-- Generated dynamically -->
</ul>
</aside>
<!-- Article Content -->
<article class="article-content">
<header class="article-header" id="article-header">
<!-- Generated dynamically -->
</header>
<div class="article-body" id="article-body">
<!-- Generated dynamically -->
</div>
</article>
</div>
<!-- Jekyll-generated posts data -->
<script id="all-posts-data" type="application/json">
{% assign posts_data = site.data.processed_posts %}
{
"posts": {{ posts_data | jsonify }}
}
</script>
{% raw %}<script>
let currentPost = null;
async function loadArticle() {
try {
// Get slug from URL
const urlParams = new URLSearchParams(window.location.search);
const slug = urlParams.get('slug');
if (!slug) {
throw new Error('No article slug provided');
}
let posts = null;
// Try to get posts data from Jekyll-generated JSON first
const postsDataScript = document.getElementById('all-posts-data');
if (postsDataScript && postsDataScript.textContent.trim() && !postsDataScript.textContent.includes('{%')) {
try {
const data = JSON.parse(postsDataScript.textContent);
posts = data.posts || data;
} catch (e) {
console.warn('Jekyll data not available');
}
}
// Fallback: fetch JSON file directly
if (!posts || posts.length === 0) {
const paths = ['data/processed_posts.json', '_data/processed_posts.json'];
for (const path of paths) {
try {
const response = await fetch(path);
if (response.ok) {
posts = await response.json();
break;
}
} catch (e) {
continue;
}
}
}
if (!posts || posts.length === 0) {
throw new Error('Unable to load posts data');
}
// Find matching post
currentPost = Array.isArray(posts) ? posts.find(post => post.slug === slug) : null;
if (!currentPost) {
throw new Error('Article not found');
}
// Render article
renderArticle();
} catch (error) {
console.error('Error:', error);
document.getElementById('article-body').innerHTML =
'<div class="loader">Unable to load article. Please check the URL.</div>';
}
}
function renderArticle() {
// Update page title
document.getElementById('page-title').textContent = `${currentPost.title} - Lucid Computing`;
// Render hero image
const heroContainer = document.getElementById('hero-container');
heroContainer.innerHTML = `<img src="${currentPost.image}" alt="${currentPost.title}">`;
// Render article header
const primaryTag = currentPost.tags && currentPost.tags.length > 0 ? currentPost.tags[0] : 'Insight';
const headerHtml = `
<span class="article-category">${primaryTag}</span>
<h1 class="article-title">${currentPost.title}</h1>
<p class="article-subtitle">${currentPost.description}</p>
<div class="article-meta">
<div class="author-info">
<img src="https://ui-avatars.com/api/?name=${encodeURIComponent(currentPost.author)}&background=facc15&color=000&size=96"
alt="${currentPost.author}" class="author-avatar">
<div class="author-details">
<div class="author-name">${currentPost.author}</div>
<div class="author-role">CEO</div>
</div>
</div>
<span class="article-date">${currentPost.date}</span>
<div class="social-share">
<a href="https://wa.me/?text=${encodeURIComponent(currentPost.title + ' ' + window.location.href)}"
target="_blank" class="share-icon" title="Share on WhatsApp">📱</a>
<a href="https://twitter.com/intent/tweet?text=${encodeURIComponent(currentPost.title)}&url=${encodeURIComponent(window.location.href)}"
target="_blank" class="share-icon" title="Share on X">𝕏</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(window.location.href)}"
target="_blank" class="share-icon" title="Share on Facebook">f</a>
<button onclick="copyLink()" class="share-icon" title="Copy link">📋</button>
</div>
</div>
`;
document.getElementById('article-header').innerHTML = headerHtml;
// Render article body
document.getElementById('article-body').innerHTML = currentPost.content;
// Generate TOC
generateTOC();
// Setup scroll spy
setupScrollSpy();
}
function generateTOC() {
const articleBody = document.getElementById('article-body');
const headings = articleBody.querySelectorAll('h2, h3');
const tocList = document.getElementById('toc-list');
if (headings.length === 0) {
tocList.innerHTML = '<li class="toc-item"><span class="toc-link">No sections available</span></li>';
return;
}
const tocItems = Array.from(headings).map((heading, index) => {
const id = `section-${index}`;
heading.id = id;
const level = heading.tagName.toLowerCase();
const text = heading.textContent;
return `
<li class="toc-item toc-${level}">
<a href="#${id}" class="toc-link">${text}</a>
</li>
`;
});
tocList.innerHTML = tocItems.join('');
// Add smooth scroll behavior
document.querySelectorAll('.toc-link').forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault();
const targetId = link.getAttribute('href').substring(1);
const targetElement = document.getElementById(targetId);
if (targetElement) {
targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
});
}
function setupScrollSpy() {
const headings = document.querySelectorAll('.article-body h2, .article-body h3');
const tocLinks = document.querySelectorAll('.toc-link');
if (headings.length === 0) return;
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
tocLinks.forEach(link => link.classList.remove('active'));
const activeLink = document.querySelector(`.toc-link[href="#${entry.target.id}"]`);
if (activeLink) {
activeLink.classList.add('active');
}
}
});
}, {
rootMargin: '-100px 0px -66%',
threshold: 0
});
headings.forEach(heading => observer.observe(heading));
}
function copyLink() {
navigator.clipboard.writeText(window.location.href).then(() => {
alert('Link copied to clipboard!');
}).catch(err => {
console.error('Failed to copy link:', err);
});
}
// Initialize
document.addEventListener('DOMContentLoaded', loadArticle);
// Mobile Navigation Toggle
(function() {
const navToggle = document.querySelector('.nav-toggle');
const navLinks = document.querySelector('.nav-links');
if (!navToggle || !navLinks) return;
const overlay = document.createElement('div');
overlay.className = 'nav-overlay';
document.body.appendChild(overlay);
navToggle.addEventListener('click', function() {
const isOpen = navToggle.getAttribute('aria-expanded') === 'true';
navToggle.setAttribute('aria-expanded', !isOpen);
navLinks.classList.toggle('is-open');
overlay.classList.toggle('is-visible');
document.body.style.overflow = !isOpen ? 'hidden' : '';
});
overlay.addEventListener('click', function() {
navToggle.setAttribute('aria-expanded', 'false');
navLinks.classList.remove('is-open');
overlay.classList.remove('is-visible');
document.body.style.overflow = '';
});
const dropdowns = document.querySelectorAll('.nav-item-dropdown');
dropdowns.forEach(function(dropdown) {
const link = dropdown.querySelector('.nav-link.has-dropdown');
if (link) {
link.addEventListener('click', function(e) {
if (window.innerWidth <= 968) {
e.preventDefault();
dropdown.classList.toggle('is-open');
}
});
}
});
window.addEventListener('resize', function() {
if (window.innerWidth > 968) {
navToggle.setAttribute('aria-expanded', 'false');
navLinks.classList.remove('is-open');
overlay.classList.remove('is-visible');
document.body.style.overflow = '';
dropdowns.forEach(function(d) { d.classList.remove('is-open'); });
}
});
navLinks.querySelectorAll('a:not(.has-dropdown)').forEach(function(link) {
link.addEventListener('click', function() {
if (window.innerWidth <= 968) {
navToggle.setAttribute('aria-expanded', 'false');
navLinks.classList.remove('is-open');
overlay.classList.remove('is-visible');
document.body.style.overflow = '';
}
});
});
})();
</script>{% endraw %}
</body>
</html>