mirror of
https://github.com/soconnor0919/robot-plugins.git
synced 2025-12-12 23:24:43 -05:00
257 lines
14 KiB
HTML
257 lines
14 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>
|
|
<link rel="stylesheet" href="assets/style.css">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div id="loading" class="loading">Loading repository data...</div>
|
|
|
|
<div id="content" class="content hidden">
|
|
<header class="header">
|
|
<div class="header-content">
|
|
<img id="repoIcon" alt="Repository Icon" class="header-icon hidden">
|
|
<div class="header-text">
|
|
<h1 id="repoName" class="header-title"></h1>
|
|
<p id="repoDescription" class="header-description"></p>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<img id="repoBanner" class="banner hidden">
|
|
|
|
<main class="main">
|
|
<div class="stats">
|
|
<div class="stat">
|
|
<svg class="stat-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
|
|
<path d="M3.3 7l8.7 5 8.7-5"></path>
|
|
</svg>
|
|
<div class="stat-content">
|
|
<div class="stat-label">Available Plugins</div>
|
|
<div id="pluginCount" class="stat-value">0</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid">
|
|
<section class="card">
|
|
<h2 class="card-title">Author</h2>
|
|
<div class="card-content">
|
|
<div class="info-list">
|
|
<div class="info">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="12" cy="7" r="4"></circle>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Name</div>
|
|
<div id="authorName" class="info-value"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="authorOrgContainer" class="info hidden">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect>
|
|
<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Organization</div>
|
|
<div id="authorOrg" class="info-value"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="authorUrlContainer" class="info hidden">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Profile</div>
|
|
<a id="authorUrl" class="info-link" target="_blank">View Profile</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2 class="card-title">Compatibility</h2>
|
|
<div class="card-content">
|
|
<div class="info-list">
|
|
<div class="info-group">
|
|
<div class="info-group-header">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
|
|
<path d="m3.3 7 8.7 5 8.7-5"></path>
|
|
</svg>
|
|
<h3 class="info-group-title">HRIStudio</h3>
|
|
</div>
|
|
|
|
<div class="info">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M12 2v20"></path>
|
|
<path d="M2 12h20"></path>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Min Version</div>
|
|
<code id="hriMin" class="info-value"></code>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="hriRecommendedContainer" class="info hidden">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path>
|
|
<path d="m9 12 2 2 4-4"></path>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Recommended</div>
|
|
<code id="hriRecommended" class="info-value"></code>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="ros2Container" class="info-group hidden">
|
|
<div class="info-group-header">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<path d="M16.2 7.8c2.3 2.3 2.3 6.1 0 8.4"></path>
|
|
<path d="M7.8 7.8c-2.3 2.3-2.3 6.1 0 8.4"></path>
|
|
</svg>
|
|
<h3 class="info-group-title">ROS 2</h3>
|
|
</div>
|
|
|
|
<div class="info">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M8 2h8"></path>
|
|
<path d="M8 6h8"></path>
|
|
<path d="M8 10h8"></path>
|
|
<path d="M8 14h8"></path>
|
|
<path d="M8 18h8"></path>
|
|
<path d="M3 22h18"></path>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Distributions</div>
|
|
<div id="ros2Distributions" class="badge-list"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="ros2RecommendedContainer" class="info hidden">
|
|
<svg class="info-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path>
|
|
<path d="m9 12 2 2 4-4"></path>
|
|
</svg>
|
|
<div class="info-content">
|
|
<div class="info-label">Recommended</div>
|
|
<code id="ros2Recommended" class="info-value"></code>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<section class="card">
|
|
<h2 class="card-title">Tags</h2>
|
|
<div class="card-content">
|
|
<div id="tags" class="tag-list"></div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</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 secondary';
|
|
badge.textContent = dist;
|
|
badge.style.marginRight = '0.5rem';
|
|
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>
|
|
</script>
|
|
</body>
|
|
</html> |