iiab-tools/apk/controller/app/src/main/assets/index.html

131 lines
4.4 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Safe Pocket Web</title>
<style>
/* Basic reset and background */
body {
margin: 0; padding: 0;
background-color: #F4F7F6;
font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
min-height: 100vh;
display: flex; flex-direction: column;
justify-content: center; align-items: center;
position: relative;
}
/* Header styles */
.top-header {
position: absolute;
top: 0; left: 0; width: 100%;
display: flex; align-items: center;
padding: 16px 20px;
box-sizing: border-box;
background-color: transparent;
}
.header-logo {
width: 48px;
height: 48px;
object-fit: contain;
}
.header-title {
flex-grow: 1;
text-align: center;
margin: 0;
font-size: 22px;
font-weight: 900;
color: #2C3E50;
padding-right: 48px;
}
/* Button container */
.menu-container {
width: 80%; display: flex;
flex-direction: column; gap: 20px;
margin-top: 60px;
}
/* Button styles */
.btn {
display: flex; align-items: center; justify-content: center;
padding: 18px; border-radius: 14px; text-decoration: none;
font-size: 20px; font-weight: bold;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
transition: transform 0.1s, box-shadow 0.1s;
}
.btn:active { transform: scale(0.96); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
/* App colors */
.btn-books { background-color: #00BCD4; color: #FFFFFF; }
.btn-kiwix { background-color: #FF9800; color: #FFFFFF; }
.btn-kolibri { background-color: #FFD54F; color: #333333; }
.btn-maps { background-color: #4CAF50; color: #FFFFFF; }
.btn-matomo { background-color: #1976D2; color: #FFFFFF; }
.btn span { margin-right: 12px; font-size: 26px; }
/* Spinner and Overlay styles */
#loadingOverlay {
display: none;
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background-color: rgba(244, 247, 246, 0.85);
z-index: 9999;
flex-direction: column; justify-content: center; align-items: center;
}
.spinner {
width: 50px; height: 50px;
border: 6px solid #E0E0E0;
border-top: 6px solid #1976D2;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text { margin-top: 15px; font-size: 18px; font-weight: bold; color: #333; }
</style>
</head>
<body>
<header class="top-header">
<img src="logo.svg" alt="IIAB Logo" class="header-logo">
<h1 class="header-title">Internet-in-a-Box<br />on Android</h1>
</header>
<div id="loadingOverlay">
<div class="spinner"></div>
<div class="loading-text" id="loadingText">Loading...</div>
</div>
<div class="menu-container">
<a href="http://box/books" class="btn btn-books"><span>📖</span> Books</a>
<a href="http://box/kiwix" class="btn btn-kiwix"><span>🥝</span> Kiwix</a>
<a href="http://box/kolibri" class="btn btn-kolibri"><span>📚</span> Kolibri</a>
<a href="http://box/maps" class="btn btn-maps"><span>🗺️</span> Maps</a>
<a href="http://box/matomo" class="btn btn-matomo"><span>📊</span> Matomo</a>
</div>
<script>
const overlay = document.getElementById('loadingOverlay');
const textLabel = document.getElementById('loadingText');
const buttons = document.querySelectorAll('.btn');
buttons.forEach(btn => {
btn.addEventListener('click', function(e) {
const appName = this.innerText.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, '').trim();
// Cambiado a Opening
textLabel.innerText = 'Opening ' + appName + '...';
overlay.style.display = 'flex';
});
});
window.addEventListener('pageshow', function(event) {
overlay.style.display = 'none';
});
</script>
</body>
</html>