mirror of
https://github.com/soconnor0919/robot-plugins.git
synced 2025-12-12 23:24:43 -05:00
288 lines
9.9 KiB
HTML
288 lines
9.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>HRIStudio Robot Plugins</title>
|
|
<style>
|
|
/* Base styles */
|
|
:root {
|
|
--primary: #0066cc;
|
|
--primary-light: #e6f0ff;
|
|
--text: #1a1a1a;
|
|
--text-muted: #666666;
|
|
--border: #e5e7eb;
|
|
--background: #f9fafb;
|
|
--card: #ffffff;
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
line-height: 1.5;
|
|
color: var(--text);
|
|
background: var(--background);
|
|
}
|
|
|
|
/* Layout */
|
|
.container {
|
|
max-width: 64rem;
|
|
margin: 0 auto;
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.grid-cols-2 {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
/* Components */
|
|
.card {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 0.5rem;
|
|
padding: 1.5rem;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.header img {
|
|
width: 4rem;
|
|
height: 4rem;
|
|
border-radius: 0.5rem;
|
|
object-fit: contain;
|
|
background: var(--primary-light);
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.banner {
|
|
width: 100%;
|
|
height: 12rem;
|
|
border-radius: 0.75rem;
|
|
object-fit: cover;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.title {
|
|
font-size: 1.875rem;
|
|
font-weight: 600;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.description {
|
|
color: var(--text-muted);
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 9999px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
background: var(--primary-light);
|
|
color: var(--primary);
|
|
}
|
|
|
|
.stat {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
color: var(--text-muted);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.tag {
|
|
display: inline-block;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 9999px;
|
|
font-size: 0.875rem;
|
|
background: var(--background);
|
|
color: var(--text-muted);
|
|
margin: 0.25rem;
|
|
}
|
|
|
|
code {
|
|
font-family: ui-monospace, monospace;
|
|
background: var(--background);
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.hidden { display: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div id="loading" class="text-center py-12">Loading repository data...</div>
|
|
<div id="content" class="hidden">
|
|
<!-- Header -->
|
|
<div class="header">
|
|
<img id="repoIcon" alt="Repository Icon" class="hidden">
|
|
<div>
|
|
<h1 id="repoName" class="title"></h1>
|
|
<p id="repoDescription" class="description"></p>
|
|
</div>
|
|
</div>
|
|
|
|
<img id="repoBanner" class="banner hidden">
|
|
|
|
<!-- Stats -->
|
|
<div class="card">
|
|
<div class="stat">
|
|
<span>Plugins:</span>
|
|
<span id="pluginCount"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Details -->
|
|
<div class="grid grid-cols-2">
|
|
<!-- Author Info -->
|
|
<div class="card">
|
|
<h2>Author</h2>
|
|
<div class="content">
|
|
<div>
|
|
<span>Name:</span>
|
|
<span id="authorName"></span>
|
|
</div>
|
|
<div id="authorOrgContainer" class="hidden">
|
|
<span>Organization:</span>
|
|
<span id="authorOrg"></span>
|
|
</div>
|
|
<div id="authorUrlContainer" class="hidden">
|
|
<a id="authorUrl" class="text-primary hover:underline" target="_blank">View Profile</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Compatibility -->
|
|
<div class="card">
|
|
<h2>Compatibility</h2>
|
|
<div>
|
|
<h3>HRIStudio</h3>
|
|
<div>
|
|
<span>Min Version:</span>
|
|
<code id="hriMin"></code>
|
|
</div>
|
|
<div id="hriRecommendedContainer" class="hidden">
|
|
<span>Recommended:</span>
|
|
<code id="hriRecommended"></code>
|
|
</div>
|
|
</div>
|
|
<div id="ros2Container" class="hidden">
|
|
<h3>ROS 2</h3>
|
|
<div id="ros2Distributions"></div>
|
|
<div id="ros2RecommendedContainer" class="hidden">
|
|
<span>Recommended:</span>
|
|
<code id="ros2Recommended"></code>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tags -->
|
|
<div class="card">
|
|
<h2>Tags</h2>
|
|
<div id="tags"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
async function loadRepositoryData() {
|
|
try {
|
|
const response = await fetch('repository.json');
|
|
const data = await response.json();
|
|
|
|
// Update page title
|
|
document.title = data.name;
|
|
|
|
// Update header
|
|
document.getElementById('repoName').textContent = data.name;
|
|
document.getElementById('repoDescription').textContent = data.description || '';
|
|
|
|
// Update stats
|
|
document.getElementById('pluginCount').textContent = data.stats?.plugins || 0;
|
|
|
|
// Update author info
|
|
document.getElementById('authorName').textContent = data.author.name;
|
|
if (data.author.organization) {
|
|
document.getElementById('authorOrgContainer').classList.remove('hidden');
|
|
document.getElementById('authorOrg').textContent = data.author.organization;
|
|
}
|
|
if (data.author.url) {
|
|
document.getElementById('authorUrlContainer').classList.remove('hidden');
|
|
document.getElementById('authorUrl').href = data.author.url;
|
|
}
|
|
|
|
// Update compatibility
|
|
document.getElementById('hriMin').textContent = data.compatibility.hristudio.min;
|
|
if (data.compatibility.hristudio.recommended) {
|
|
document.getElementById('hriRecommendedContainer').classList.remove('hidden');
|
|
document.getElementById('hriRecommended').textContent = data.compatibility.hristudio.recommended;
|
|
}
|
|
|
|
if (data.compatibility.ros2) {
|
|
document.getElementById('ros2Container').classList.remove('hidden');
|
|
const distributionsDiv = document.getElementById('ros2Distributions');
|
|
data.compatibility.ros2.distributions.forEach(dist => {
|
|
const badge = document.createElement('span');
|
|
badge.className = 'badge';
|
|
badge.textContent = dist;
|
|
distributionsDiv.appendChild(badge);
|
|
});
|
|
|
|
if (data.compatibility.ros2.recommended) {
|
|
document.getElementById('ros2RecommendedContainer').classList.remove('hidden');
|
|
document.getElementById('ros2Recommended').textContent = data.compatibility.ros2.recommended;
|
|
}
|
|
}
|
|
|
|
// Update tags
|
|
const tagsContainer = document.getElementById('tags');
|
|
data.tags.forEach(tag => {
|
|
const badge = document.createElement('span');
|
|
badge.className = 'tag';
|
|
badge.textContent = tag;
|
|
tagsContainer.appendChild(badge);
|
|
});
|
|
|
|
// Handle assets
|
|
if (data.assets?.icon) {
|
|
const iconImg = document.getElementById('repoIcon');
|
|
iconImg.src = data.assets.icon;
|
|
iconImg.classList.remove('hidden');
|
|
}
|
|
|
|
if (data.assets?.banner) {
|
|
const banner = document.getElementById('repoBanner');
|
|
banner.src = data.assets.banner;
|
|
banner.classList.remove('hidden');
|
|
}
|
|
|
|
// Show content
|
|
document.getElementById('loading').classList.add('hidden');
|
|
document.getElementById('content').classList.remove('hidden');
|
|
} catch (error) {
|
|
console.error('Error loading repository data:', error);
|
|
document.getElementById('loading').textContent = 'Error loading repository data';
|
|
}
|
|
}
|
|
|
|
// Load data when page loads
|
|
loadRepositoryData();
|
|
</script>
|
|
</body>
|
|
</html> |