static2api/frontend/index.html

110 lines
No EOL
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Static2API Frontend</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 1000px;
margin: 0 auto;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 20px;
}
h1 {
color: #333;
text-align: center;
margin-bottom: 30px;
}
.endpoints {
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.endpoint {
flex: 1;
min-width: 300px;
border: 1px solid #ddd;
border-radius: 6px;
padding: 15px;
}
.endpoint h2 {
margin-top: 0;
color: #2c3e50;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
}
pre {
background-color: #f8f9fa;
padding: 12px;
border-radius: 4px;
overflow-x: auto;
white-space: pre-wrap;
}
.loading {
text-align: center;
color: #666;
font-style: italic;
}
.example {
margin-top: 40px;
padding: 20px;
background-color: #f0f8ff;
border-radius: 6px;
border-left: 4px solid #4a90e2;
}
.example h2 {
margin-top: 0;
color: #2c3e50;
}
.location-list {
list-style-type: none;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.location-item {
background-color: #e8f4fd;
padding: 8px 15px;
border-radius: 20px;
border: 1px solid #c8e1fb;
font-size: 14px;
}
</style>
</head>
<body>
<div class="container">
<h1>Static2API Frontend</h1>
<div class="endpoints">
<div class="endpoint">
<h2>Root Endpoint</h2>
<div id="root-data" class="loading">Loading...</div>
</div>
<div class="endpoint">
<h2>Users API</h2>
<div id="users-data" class="loading">Loading...</div>
</div>
<div class="endpoint">
<h2>Contacts API</h2>
<div id="contacts-data" class="loading">Loading...</div>
</div>
</div>
<div class="example">
<h2>Example: Locations from Contacts</h2>
<p>This example extracts and displays all unique locations from the contacts data:</p>
<div id="locations-example" class="loading">Loading locations...</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>