- Remove default text from i18n spans to prevent double snowflake on main page - Add i18n support to admin page with language selector - Make admin panel title translatable This ensures the snowflake emoji only appears once as a clickable link, and the translated app name appears separately without its own snowflake. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
195 lines
10 KiB
HTML
195 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Great Lakes Ice Report Admin</title>
|
|
|
|
<!-- PWA Meta Tags -->
|
|
<meta name="description" content="Admin panel for Great Lakes Ice Report - manage winter road condition reports">
|
|
<meta name="theme-color" content="#2196F3">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
<meta name="apple-mobile-web-app-title" content="Ice Report Admin">
|
|
|
|
<!-- PWA Manifest -->
|
|
<link rel="manifest" href="/manifest.json">
|
|
|
|
<!-- Icons -->
|
|
<link rel="icon" type="image/svg+xml" href="/icons/favicon.svg">
|
|
<link rel="icon" type="image/x-icon" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIj4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLnNub3dmbGFrZSB7IGZpbGw6ICMyMTk2RjM7IH0KICAgICAgLmNlbnRlciB7IGZpbGw6ICMxOTc2RDI7IH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIAogIDxnIGNsYXNzPSJzbm93Zmxha2UiPgogICAgPHJlY3QgeD0iMTUiIHk9IjIiIHdpZHRoPSIyIiBoZWlnaHQ9IjI4IiAvPgogICAgPHJlY3QgeD0iMiIgeT0iMTUiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyIiAvPgogICAgPHJlY3QgeD0iMTUiIHk9IjIiIHdpZHRoPSIyIiBoZWlnaHQ9IjI4IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSAxNiAxNikiIC8+CiAgICA8cmVjdCB4PSIxNSIgeT0iMiIgd2lkdGg9IjIiIGhlaWdodD0iMjgiIHRyYW5zZm9ybT0icm90YXRlKC00NSAxNiAxNikiIC8+CiAgICA8cG9seWdvbiBwb2ludHM9IjE2LDIgMTQsNiAxOCw2IiAvPgogICAgPHBvbHlnb24gcG9pbnRzPSIxNiwzMCAxNCwyNiAxOCwyNiIgLz4KICAgIDxwb2x5Z29uIHBvaW50cz0iMiwxNiA2LDE0IDYsMTgiIC8+CiAgICA8cG9seWdvbiBwb2ludHM9IjMwLDE2IDI2LDE0IDI2LDE4IiAvPgogICAgPHBvbHlnb24gcG9pbnRzPSI2LjMsNi4zIDguNiw0IDkuOSw3LjciIHRyYW5zZm9ybT0icm90YXRlKDQ1IDE2IDE2KSIgLz4KICAgIDxwb2x5Z29uIHBvaW50cz0iMjUuNywyNS43IDIzLjQsMjggMjIuMSwyNC4zIiB0cmFuc2Zvcm09InJvdGF0ZSg0NSAxNiAxNikiIC8+CiAgICA8cG9seWdvbiBwb2ludHM9IjYuMywyNS43IDguNiwyOCA5LjksMjQuMyIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDE2IDE2KSIgLz4KICAgIDxwb2x5Z29uIHBvaW50cz0iMjUuNyw2LjMgMjMuNCw0IDIyLjEsNy43IiB0cmFuc2Zvcm09InJvdGF0ZSgtNDUgMTYgMTYpIiAvPgogIDwvZz4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIzIiBjbGFzcz0iY2VudGVyIiAvPgo8L3N2Zz4K">
|
|
|
|
<!-- Apple Touch Icons -->
|
|
<link rel="apple-touch-icon" sizes="152x152" href="/icons/icon-152.svg">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/icons/icon-192.svg">
|
|
<link rel="stylesheet" href="style.css">
|
|
<script>
|
|
// Apply theme immediately to prevent flash
|
|
(function() {
|
|
const savedTheme = localStorage.getItem('theme') || 'auto';
|
|
if (savedTheme === 'auto') {
|
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
document.documentElement.setAttribute('data-theme', prefersDark ? 'dark' : 'light');
|
|
} else {
|
|
document.documentElement.setAttribute('data-theme', savedTheme);
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<!-- Internationalization -->
|
|
<script src="i18n.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="admin-container">
|
|
<!-- Login Section -->
|
|
<div id="login-section" class="login-section">
|
|
<div class="login-header">
|
|
<h2>🔐 Admin Login</h2>
|
|
<a href="/" class="header-btn btn-home">🏠 Back to Homepage</a>
|
|
</div>
|
|
<form id="login-form">
|
|
<div class="form-group">
|
|
<label for="password">Admin Password:</label>
|
|
<input type="password" id="password" name="password" required>
|
|
</div>
|
|
<button type="submit">Login</button>
|
|
</form>
|
|
<div id="login-message" class="message"></div>
|
|
</div>
|
|
|
|
<!-- Admin Section -->
|
|
<div id="admin-section" class="admin-section">
|
|
<div class="admin-header">
|
|
<h1><a href="/" style="text-decoration: none; color: inherit;">❄️</a> <span data-i18n="admin.adminPanel"></span></h1>
|
|
<div class="header-buttons">
|
|
<div id="language-selector-container" class="language-selector-container" style="display: inline-block; margin-right: 10px;"></div>
|
|
<button id="theme-toggle" class="header-btn theme-toggle-admin" title="Toggle dark mode">
|
|
<span class="theme-icon">🌙</span>
|
|
</button>
|
|
<a href="/" class="header-btn btn-home">🏠 Homepage</a>
|
|
<button id="refresh-btn" class="header-btn btn-refresh">🔄 Refresh Data</button>
|
|
<button id="logout-btn" class="header-btn btn-logout">🚪 Logout</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stats">
|
|
<div class="stat-card">
|
|
<div class="stat-number" id="total-count">0</div>
|
|
<div>Total Reports</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number" id="active-count">0</div>
|
|
<div>Active (48hrs)</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number" id="expired-count">0</div>
|
|
<div>Expired</div>
|
|
</div>
|
|
<div class="stat-card">
|
|
<div class="stat-number" id="persistent-count">0</div>
|
|
<div>Persistent</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tab Navigation -->
|
|
<div class="tab-navigation">
|
|
<button class="tab-btn active" data-tab="locations">📍 Location Reports</button>
|
|
<button class="tab-btn" data-tab="profanity">🔒 Profanity Filter</button>
|
|
</div>
|
|
|
|
<!-- Locations Tab -->
|
|
<div id="locations-tab" class="tab-content active">
|
|
<div class="form-section">
|
|
<h3>All Location Reports</h3>
|
|
<table class="locations-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Status</th>
|
|
<th>Address</th>
|
|
<th>Description</th>
|
|
<th>Persistent</th>
|
|
<th>Reported</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="locations-tbody">
|
|
<tr>
|
|
<td colspan="7">Loading...</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Profanity Filter Tab -->
|
|
<div id="profanity-tab" class="tab-content">
|
|
<div class="form-section">
|
|
<h3>Custom Profanity Words</h3>
|
|
|
|
<!-- Add new word form -->
|
|
<div class="profanity-add-form">
|
|
<h4>Add Custom Word</h4>
|
|
<form id="add-profanity-form">
|
|
<div class="form-row">
|
|
<input type="text" id="new-word" placeholder="Enter word or phrase" required>
|
|
<select id="new-severity">
|
|
<option value="low">Low Severity</option>
|
|
<option value="medium" selected>Medium Severity</option>
|
|
<option value="high">High Severity</option>
|
|
</select>
|
|
<input type="text" id="new-category" placeholder="Category (optional)" value="custom">
|
|
<button type="submit">Add Word</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Test profanity filter -->
|
|
<div class="profanity-test-form">
|
|
<h4>Test Profanity Filter</h4>
|
|
<form id="test-profanity-form">
|
|
<div class="form-row">
|
|
<input type="text" id="test-text" placeholder="Enter text to test" required>
|
|
<button type="submit">Test Filter</button>
|
|
</div>
|
|
<div id="test-results" class="test-results"></div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Custom words table -->
|
|
<table class="locations-table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Word</th>
|
|
<th>Severity</th>
|
|
<th>Category</th>
|
|
<th>Added</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="profanity-tbody">
|
|
<tr>
|
|
<td colspan="6">Loading...</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
<p><strong>Safety Notice:</strong> This is a community tool for awareness. Stay safe and <a href="https://www.aclu.org/know-your-rights/immigrants-rights" target="_blank" rel="noopener noreferrer">know your rights</a>.</p>
|
|
<div class="disclaimer">
|
|
<small>This website is for informational purposes only. Verify information independently.
|
|
Reports are automatically deleted after 48 hours. • <a href="/privacy">Privacy Policy</a></small>
|
|
</div>
|
|
</footer>
|
|
|
|
<!-- Load shared theme utility -->
|
|
<script src="theme-utils.js"></script>
|
|
<script src="utils.js"></script>
|
|
<script src="admin.js"></script>
|
|
</body>
|
|
</html>
|