-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (83 loc) · 3.52 KB
/
index.html
File metadata and controls
96 lines (83 loc) · 3.52 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#33373B" />
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" href="/apple-touch-icon-iphone-60x60.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-ipad-76x76.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-iphone-retina-120x120.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-ipad-retina-152x152.png" />
<!-- Microsoft Tile -->
<meta name="msapplication-TileColor" content="#33373B" />
<meta name="msapplication-TileImage" content="/mstile-150x150.png" />
<title>String - App Launcher for Educators</title>
<!-- Google Analytics -->
<script>
// Only load Google Analytics if measurement ID is provided and not in development
(function() {
const measurementId = '%VITE_GA_MEASUREMENT_ID%';
const isProduction = '%MODE%' === 'production';
// Check if GA is enabled
const enableGA = '%VITE_ENABLE_GA%' === 'true';
// Skip if no measurement ID, disabled, or in development mode
if (!measurementId || measurementId === 'your-google-analytics-id' || !enableGA || !isProduction) {
console.log('Google Analytics: Skipped', {
hasId: !!measurementId,
enabled: enableGA,
production: isProduction
});
return;
}
// Load Google Analytics with error handling
try {
const script = document.createElement('script');
script.async = true;
script.src = `https://www.googletagmanager.com/gtag/js?id=${measurementId}`;
script.onerror = function() {
console.warn('Google Analytics: Script failed to load (blocked)');
};
document.head.appendChild(script);
// Initialize gtag with error handling
window.dataLayer = window.dataLayer || [];
function gtag(){
try {
dataLayer.push(arguments);
} catch (e) {
console.warn('Google Analytics: gtag call failed', e);
}
}
window.gtag = gtag;
gtag('js', new Date());
gtag('config', measurementId);
console.log('Google Analytics: Loaded with ID', measurementId);
} catch (error) {
console.warn('Google Analytics: Failed to initialize', error);
}
})();
</script>
</head>
<body>
<div id="root">
<!-- Loading fallback -->
<div style="display: flex; align-items: center; justify-content: center; min-height: 100vh; font-family: system-ui;">
<div style="text-align: center;">
<div style="width: 40px; height: 40px; border: 4px solid #f3f4f6; border-top: 4px solid #75f8cc; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px;"></div>
<div style="color: #6b7280;">Loading String...</div>
</div>
</div>
</div>
<style>
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>