323 lines
9.0 KiB
HTML
323 lines
9.0 KiB
HTML
<!-- web/index.html -->
|
|
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Lost & Found System</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--primary: #2563eb;
|
|
--primary-dark: #1e40af;
|
|
--secondary: #64748b;
|
|
--success: #10b981;
|
|
--danger: #ef4444;
|
|
--warning: #f59e0b;
|
|
--light: #f8fafc;
|
|
--dark: #1e293b;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
width: 100%;
|
|
}
|
|
|
|
.hero {
|
|
background: white;
|
|
border-radius: 20px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.hero-header {
|
|
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
|
color: white;
|
|
padding: 60px 40px;
|
|
text-align: center;
|
|
}
|
|
|
|
.hero-header h1 {
|
|
font-size: 3rem;
|
|
margin-bottom: 10px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.hero-header p {
|
|
font-size: 1.2rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.hero-body {
|
|
padding: 50px 40px;
|
|
}
|
|
|
|
.features {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 30px;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.feature-card {
|
|
background: var(--light);
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
text-align: center;
|
|
transition: transform 0.3s, box-shadow 0.3s;
|
|
}
|
|
|
|
.feature-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
.feature-icon {
|
|
font-size: 3rem;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.feature-card h3 {
|
|
color: var(--dark);
|
|
margin-bottom: 10px;
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.feature-card p {
|
|
color: var(--secondary);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.cta-section {
|
|
text-align: center;
|
|
padding: 40px 0;
|
|
}
|
|
|
|
.cta-buttons {
|
|
display: flex;
|
|
gap: 20px;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.btn {
|
|
padding: 15px 40px;
|
|
border: none;
|
|
border-radius: 10px;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--primary);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--primary-dark);
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
|
|
}
|
|
|
|
.btn-outline {
|
|
background: transparent;
|
|
color: var(--primary);
|
|
border: 2px solid var(--primary);
|
|
}
|
|
|
|
.btn-outline:hover {
|
|
background: var(--primary);
|
|
color: white;
|
|
}
|
|
|
|
.stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 20px;
|
|
margin-top: 50px;
|
|
padding: 40px;
|
|
background: var(--light);
|
|
border-radius: 15px;
|
|
}
|
|
|
|
.stat-item {
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-number {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.stat-label {
|
|
color: var(--secondary);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.hero-header h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.hero-header p {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.hero-header, .hero-body {
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.features {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.cta-buttons {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.btn {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
padding: 30px;
|
|
color: white;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.footer p {
|
|
opacity: 0.8;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="hero">
|
|
<div class="hero-header">
|
|
<h1>🔍 Lost & Found System</h1>
|
|
<p>Sistem Manajemen Barang Hilang & Temuan Kampus</p>
|
|
</div>
|
|
|
|
<div class="hero-body">
|
|
<div class="features">
|
|
<div class="feature-card">
|
|
<div class="feature-icon">📢</div>
|
|
<h3>Lapor Kehilangan</h3>
|
|
<p>Laporkan barang yang hilang dengan mudah dan cepat</p>
|
|
</div>
|
|
|
|
<div class="feature-card">
|
|
<div class="feature-icon">📦</div>
|
|
<h3>Temukan Barang</h3>
|
|
<p>Cari barang temuanmu di database kami</p>
|
|
</div>
|
|
|
|
<div class="feature-card">
|
|
<div class="feature-icon">🤝</div>
|
|
<h3>Klaim Barang</h3>
|
|
<p>Proses klaim yang aman dengan verifikasi</p>
|
|
</div>
|
|
|
|
<div class="feature-card">
|
|
<div class="feature-icon">⚡</div>
|
|
<h3>Auto Matching</h3>
|
|
<p>Sistem otomatis mencocokkan barang hilang</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="cta-section">
|
|
<h2 style="margin-bottom: 30px; color: var(--dark);">Mulai Sekarang</h2>
|
|
<div class="cta-buttons">
|
|
<a href="/login" class="btn btn-primary">🔐 Login</a>
|
|
<a href="/register" class="btn btn-outline">📝 Register</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stats">
|
|
<div class="stat-item">
|
|
<div class="stat-number" id="totalItems">0</div>
|
|
<div class="stat-label">Barang Ditemukan</div>
|
|
</div>
|
|
<div class="stat-item">
|
|
<div class="stat-number" id="totalClaimed">0</div>
|
|
<div class="stat-label">Sudah Diklaim</div>
|
|
</div>
|
|
<div class="stat-item">
|
|
<div class="stat-number" id="totalUsers">0</div>
|
|
<div class="stat-label">Pengguna Terdaftar</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>© 2025 Lost & Found System. Built with Go & Love ❤️</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Animasi counter
|
|
function animateCounter(id, target) {
|
|
const element = document.getElementById(id);
|
|
let current = 0;
|
|
const increment = target / 50;
|
|
const timer = setInterval(() => {
|
|
current += increment;
|
|
if (current >= target) {
|
|
element.textContent = target;
|
|
clearInterval(timer);
|
|
} else {
|
|
element.textContent = Math.floor(current);
|
|
}
|
|
}, 30);
|
|
}
|
|
|
|
// Simulasi data (nanti akan diganti dengan API call ke backend)
|
|
window.addEventListener('load', () => {
|
|
animateCounter('totalItems', 127);
|
|
animateCounter('totalClaimed', 89);
|
|
animateCounter('totalUsers', 234);
|
|
});
|
|
|
|
// Uncomment ini ketika backend sudah siap
|
|
/*
|
|
async function fetchStats() {
|
|
try {
|
|
const response = await fetch('http://localhost:8080/stats');
|
|
const data = await response.json();
|
|
document.getElementById('totalItems').textContent = data.total_items;
|
|
document.getElementById('totalClaimed').textContent = data.total_claimed;
|
|
document.getElementById('totalUsers').textContent = data.total_users;
|
|
} catch (error) {
|
|
console.error('Error fetching stats:', error);
|
|
}
|
|
}
|
|
fetchStats();
|
|
*/
|
|
</script>
|
|
</body>
|
|
</html> |