-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
151 lines (139 loc) · 5.84 KB
/
index.html
File metadata and controls
151 lines (139 loc) · 5.84 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>POL - E Voting System</title>
<meta name="description" content="POL - E Voting System" />
<meta name="author" content="POL" />
<link rel="icon" href="/lovable-uploads/3ca5b1dd-1848-4727-956f-fe8fecfba466.png" type="image/png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" as="style" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<link rel="preload" href="/lovable-uploads/f53a888e-e21a-4d86-88a7-24ffb3cd4809.png" as="image">
<link rel="preload" href="/lovable-uploads/c5eea3e9-3fb3-420a-8626-9a793454f77b.png" as="image">
<link rel="preload" href="/lovable-uploads/3ca5b1dd-1848-4727-956f-fe8fecfba466.png" as="image">
<meta property="og:title" content="POL - E Voting System" />
<meta property="og:description" content="POL - E Voting System" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://lovable.dev/opengraph-image-p98pqg.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@lovable_dev" />
<meta name="twitter:image" content="https://lovable.dev/opengraph-image-p98pqg.png" />
</head>
<body>
<div id="root">
<!-- Route-aware instant loading screen -->
<div id="instant-loader">
<!-- Landing page loader with branding -->
<div id="landing-loader" style="
min-height: 100vh;
background: linear-gradient(135deg, #dbeafe, #e0e7ff);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
transition: opacity 0.3s ease-out;
">
<div style="text-align: center; margin-bottom: 2rem;">
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;">
<img
src="/lovable-uploads/3ca5b1dd-1848-4727-956f-fe8fecfba466.png"
alt="POL-E Logo"
style="height: 48px; width: 48px; margin-right: 12px; border-radius: 8px; object-fit: cover;"
onerror="this.style.display='none'"
/>
<h1 style="
font-size: 2.25rem;
font-weight: 700;
color: #111827;
margin: 0;
line-height: 1;
">POL-E Voting System</h1>
</div>
<p style="color: #6b7280; font-size: 1.125rem; margin: 0;">
Secure, transparent, and efficient voting for educational institutions
</p>
</div>
<div style="
width: 40px;
height: 40px;
border: 3px solid #e5e7eb;
border-top: 3px solid #3b82f6;
border-radius: 50%;
animation: spin 1s linear infinite;
"></div>
</div>
<!-- Clean minimal loader for admin/auth pages -->
<div id="clean-loader" style="
min-height: 100vh;
background: #ffffff;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
transition: opacity 0.3s ease-out;
">
<div style="
width: 32px;
height: 32px;
border: 2px solid #e5e7eb;
border-top: 2px solid #6b7280;
border-radius: 50%;
animation: spin 1s linear infinite;
"></div>
</div>
</div>
<style>
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Hide loader when React loads */
body.react-loaded #instant-loader {
opacity: 0;
pointer-events: none;
}
</style>
</div>
<script type="module" src="/src/main.tsx" fetchpriority="high"></script>
<script>
// Route-aware loader logic
const currentPath = window.location.pathname;
const isAuthRoute = currentPath.startsWith('/admin') || currentPath.includes('/auth') || currentPath.includes('/login');
// Show appropriate loader based on route
if (isAuthRoute) {
document.getElementById('landing-loader').style.display = 'none';
document.getElementById('clean-loader').style.display = 'flex';
} else {
document.getElementById('landing-loader').style.display = 'flex';
document.getElementById('clean-loader').style.display = 'none';
}
// Hide loader when React content is ready - optimized timing
const hideLoader = () => {
if (document.querySelector('.min-h-screen')) {
document.body.classList.add('react-loaded');
setTimeout(() => {
const loader = document.getElementById('instant-loader');
if (loader) loader.remove();
}, 300);
}
};
// Multiple triggers for instant transition
document.addEventListener('DOMContentLoaded', () => {
// Check immediately and then repeatedly until React renders
const checkForReact = () => {
if (document.querySelector('.min-h-screen')) {
hideLoader();
} else {
setTimeout(checkForReact, 16); // Check every frame
}
};
checkForReact();
});
</script>
</body>
</html>