-
Notifications
You must be signed in to change notification settings - Fork 147
Expand file tree
/
Copy pathindex.html
More file actions
146 lines (112 loc) · 5.18 KB
/
index.html
File metadata and controls
146 lines (112 loc) · 5.18 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
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OpenPlayground - Build, Share, Explore</title>
<link rel="icon" href="logo.jpg" type="image/x-icon">
<link rel="icon" href="logo.jpg" type="image/png">
<meta name="description"
content="A community-driven platform where developers showcase their creativity through interactive web projects">
<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@300;400;500;600;700;800&display=swap"
rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/remixicon@4.3.0/fonts/remixicon.css" rel="stylesheet">
<link rel="stylesheet" href="./css/responsive.css">
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/contributor-cards.css">
<link rel="stylesheet" href="./css/bookmarks.css">
<link rel="stylesheet" href="./css/deadline.css">
<link rel="stylesheet" href="./css/sandbox.css">
<link rel="stylesheet" href="./css/footer.css">
</head>
<body>
<!-- Apply saved theme immediately to prevent flash -->
<script>
(function () {
const savedTheme = localStorage.getItem('theme') || 'light';
document.documentElement.setAttribute('data-theme', savedTheme);
})();
</script>
<div id="header-placeholder"></div>
<div id="hero-placeholder"></div>
<!-- Projects Component Placeholder -->
<div id="hero-placeholder"></div>
<div id="projects-placeholder"></div>
<!-- Templates Component Placeholder -->
<div id="templates-placeholder"></div>
<div id="contribute-placeholder"></div>
<div id="footer-placeholder"></div>
<div id="chatbot-placeholder"></div>
<div id="deadline-modal-placeholder"></div>
<button id="scrollToTopBtn" class="scroll-top-btn" aria-label="Scroll to top">
<svg class="progress-ring" viewBox="0 0 48 48" width="100%" height="100%">
<circle class="progress-ring__circle" stroke="currentColor" stroke-width="3" fill="transparent" r="21"
cx="24" cy="24" />
</svg>
<i class="ri-arrow-up-line" aria-hidden="true"></i>
</button>
<script type="module" src="./js/core/notificationManager.js"></script>
<script type="module" src="./js/core/validationEngine.js"></script>
<script src="./js/bookmarks.js"></script>
<!-- Analytics Engine - Feature #1291 -->
<script src="./js/core/analyticsEngine.js" type="module"></script>
<script>
// Load analytics engine for non-module scripts
import('./js/core/analyticsEngine.js').then(module => {
window.analyticsEngine = module.analyticsEngine;
console.log('📊 Analytics Engine loaded');
}).catch(err => {
console.warn('Analytics engine not available:', err.message);
});
</script>
<script src="./js/chatbot.js"></script>
<script src="./js/components.js"></script>
<script type="module" src="./js/core/comparisonEngine.js"></script>
<script type="module" src="./js/core/sandboxEngine.js"></script>
<script src="./js/templates-loader.js"></script>
<!-- View Counter Feature - Issue #4459 -->
<script src="./js/viewCounter.js"></script>
<script>
// Function to set active nav link
function setActiveNavLink() {
// Get current URL or hash
const currentPath = window.location.pathname;
const currentHash = window.location.hash;
// Get all nav links
const navLinks = document.querySelectorAll('.nav-link');
// Remove active class from all links
navLinks.forEach(link => link.classList.remove('active'));
// Check for hash links (Projects, Contribute)
if (currentHash) {
const hashLink = document.querySelector(`.nav-link[href="${currentHash}"]`);
if (hashLink) {
hashLink.classList.add('active');
return;
}
}
// Check for page links
navLinks.forEach(link => {
if (link.getAttribute('href') === currentPath ||
(currentPath.includes('about') && link.getAttribute('href') === 'pages/about.html') ||
(currentPath.includes('bookmarks') && link.getAttribute('href') === 'pages/bookmarks.html')) {
link.classList.add('active');
}
});
}
// Run on page load
document.addEventListener('DOMContentLoaded', setActiveNavLink);
// Run on hash change (for Projects/Contribute sections)
window.addEventListener('hashchange', setActiveNavLink);
// Run on page load for sections
window.addEventListener('load', () => {
// If there's a hash on initial load
if (window.location.hash) {
setActiveNavLink();
}
});
</script>
<script type="module" src="./js/app.js"></script>
</body>
</html>