catalog.template.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>{{PROJECT_NAME}} Design System</title>
  7. <script src="https://cdn.tailwindcss.com"></script>
  8. <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
  9. <style>
  10. body {
  11. font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  12. }
  13. .nav-sidebar {
  14. position: fixed;
  15. left: 0;
  16. top: 0;
  17. bottom: 0;
  18. width: 280px;
  19. background: white;
  20. border-right: 1px solid #e5e7eb;
  21. overflow-y: auto;
  22. z-index: 50;
  23. }
  24. .nav-content {
  25. padding: 2rem 1.5rem;
  26. }
  27. .nav-logo {
  28. margin-bottom: 2rem;
  29. padding-bottom: 1.5rem;
  30. border-bottom: 1px solid #e5e7eb;
  31. }
  32. .nav-section {
  33. margin-bottom: 1.5rem;
  34. }
  35. .nav-section-title {
  36. font-size: 0.75rem;
  37. font-weight: 600;
  38. text-transform: uppercase;
  39. letter-spacing: 0.05em;
  40. color: #6b7280;
  41. margin-bottom: 0.5rem;
  42. }
  43. .nav-list {
  44. list-style: none;
  45. padding: 0;
  46. margin: 0;
  47. }
  48. .nav-link {
  49. display: block;
  50. padding: 0.5rem 0.75rem;
  51. color: #374151;
  52. text-decoration: none;
  53. border-radius: 0.375rem;
  54. transition: all 0.15s;
  55. }
  56. .nav-link:hover {
  57. background: #f3f4f6;
  58. color: #111827;
  59. }
  60. .nav-link.active {
  61. background: #eff6ff;
  62. color: #2563eb;
  63. font-weight: 500;
  64. }
  65. .main-content {
  66. margin-left: 280px;
  67. padding: 3rem;
  68. min-height: 100vh;
  69. background: #f9fafb;
  70. }
  71. .component-card {
  72. background: white;
  73. border-radius: 0.5rem;
  74. border: 1px solid #e5e7eb;
  75. padding: 2rem;
  76. margin-bottom: 1.5rem;
  77. }
  78. .component-preview {
  79. background: #f9fafb;
  80. border: 1px solid #e5e7eb;
  81. border-radius: 0.375rem;
  82. padding: 2rem;
  83. margin: 1rem 0;
  84. }
  85. .code-block {
  86. background: #1f2937;
  87. color: #e5e7eb;
  88. border-radius: 0.375rem;
  89. padding: 1rem;
  90. overflow-x: auto;
  91. font-family: 'Fira Code', monospace;
  92. font-size: 0.875rem;
  93. margin: 1rem 0;
  94. }
  95. .variant-grid {
  96. display: grid;
  97. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  98. gap: 1rem;
  99. margin: 1rem 0;
  100. }
  101. .state-grid {
  102. display: grid;
  103. grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  104. gap: 1rem;
  105. margin: 1rem 0;
  106. }
  107. .token-swatch {
  108. height: 4rem;
  109. border-radius: 0.375rem;
  110. border: 1px solid #e5e7eb;
  111. }
  112. .version-badge {
  113. display: inline-block;
  114. padding: 0.25rem 0.75rem;
  115. background: #eff6ff;
  116. color: #2563eb;
  117. border-radius: 9999px;
  118. font-size: 0.75rem;
  119. font-weight: 500;
  120. }
  121. .usage-badge {
  122. display: inline-block;
  123. padding: 0.25rem 0.75rem;
  124. background: #f0fdf4;
  125. color: #16a34a;
  126. border-radius: 9999px;
  127. font-size: 0.75rem;
  128. font-weight: 500;
  129. }
  130. </style>
  131. </head>
  132. <body>
  133. <!-- Fixed Sidebar Navigation -->
  134. <aside class="nav-sidebar">
  135. <div class="nav-content">
  136. <div class="nav-logo">
  137. <div class="flex items-center space-x-2">
  138. <span class="text-2xl">{{PROJECT_ICON}}</span>
  139. <div>
  140. <div class="font-bold">{{PROJECT_NAME}}</div>
  141. <div class="text-xs text-gray-500">Design System</div>
  142. </div>
  143. </div>
  144. <div class="mt-2 text-xs text-gray-500">
  145. Last updated: {{LAST_UPDATED}}
  146. </div>
  147. </div>
  148. <nav>
  149. <div class="nav-section">
  150. <h4 class="nav-section-title">Overview</h4>
  151. <ul class="nav-list">
  152. <li><a href="#introduction" class="nav-link">Introduction</a></li>
  153. <li><a href="#getting-started" class="nav-link">Getting Started</a></li>
  154. </ul>
  155. </div>
  156. <div class="nav-section">
  157. <h4 class="nav-section-title">Foundation</h4>
  158. <ul class="nav-list">
  159. <li><a href="#design-tokens" class="nav-link">Design Tokens</a></li>
  160. <li><a href="#colors" class="nav-link">Colors</a></li>
  161. <li><a href="#typography" class="nav-link">Typography</a></li>
  162. <li><a href="#spacing" class="nav-link">Spacing</a></li>
  163. </ul>
  164. </div>
  165. {{COMPONENT_NAVIGATION}}
  166. <div class="nav-section">
  167. <h4 class="nav-section-title">Resources</h4>
  168. <ul class="nav-list">
  169. <li><a href="#changelog" class="nav-link">Changelog</a></li>
  170. <li><a href="#figma" class="nav-link">Figma Files</a></li>
  171. </ul>
  172. </div>
  173. </nav>
  174. </div>
  175. </aside>
  176. <!-- Main Content -->
  177. <div class="main-content">
  178. <div class="max-w-6xl mx-auto">
  179. <!-- Introduction -->
  180. <section id="introduction" class="mb-16" style="scroll-margin-top: 2rem;">
  181. <h1 class="text-5xl font-extrabold text-gray-900 mb-4">{{PROJECT_NAME}} Design System</h1>
  182. <p class="text-xl text-gray-600 mb-8">{{PROJECT_DESCRIPTION}}</p>
  183. <div class="component-card">
  184. <p class="text-gray-700 leading-relaxed mb-4">
  185. {{PROJECT_OVERVIEW}}
  186. </p>
  187. <div class="flex gap-2 flex-wrap">
  188. <span class="version-badge">Version {{VERSION}}</span>
  189. <span class="usage-badge">{{COMPONENT_COUNT}} Components</span>
  190. <span class="version-badge">Mode: {{DESIGN_SYSTEM_MODE}}</span>
  191. </div>
  192. <p class="text-sm text-gray-600 mt-4">
  193. <strong>Method:</strong> Whiteport Design Studio (WDS) • <strong>Created:</strong> {{CREATED_DATE}}
  194. </p>
  195. </div>
  196. </section>
  197. <!-- Getting Started -->
  198. <section id="getting-started" class="mb-16" style="scroll-margin-top: 2rem;">
  199. <h2 class="text-3xl font-bold text-gray-900 mb-6">Getting Started</h2>
  200. <div class="component-card">
  201. <h3 class="text-xl font-semibold mb-4">Installation</h3>
  202. <div class="code-block">
  203. <pre>{{INSTALLATION_INSTRUCTIONS}}</pre>
  204. </div>
  205. </div>
  206. <div class="component-card">
  207. <h3 class="text-xl font-semibold mb-4">Usage</h3>
  208. <p class="text-gray-700 mb-4">
  209. Import components from the design system:
  210. </p>
  211. <div class="code-block">
  212. <pre>{{USAGE_EXAMPLE}}</pre>
  213. </div>
  214. </div>
  215. </section>
  216. <!-- Design Tokens -->
  217. <section id="design-tokens" class="mb-16" style="scroll-margin-top: 2rem;">
  218. <h2 class="text-3xl font-bold text-gray-900 mb-6">Design Tokens</h2>
  219. <div class="component-card">
  220. <p class="text-gray-700 mb-4">
  221. Design tokens provide a consistent visual language across the application.
  222. All components use these tokens to ensure consistency and maintainability.
  223. </p>
  224. </div>
  225. {{DESIGN_TOKENS_CONTENT}}
  226. </section>
  227. <!-- Colors -->
  228. <section id="colors" class="mb-16" style="scroll-margin-top: 2rem;">
  229. <h2 class="text-3xl font-bold text-gray-900 mb-6">Colors</h2>
  230. {{COLOR_TOKENS}}
  231. </section>
  232. <!-- Typography -->
  233. <section id="typography" class="mb-16" style="scroll-margin-top: 2rem;">
  234. <h2 class="text-3xl font-bold text-gray-900 mb-6">Typography</h2>
  235. {{TYPOGRAPHY_TOKENS}}
  236. </section>
  237. <!-- Spacing -->
  238. <section id="spacing" class="mb-16" style="scroll-margin-top: 2rem;">
  239. <h2 class="text-3xl font-bold text-gray-900 mb-6">Spacing</h2>
  240. {{SPACING_TOKENS}}
  241. </section>
  242. <!-- Components -->
  243. {{COMPONENTS_CONTENT}}
  244. <!-- Changelog -->
  245. <section id="changelog" class="mb-16" style="scroll-margin-top: 2rem;">
  246. <h2 class="text-3xl font-bold text-gray-900 mb-6">Changelog</h2>
  247. <div class="component-card">
  248. <h3 class="text-lg font-semibold mb-4">Recent Updates</h3>
  249. {{CHANGELOG_CONTENT}}
  250. </div>
  251. </section>
  252. <!-- Figma -->
  253. <section id="figma" class="mb-16" style="scroll-margin-top: 2rem;">
  254. <h2 class="text-3xl font-bold text-gray-900 mb-6">Figma Files</h2>
  255. <div class="component-card">
  256. {{FIGMA_LINKS}}
  257. </div>
  258. </section>
  259. </div>
  260. </div>
  261. <script>
  262. // Smooth scrolling for navigation links
  263. document.querySelectorAll('.nav-link').forEach(link => {
  264. link.addEventListener('click', function(e) {
  265. e.preventDefault();
  266. const targetId = this.getAttribute('href').substring(1);
  267. const targetElement = document.getElementById(targetId);
  268. if (targetElement) {
  269. targetElement.scrollIntoView({ behavior: 'smooth' });
  270. // Update active state
  271. document.querySelectorAll('.nav-link').forEach(l => l.classList.remove('active'));
  272. this.classList.add('active');
  273. }
  274. });
  275. });
  276. // Update active nav link on scroll
  277. const sections = document.querySelectorAll('section[id]');
  278. const navLinks = document.querySelectorAll('.nav-link');
  279. window.addEventListener('scroll', () => {
  280. let current = '';
  281. sections.forEach(section => {
  282. const sectionTop = section.offsetTop;
  283. const sectionHeight = section.clientHeight;
  284. if (window.pageYOffset >= sectionTop - 100) {
  285. current = section.getAttribute('id');
  286. }
  287. });
  288. navLinks.forEach(link => {
  289. link.classList.remove('active');
  290. if (link.getAttribute('href') === `#${current}`) {
  291. link.classList.add('active');
  292. }
  293. });
  294. });
  295. // Interactive component demos
  296. function toggleState(button, componentId, state) {
  297. const component = document.getElementById(componentId);
  298. if (component) {
  299. // Remove all state classes
  300. component.className = component.className.replace(/state-\w+/g, '');
  301. // Add new state class
  302. component.classList.add(`state-${state}`);
  303. // Update button states
  304. button.parentElement.querySelectorAll('button').forEach(btn => {
  305. btn.classList.remove('bg-blue-500', 'text-white');
  306. btn.classList.add('bg-gray-200', 'text-gray-700');
  307. });
  308. button.classList.remove('bg-gray-200', 'text-gray-700');
  309. button.classList.add('bg-blue-500', 'text-white');
  310. }
  311. }
  312. </script>
  313. </body>
  314. </html>