mirror of
https://github.com/soconnor0919/robot-plugins.git
synced 2025-12-12 23:24:43 -05:00
Optimize HTML and CSS with refined spacing, semantic markup, and consistent styling
This commit is contained in:
464
assets/style.css
464
assets/style.css
@@ -3,10 +3,10 @@
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Variables */
|
||||
:root {
|
||||
}
|
||||
|
||||
/* Variables */
|
||||
:root {
|
||||
/* Colors */
|
||||
--background: 200 30% 97%;
|
||||
--foreground: 200 50% 20%;
|
||||
@@ -17,7 +17,7 @@
|
||||
--muted: 200 30% 96%;
|
||||
--muted-foreground: 200 30% 40%;
|
||||
--border: 200 30% 90%;
|
||||
|
||||
|
||||
/* Spacing */
|
||||
--space-1: 0.25rem;
|
||||
--space-2: 0.5rem;
|
||||
@@ -28,165 +28,164 @@
|
||||
--space-8: 2rem;
|
||||
--space-10: 2.5rem;
|
||||
--space-12: 3rem;
|
||||
|
||||
|
||||
/* Radius */
|
||||
--radius-sm: 0.375rem;
|
||||
--radius-md: 0.5rem;
|
||||
--radius-lg: 0.75rem;
|
||||
|
||||
/* Container */
|
||||
|
||||
/* Container Width */
|
||||
--container-width: 64rem;
|
||||
}
|
||||
|
||||
/* Dark mode */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
}
|
||||
|
||||
/* Dark mode */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: 200 30% 8%;
|
||||
--foreground: 200 20% 96%;
|
||||
--card: 200 25% 15%;
|
||||
--card-foreground: 200 15% 85%;
|
||||
--primary: 200 70% 40%;
|
||||
--primary-foreground: 0 0% 100%;
|
||||
--muted: 200 30% 20%;
|
||||
--muted-foreground: 200 30% 65%;
|
||||
--border: 200 30% 20%;
|
||||
--background: 200 30% 8%;
|
||||
--foreground: 200 20% 96%;
|
||||
--card: 200 25% 15%;
|
||||
--card-foreground: 200 15% 85%;
|
||||
--primary: 200 70% 40%;
|
||||
--primary-foreground: 0 0% 100%;
|
||||
--muted: 200 30% 20%;
|
||||
--muted-foreground: 200 30% 65%;
|
||||
--border: 200 30% 20%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Base styles */
|
||||
html {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* Base styles */
|
||||
html {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
}
|
||||
|
||||
body {
|
||||
color: hsl(var(--foreground));
|
||||
background: hsl(var(--background));
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
/* Background */
|
||||
body::before {
|
||||
}
|
||||
|
||||
/* Background */
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -2;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
hsl(var(--background)),
|
||||
hsl(var(--primary) / 0.1),
|
||||
hsl(var(--background))
|
||||
to bottom,
|
||||
hsl(var(--background)),
|
||||
hsl(var(--primary) / 0.1),
|
||||
hsl(var(--background))
|
||||
);
|
||||
}
|
||||
|
||||
body::after {
|
||||
}
|
||||
|
||||
body::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
opacity: 0.35;
|
||||
background-image: radial-gradient(
|
||||
circle at 1px 1px,
|
||||
hsl(var(--primary) / 0.5) 1px,
|
||||
transparent 0
|
||||
circle at 1px 1px,
|
||||
hsl(var(--primary) / 0.5) 1px,
|
||||
transparent 0
|
||||
);
|
||||
background-size: 32px 32px;
|
||||
mask-image: linear-gradient(
|
||||
to bottom,
|
||||
transparent,
|
||||
black 10%,
|
||||
black 90%,
|
||||
transparent
|
||||
to bottom,
|
||||
transparent,
|
||||
black 10%,
|
||||
black 90%,
|
||||
transparent
|
||||
);
|
||||
}
|
||||
|
||||
/* Grid System */
|
||||
.container {
|
||||
}
|
||||
|
||||
/* Grid System */
|
||||
.container {
|
||||
width: min(var(--container-width), 100% - var(--space-8));
|
||||
margin-inline: auto;
|
||||
padding-block: var(--space-8);
|
||||
}
|
||||
|
||||
.grid {
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
|
||||
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
|
||||
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
|
||||
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
}
|
||||
|
||||
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
|
||||
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
|
||||
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
|
||||
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.grid-cols-2,
|
||||
.grid-cols-3,
|
||||
.grid-cols-4 {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Card Components */
|
||||
.card {
|
||||
}
|
||||
|
||||
/* Card Components */
|
||||
.card {
|
||||
position: relative;
|
||||
background: hsl(var(--card) / 0.5);
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: var(--space-6);
|
||||
border-bottom: 1px solid hsl(var(--border));
|
||||
}
|
||||
|
||||
.card-title {
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
}
|
||||
|
||||
.card-description {
|
||||
margin-top: var(--space-2);
|
||||
font-size: 0.875rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
}
|
||||
|
||||
.card-content {
|
||||
}
|
||||
|
||||
.card-content {
|
||||
padding: var(--space-6);
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
h1 {
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.025em;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.icon {
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
stroke: currentColor;
|
||||
@@ -194,10 +193,10 @@ h3 {
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
fill: none;
|
||||
}
|
||||
|
||||
/* Badges */
|
||||
.badge {
|
||||
}
|
||||
|
||||
/* Badges */
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 1.5rem;
|
||||
@@ -209,243 +208,104 @@ h3 {
|
||||
background: hsl(var(--primary));
|
||||
color: hsl(var(--primary-foreground));
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
background: hsl(var(--muted));
|
||||
color: hsl(var(--muted-foreground));
|
||||
}
|
||||
|
||||
/* Loading State */
|
||||
.loading {
|
||||
}
|
||||
|
||||
/* Loading State */
|
||||
.loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 20rem;
|
||||
font-size: 1rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
}
|
||||
|
||||
/* Utilities */
|
||||
.hidden {
|
||||
}
|
||||
|
||||
/* Utilities */
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.flex {
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.justify-between {
|
||||
}
|
||||
|
||||
.justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.gap-2 { gap: var(--space-2); }
|
||||
.gap-3 { gap: var(--space-3); }
|
||||
.gap-4 { gap: var(--space-4); }
|
||||
.gap-6 { gap: var(--space-6); }
|
||||
|
||||
.mb-2 { margin-bottom: var(--space-2); }
|
||||
.mb-4 { margin-bottom: var(--space-4); }
|
||||
.mb-6 { margin-bottom: var(--space-6); }
|
||||
.mb-8 { margin-bottom: var(--space-8); }
|
||||
|
||||
.mt-2 { margin-top: var(--space-2); }
|
||||
.mt-4 { margin-top: var(--space-4); }
|
||||
.mt-6 { margin-top: var(--space-6); }
|
||||
.mt-8 { margin-top: var(--space-8); }
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
}
|
||||
|
||||
.gap-2 { gap: var(--space-2); }
|
||||
.gap-3 { gap: var(--space-3); }
|
||||
.gap-4 { gap: var(--space-4); }
|
||||
.gap-6 { gap: var(--space-6); }
|
||||
|
||||
.mb-2 { margin-bottom: var(--space-2); }
|
||||
.mb-4 { margin-bottom: var(--space-4); }
|
||||
.mb-6 { margin-bottom: var(--space-6); }
|
||||
.mb-8 { margin-bottom: var(--space-8); }
|
||||
|
||||
.mt-2 { margin-top: var(--space-2); }
|
||||
.mt-4 { margin-top: var(--space-4); }
|
||||
.mt-6 { margin-top: var(--space-6); }
|
||||
.mt-8 { margin-top: var(--space-8); }
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
padding: 1.5rem 2rem;
|
||||
gap: var(--space-6);
|
||||
padding: var(--space-6) var(--space-8);
|
||||
background: hsl(var(--card) / 0.5);
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-radius: var(--radius-lg);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
border-radius: var(--radius-lg);
|
||||
object-fit: contain;
|
||||
background: hsl(var(--muted));
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.header-text {
|
||||
padding: var(--space-2);
|
||||
}
|
||||
|
||||
.header-text {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 1.875rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.025em;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.header-description {
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
.header-description {
|
||||
color: hsl(var(--muted-foreground));
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
/* Banner */
|
||||
.banner {
|
||||
}
|
||||
|
||||
/* Banner */
|
||||
.banner {
|
||||
width: 100%;
|
||||
height: 16rem;
|
||||
border-radius: var(--radius-lg);
|
||||
object-fit: cover;
|
||||
border: 1px solid hsl(var(--border));
|
||||
background: hsl(var(--muted));
|
||||
}
|
||||
|
||||
/* Stats */
|
||||
.stats {
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
}
|
||||
|
||||
.stat {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 1.5rem;
|
||||
background: hsl(var(--card) / 0.5);
|
||||
border: 1px solid hsl(var(--border));
|
||||
border-radius: var(--radius-lg);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.stat-icon {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
color: hsl(var(--primary));
|
||||
}
|
||||
|
||||
.stat-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.875rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Info Lists */
|
||||
.info-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.info-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.info-group:not(:last-child) {
|
||||
padding-bottom: 1.5rem;
|
||||
border-bottom: 1px solid hsl(var(--border));
|
||||
}
|
||||
|
||||
.info-group-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.info-group-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
flex-shrink: 0;
|
||||
margin-top: 0.125rem;
|
||||
}
|
||||
|
||||
.info-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 0.875rem;
|
||||
color: hsl(var(--muted-foreground));
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.info-link {
|
||||
color: hsl(var(--primary));
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.info-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Badges and Tags */
|
||||
.badge-list,
|
||||
.tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 1.5rem;
|
||||
padding: 0 0.75rem;
|
||||
border-radius: 9999px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
background: hsl(var(--muted));
|
||||
color: hsl(var(--muted-foreground));
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Code */
|
||||
code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
font-size: 0.875rem;
|
||||
background: hsl(var(--muted));
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: calc(var(--radius-lg) - 0.25rem);
|
||||
}
|
||||
}
|
||||
519
index.html
519
index.html
@@ -1,270 +1,267 @@
|
||||
<!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">
|
||||
<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="hidden">
|
||||
<!-- Header -->
|
||||
<div class="card mb-8">
|
||||
<div class="flex items-center gap-6 p-6">
|
||||
<img id="repoIcon" alt="Repository Icon" class="header-icon hidden">
|
||||
<div>
|
||||
<h1 id="repoName" class="card-title"></h1>
|
||||
<p id="repoDescription" class="card-description"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Stats -->
|
||||
<div class="grid grid-cols-1 mb-8">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Statistics</h2>
|
||||
<p class="card-description">Repository information and metrics</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="grid grid-cols-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Available Plugins</div>
|
||||
<div id="pluginCount" class="text-2xl font-semibold">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="grid grid-cols-2 gap-8 mb-8">
|
||||
<!-- Author Info -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Author</h2>
|
||||
<p class="card-description">Repository maintainer information</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Name</div>
|
||||
<div id="authorName" class="text-sm"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="authorOrgContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Organization</div>
|
||||
<div id="authorOrg" class="text-sm"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="authorUrlContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Profile</div>
|
||||
<a id="authorUrl" class="text-sm text-primary hover:underline" target="_blank">View Profile</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Compatibility -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Compatibility</h2>
|
||||
<p class="card-description">Version requirements and support</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="flex flex-col gap-6">
|
||||
<!-- HRIStudio -->
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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="text-base font-semibold">HRIStudio</h3>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M12 2v20"></path>
|
||||
<path d="M2 12h20"></path>
|
||||
</svg>
|
||||
<div>
|
||||
<div class="text-sm text-muted-foreground">Min Version</div>
|
||||
<code id="hriMin" class="text-sm"></code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="hriRecommendedContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Recommended</div>
|
||||
<code id="hriRecommended" class="text-sm"></code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ROS 2 -->
|
||||
<div id="ros2Container" class="flex flex-col gap-4 hidden">
|
||||
<div class="flex items-center gap-2">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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="text-base font-semibold">ROS 2</h3>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Distributions</div>
|
||||
<div id="ros2Distributions" class="flex flex-wrap gap-2 mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ros2RecommendedContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Recommended</div>
|
||||
<code id="ros2Recommended" class="text-sm"></code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tags -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Tags</h2>
|
||||
<p class="card-description">Repository categories and features</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div id="tags" class="flex flex-wrap gap-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<!-- Loading Spinner -->
|
||||
<div id="loading" class="loading">Loading repository data...</div>
|
||||
|
||||
<!-- Main Content (hidden until data loads) -->
|
||||
<div id="content" class="hidden">
|
||||
|
||||
<!-- Repository Header Card -->
|
||||
<div class="card mb-8">
|
||||
<div class="flex items-center gap-6 p-6">
|
||||
<img id="repoIcon" alt="Repository Icon" class="header-icon hidden"/>
|
||||
<div>
|
||||
<h1 id="repoName" class="card-title"></h1>
|
||||
<p id="repoDescription" class="card-description"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Statistics Card -->
|
||||
<div class="card mb-8">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Statistics</h2>
|
||||
<p class="card-description">Repository information and metrics</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="grid grid-cols-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Available Plugins</div>
|
||||
<div id="pluginCount" class="text-2xl font-semibold">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Additional stats can be added similarly if desired -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Repository Details Grid -->
|
||||
<div class="grid grid-cols-2 gap-8 mb-8">
|
||||
|
||||
<!-- Author Card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Author</h2>
|
||||
<p class="card-description">Repository maintainer information</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Name</div>
|
||||
<div id="authorName" class="text-sm"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="authorOrgContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Organization</div>
|
||||
<div id="authorOrg" class="text-sm"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="authorUrlContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Profile</div>
|
||||
<a id="authorUrl" class="text-sm text-primary hover:underline" target="_blank">View Profile</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Compatibility Card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Compatibility</h2>
|
||||
<p class="card-description">Version requirements and support</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="flex flex-col gap-6">
|
||||
<!-- HRIStudio Section -->
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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="text-base font-semibold">HRIStudio</h3>
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<path d="M12 2v20"></path>
|
||||
<path d="M2 12h20"></path>
|
||||
</svg>
|
||||
<div>
|
||||
<div class="text-sm text-muted-foreground">Min Version</div>
|
||||
<code id="hriMin" class="text-sm"></code>
|
||||
</div>
|
||||
</div>
|
||||
<div id="hriRecommendedContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Recommended</div>
|
||||
<code id="hriRecommended" class="text-sm"></code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ROS 2 Section -->
|
||||
<div id="ros2Container" class="flex flex-col gap-4 hidden">
|
||||
<div class="flex items-center gap-2">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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="text-base font-semibold">ROS 2</h3>
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Distributions</div>
|
||||
<div id="ros2Distributions" class="flex flex-wrap gap-2 mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ros2RecommendedContainer" class="flex items-center gap-4 hidden">
|
||||
<svg class="icon" viewBox="0 0 24 24">
|
||||
<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>
|
||||
<div class="text-sm text-muted-foreground">Recommended</div>
|
||||
<code id="ros2Recommended" class="text-sm"></code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tags Card -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title">Tags</h2>
|
||||
<p class="card-description">Repository categories and features</p>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div id="tags" class="flex flex-wrap gap-2"></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 = 'badge badge-secondary';
|
||||
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');
|
||||
}
|
||||
|
||||
// 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';
|
||||
}
|
||||
</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;
|
||||
}
|
||||
|
||||
// Load data when page loads
|
||||
loadRepositoryData();
|
||||
</script>
|
||||
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 = 'badge badge-secondary';
|
||||
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');
|
||||
}
|
||||
|
||||
// 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>
|
||||
</html>
|
||||
Reference in New Issue
Block a user