|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en" class="w-full h-full"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | + <title>Galacean Playground</title> |
| 7 | + <link rel="icon" href="https://mdn.alipayobjects.com/huamei_dc3kgb/afts/img/A*yHe-TqU1TOkAAAAAAAAAAAAADuiaAQ/original" /> |
| 8 | + <script src="https://cdn.tailwindcss.com"></script> |
| 9 | + <script> |
| 10 | + tailwind.config = { |
| 11 | + theme: { |
| 12 | + extend: { |
| 13 | + colors: { |
| 14 | + 'galacean': { |
| 15 | + 50: '#f0f9ff', |
| 16 | + 100: '#e0f2fe', |
| 17 | + 500: '#0ea5e9', |
| 18 | + 600: '#0284c7', |
| 19 | + 700: '#0369a1', |
| 20 | + 900: '#0c4a6e' |
| 21 | + } |
| 22 | + }, |
| 23 | + fontFamily: { |
| 24 | + 'sans': ['Inter', 'system-ui', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'sans-serif'] |
| 25 | + } |
| 26 | + } |
| 27 | + } |
| 28 | + } |
| 29 | + </script> |
| 30 | + <style> |
| 31 | + /* Custom styles */ |
| 32 | + .search-input { |
| 33 | + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z' /%3e%3c/svg%3e"); |
| 34 | + background-position: 12px center; |
| 35 | + background-repeat: no-repeat; |
| 36 | + background-size: 16px 16px; |
| 37 | + } |
| 38 | + |
| 39 | + .item-list .hide { |
| 40 | + height: 0 !important; |
| 41 | + opacity: 0; |
| 42 | + overflow: hidden; |
| 43 | + } |
| 44 | + |
| 45 | + .item-list a.active { |
| 46 | + background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important; |
| 47 | + } |
| 48 | + |
| 49 | + .item-list a.active .demo-item { |
| 50 | + background: transparent !important; |
| 51 | + } |
| 52 | + |
| 53 | + .item-list a.active .demo-item span { |
| 54 | + color: white !important; |
| 55 | + } |
| 56 | + |
| 57 | + .item-list a.active .demo-item .w-2 { |
| 58 | + background-color: white !important; |
| 59 | + } |
| 60 | + |
| 61 | + .sidebar-gradient { |
| 62 | + background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); |
| 63 | + border-right: 1px solid #e2e8f0; |
| 64 | + } |
| 65 | + |
| 66 | + .category-title { |
| 67 | + background: linear-gradient(135deg, #64748b 0%, #475569 100%); |
| 68 | + -webkit-background-clip: text; |
| 69 | + -webkit-text-fill-color: transparent; |
| 70 | + background-clip: text; |
| 71 | + } |
| 72 | + |
| 73 | + .demo-item { |
| 74 | + transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); |
| 75 | + } |
| 76 | + |
| 77 | + .demo-item:hover { |
| 78 | + background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); |
| 79 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 80 | + } |
| 81 | + |
| 82 | + .fullscreen-btn { |
| 83 | + transition: all 0.2s ease; |
| 84 | + filter: grayscale(1); |
| 85 | + } |
| 86 | + |
| 87 | + .fullscreen-btn:hover { |
| 88 | + filter: grayscale(0); |
| 89 | + transform: scale(1.1); |
| 90 | + } |
| 91 | + </style> |
| 92 | + </head> |
| 93 | + <body class="m-0 w-full h-full overflow-hidden font-sans text-slate-800 bg-white antialiased"> |
| 94 | + <div class="flex h-full"> |
| 95 | + <div class="sidebar-gradient w-80 flex flex-col shadow-xl"> |
| 96 | + <div class="px-6 py-6 border-b border-slate-200/60"> |
| 97 | + <div class="flex items-center justify-between mb-6"> |
| 98 | + <a class="flex items-center space-x-3 text-slate-900 hover:text-galacean-600 transition-colors duration-200" |
| 99 | + href="https://galacean.antgroup.com/" target="Home"> |
| 100 | + <div class="w-8 h-8 rounded-lg bg-white flex items-center justify-center shadow-lg"> |
| 101 | + <img |
| 102 | + class="w-6 h-6" |
| 103 | + src="https://mdn.alipayobjects.com/huamei_qbugvr/afts/img/A*ppQsSphM7uUAAAAAAAAAAAAADtKFAQ/original" |
| 104 | + alt="Galacean Logo" |
| 105 | + /> |
| 106 | + </div> |
| 107 | + <div> |
| 108 | + <h1 class="text-lg font-semibold tracking-tight">Galacean</h1> |
| 109 | + <p class="text-xs text-slate-500 font-medium">Playground</p> |
| 110 | + </div> |
| 111 | + </a> |
| 112 | + |
| 113 | + <button |
| 114 | + id="fullScreen" |
| 115 | + class="fullscreen-btn w-9 h-9 rounded-lg bg-white border border-slate-200 flex items-center justify-center hover:bg-slate-50 hover:border-slate-300 shadow-sm" |
| 116 | + title="Open in fullscreen" |
| 117 | + > |
| 118 | + <img |
| 119 | + class="w-4 h-4" |
| 120 | + src="https://mdn.alipayobjects.com/huamei_dmxymu/afts/img/A*lmbpRpr9QugAAAAAAAAAAAAADuuHAQ/original" |
| 121 | + alt="Fullscreen" |
| 122 | + /> |
| 123 | + </button> |
| 124 | + </div> |
| 125 | + |
| 126 | + <div class="relative"> |
| 127 | + <input |
| 128 | + placeholder="Search examples..." |
| 129 | + class="search-input w-full pl-10 pr-4 py-3 bg-white border border-slate-200 rounded-xl text-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-galacean-500 focus:border-transparent shadow-sm transition-all duration-200" |
| 130 | + id="searchBar" |
| 131 | + autocorrect="off" |
| 132 | + autocapitalize="off" |
| 133 | + spellcheck="false" |
| 134 | + /> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + <div class="item-list flex-1 overflow-y-auto px-4 py-4" id="itemList"> |
| 138 | + </div> |
| 139 | + </div> |
| 140 | + |
| 141 | + <div class="flex-1 bg-slate-50"> |
| 142 | + <iframe |
| 143 | + id="iframe" |
| 144 | + allowfullscreen |
| 145 | + src="" |
| 146 | + frameborder="0" |
| 147 | + class="w-full h-full bg-white shadow-inner" |
| 148 | + ></iframe> |
| 149 | + </div> |
| 150 | + </div> |
| 151 | + |
| 152 | + <script type="module" src="./index.js"></script> |
| 153 | + </body> |
| 154 | +</html> |
0 commit comments