182 lines
5.2 KiB
HTML
182 lines
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<meta name="theme-color" content="#2D5016" />
|
|
<meta name="description" content="Remote control application for GSPro golf simulator" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
<meta name="apple-mobile-web-app-title" content="GSPro Remote" />
|
|
|
|
<!-- PWA manifest -->
|
|
<link rel="manifest" href="/manifest.json" />
|
|
|
|
<!-- 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@300;400;500;600;700&display=swap" rel="stylesheet" />
|
|
|
|
<title>GSPro Remote</title>
|
|
|
|
<style>
|
|
/* Prevent text selection and touch highlighting for better mobile UX */
|
|
body {
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-touch-callout: none;
|
|
overscroll-behavior: none;
|
|
}
|
|
|
|
/* Allow text selection in specific areas if needed */
|
|
.selectable {
|
|
-webkit-user-select: text;
|
|
-moz-user-select: text;
|
|
-ms-user-select: text;
|
|
user-select: text;
|
|
}
|
|
|
|
/* Loading screen styles */
|
|
#loading-screen {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9999;
|
|
transition: opacity 0.3s ease-out;
|
|
}
|
|
|
|
#loading-screen.fade-out {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.loading-content {
|
|
text-align: center;
|
|
color: white;
|
|
}
|
|
|
|
.loading-logo {
|
|
width: 120px;
|
|
height: 120px;
|
|
margin: 0 auto 2rem;
|
|
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
|
|
border-radius: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 20px 40px rgba(34, 197, 94, 0.3);
|
|
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
.loading-logo svg {
|
|
width: 60px;
|
|
height: 60px;
|
|
fill: white;
|
|
}
|
|
|
|
.loading-title {
|
|
font-size: 1.875rem;
|
|
font-weight: 700;
|
|
margin-bottom: 0.5rem;
|
|
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.loading-subtitle {
|
|
font-size: 1rem;
|
|
color: #94a3b8;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid #1e293b;
|
|
border-top-color: #22c55e;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
opacity: 0.8;
|
|
transform: scale(0.95);
|
|
}
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-gray-900 text-white overflow-hidden">
|
|
<!-- Loading Screen -->
|
|
<div id="loading-screen">
|
|
<div class="loading-content">
|
|
<div class="loading-logo">
|
|
<!-- Golf flag icon -->
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6h-5.6z"/>
|
|
</svg>
|
|
</div>
|
|
<h1 class="loading-title">GSPro Remote</h1>
|
|
<p class="loading-subtitle">Connecting to GSPro...</p>
|
|
<div class="loading-spinner"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- React Root -->
|
|
<div id="root"></div>
|
|
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
|
|
<script>
|
|
// Remove loading screen when React app is ready
|
|
window.addEventListener('app-ready', function() {
|
|
const loadingScreen = document.getElementById('loading-screen');
|
|
if (loadingScreen) {
|
|
loadingScreen.classList.add('fade-out');
|
|
setTimeout(() => {
|
|
loadingScreen.style.display = 'none';
|
|
}, 300);
|
|
}
|
|
});
|
|
|
|
// Prevent pull-to-refresh on mobile
|
|
document.addEventListener('touchmove', function(e) {
|
|
if (e.touches.length > 1) {
|
|
e.preventDefault();
|
|
}
|
|
}, { passive: false });
|
|
|
|
// Handle viewport height on mobile devices
|
|
function setViewportHeight() {
|
|
const vh = window.innerHeight * 0.01;
|
|
document.documentElement.style.setProperty('--vh', `${vh}px`);
|
|
}
|
|
|
|
setViewportHeight();
|
|
window.addEventListener('resize', setViewportHeight);
|
|
window.addEventListener('orientationchange', setViewportHeight);
|
|
</script>
|
|
</body>
|
|
</html>
|