From abc7f655cc6a3363114e7b3b92f5382edecbbf60 Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Fri, 14 Feb 2025 10:49:38 -0500 Subject: [PATCH] Migrate to Tailwind CSS and refactor global styles --- assets/style.css | 506 ++++++++++++++++++++--------------------------- index.html | 461 ++++++++++++++++++++---------------------- 2 files changed, 430 insertions(+), 537 deletions(-) diff --git a/assets/style.css b/assets/style.css index 87cbf38..9ccce31 100644 --- a/assets/style.css +++ b/assets/style.css @@ -1,311 +1,241 @@ -/* Reset */ -*, *::before, *::after { - box-sizing: border-box; - margin: 0; - padding: 0; - } - - /* Variables */ - :root { - /* Colors */ +/* HRIStudio Design System */ +:root { + /* Light mode colors */ --background: 200 30% 97%; --foreground: 200 50% 20%; --card: 0 0% 100%; --card-foreground: 200 50% 20%; + --popover: 0 0% 100%; + --popover-foreground: 200 50% 20%; --primary: 200 85% 45%; --primary-foreground: 0 0% 100%; + --secondary: 200 30% 96%; + --secondary-foreground: 200 50% 20%; --muted: 200 30% 96%; --muted-foreground: 200 30% 40%; + --accent: 200 85% 45%; + --accent-foreground: 0 0% 100%; --border: 200 30% 90%; - - /* Spacing */ - --space-1: 0.25rem; - --space-2: 0.5rem; - --space-3: 0.75rem; - --space-4: 1rem; - --space-5: 1.25rem; - --space-6: 1.5rem; - --space-8: 2rem; - --space-10: 2.5rem; - --space-12: 3rem; - - /* Radius */ - --radius-sm: 0.375rem; - --radius-md: 0.5rem; - --radius-lg: 0.75rem; - - /* Container Width */ - --container-width: 64rem; - } - - /* 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%; - } - } - - /* Base styles */ - html { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + --radius: 0.5rem; +} + +[data-theme="dark"] { + --background: 200 30% 8%; + --foreground: 200 20% 96%; + --card: 200 25% 15%; + --card-foreground: 200 15% 85%; + --popover: 200 50% 8%; + --popover-foreground: 200 20% 96%; + --primary: 200 70% 40%; + --primary-foreground: 0 0% 100%; + --secondary: 200 30% 20%; + --secondary-foreground: 200 20% 96%; + --muted: 200 30% 20%; + --muted-foreground: 200 30% 65%; + --accent: 200 70% 40%; + --accent-foreground: 0 0% 100%; + --border: 200 30% 20%; +} + +/* Base styles */ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; - -webkit-text-size-adjust: 100%; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - } - - body { color: hsl(var(--foreground)); background: hsl(var(--background)); - min-height: 100vh; - position: relative; - isolation: isolate; - } - - /* 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)) - ); - } - - 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 - ); - background-size: 32px 32px; - mask-image: linear-gradient( - to bottom, - transparent, - black 10%, - black 90%, - transparent - ); - } - - /* Grid System */ - .container { - width: min(var(--container-width), 100% - var(--space-8)); - margin-inline: auto; - padding-block: var(--space-8); - } - - .grid { + transition: background-color 0.3s ease; +} + +/* Layout */ +.container { + max-width: 64rem; + margin: 0 auto; + padding: 1.5rem; +} + +.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-2, - .grid-cols-3, - .grid-cols-4 { - grid-template-columns: 1fr; - } - } - - /* Card Components */ - .card { - position: relative; - background: hsl(var(--card) / 0.5); + gap: 1.5rem; +} + +.grid-cols-2 { + grid-template-columns: repeat(2, 1fr); +} + +/* Components */ +.card { + background: hsl(var(--card)); border: 1px solid hsl(var(--border)); - border-radius: var(--radius-lg); - overflow: hidden; - backdrop-filter: blur(8px); - } - - .card-header { - padding: var(--space-6); - border-bottom: 1px solid hsl(var(--border)); - } - - .card-title { - font-size: 1.25rem; - font-weight: 600; - line-height: 1.2; - letter-spacing: -0.025em; - } - - .card-description { - margin-top: var(--space-2); - font-size: 0.875rem; - color: hsl(var(--muted-foreground)); - } - - .card-content { - padding: var(--space-6); - } - - /* Typography */ - h1 { - font-size: 2rem; - font-weight: 600; - line-height: 1.2; - letter-spacing: -0.025em; - } - - h2 { - font-size: 1.5rem; - font-weight: 600; - line-height: 1.2; - letter-spacing: -0.025em; - } - - h3 { - font-size: 1.25rem; - font-weight: 600; - line-height: 1.2; - letter-spacing: -0.025em; - } - - /* Icons */ - .icon { - width: 1.25rem; - height: 1.25rem; - stroke: currentColor; - stroke-width: 2; - stroke-linecap: round; - stroke-linejoin: round; - fill: none; - } - - /* Badges */ - .badge { - display: inline-flex; - align-items: center; - height: 1.5rem; - padding: 0 var(--space-3); - font-size: 0.75rem; - font-weight: 500; - line-height: 1; - border-radius: 9999px; - background: hsl(var(--primary)); - color: hsl(var(--primary-foreground)); - white-space: nowrap; - } - - .badge-secondary { - background: hsl(var(--muted)); - color: hsl(var(--muted-foreground)); - } - - /* Loading State */ - .loading { + border-radius: var(--radius); + padding: 1.5rem; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + transition: background-color 0.3s ease, border-color 0.3s ease; +} + +.header { display: flex; align-items: center; - justify-content: center; - min-height: 20rem; - font-size: 1rem; - color: hsl(var(--muted-foreground)); - } - - /* Utilities */ - .hidden { - display: none; - } - - .flex { - display: flex; - } - - .items-center { - align-items: center; - } - - .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 { - text-align: center; - margin-bottom: var(--space-4); - } - - .header-content { - display: inline-flex; - align-items: center; - 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 { + gap: 1rem; + margin-bottom: 1.5rem; +} + +.header img { width: 4rem; height: 4rem; - border-radius: var(--radius-lg); + border-radius: var(--radius); object-fit: contain; - background: hsl(var(--muted)); - padding: var(--space-2); - } - - .header-text { - text-align: left; - } - - .header-title { + background: hsl(var(--secondary)); + padding: 0.5rem; + transition: background-color 0.3s ease; +} + +.banner { + width: 100%; + height: 12rem; + border-radius: calc(var(--radius) + 0.25rem); + object-fit: cover; + margin-bottom: 1.5rem; + border: 1px solid hsl(var(--border)); + background: hsl(var(--secondary)); + transition: background-color 0.3s ease, border-color 0.3s ease; +} + +.title { font-size: 1.875rem; font-weight: 600; - line-height: 1.2; - letter-spacing: -0.025em; - margin-bottom: var(--space-2); - } - - .header-description { + margin-bottom: 0.25rem; + color: hsl(var(--foreground)); + transition: color 0.3s ease; +} + +.description { color: hsl(var(--muted-foreground)); - font-size: 1.125rem; - } - - /* Banner */ - .banner { - width: 100%; - height: 16rem; - border-radius: var(--radius-lg); - object-fit: cover; + margin-bottom: 1rem; + transition: color 0.3s ease; +} + +.badge { + display: inline-flex; + align-items: center; + padding: 0.25rem 0.75rem; + border-radius: 9999px; + font-size: 0.875rem; + font-weight: 500; + background: hsl(var(--primary) / 0.1); + color: hsl(var(--primary)); + margin: 0.25rem; + transition: background-color 0.3s ease, color 0.3s ease; +} + +.stat { + display: flex; + align-items: center; + gap: 0.5rem; + color: hsl(var(--muted-foreground)); + font-size: 0.875rem; + transition: color 0.3s ease; +} + +.tag { + display: inline-flex; + align-items: center; + padding: 0.25rem 0.75rem; + border-radius: 9999px; + font-size: 0.875rem; + background: hsl(var(--secondary)); + color: hsl(var(--secondary-foreground)); + margin: 0.25rem; + transition: background-color 0.3s ease, color 0.3s ease; +} + +code { + font-family: ui-monospace, monospace; + background: hsl(var(--secondary)); + padding: 0.25rem 0.5rem; + border-radius: calc(var(--radius) - 0.25rem); + font-size: 0.875rem; + transition: background-color 0.3s ease; +} + +h2 { + font-size: 1.25rem; + font-weight: 600; + margin-bottom: 1rem; + color: hsl(var(--foreground)); + transition: color 0.3s ease; +} + +h3 { + font-size: 1rem; + font-weight: 600; + margin-bottom: 0.5rem; + margin-top: 1rem; + color: hsl(var(--foreground)); + transition: color 0.3s ease; +} + +.content { + display: grid; + gap: 0.75rem; + color: hsl(var(--foreground)); + transition: color 0.3s ease; +} + +.content a { + color: hsl(var(--primary)); + text-decoration: none; + transition: color 0.3s ease; +} + +.content a:hover { + text-decoration: underline; +} + +/* Theme Toggle */ +.theme-toggle { + position: fixed; + top: 1rem; + right: 1rem; + padding: 0.5rem; + border-radius: var(--radius); + background: hsl(var(--card)); border: 1px solid hsl(var(--border)); - background: hsl(var(--muted)); - } \ No newline at end of file + color: hsl(var(--foreground)); + cursor: pointer; + transition: all 0.3s ease; +} + +.theme-toggle:hover { + background: hsl(var(--accent)); + color: hsl(var(--accent-foreground)); +} + +/* Loading state */ +#loading { + text-align: center; + padding: 3rem; + color: hsl(var(--muted-foreground)); + transition: color 0.3s ease; +} + +.hidden { + display: none; +} + +/* Responsive */ +@media (max-width: 768px) { + .grid-cols-2 { + grid-template-columns: 1fr; + } + + .theme-toggle { + top: auto; + bottom: 1rem; + } +} \ No newline at end of file diff --git a/index.html b/index.html index df29ec5..5f54f92 100644 --- a/index.html +++ b/index.html @@ -1,267 +1,230 @@ - - - HRIStudio Robot Plugins - + + + HRIStudio Robot Plugins + -
- -
Loading repository data...
- - -