|
| 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>Kore - Kubernetes IDE</title> |
| 7 | + <meta name="description" content="A lightweight, open-source Kubernetes IDE built with Tauri and Svelte"> |
| 8 | + <link rel="icon" type="image/png" href="icon.png"> |
| 9 | + <style> |
| 10 | + * { margin: 0; padding: 0; box-sizing: border-box; } |
| 11 | + :root { |
| 12 | + --bg: #0a0a0f; |
| 13 | + --text: #f0f0f5; |
| 14 | + --text-muted: #8888aa; |
| 15 | + --accent: #4285f4; |
| 16 | + --accent-hover: #5a9bff; |
| 17 | + } |
| 18 | + body { |
| 19 | + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 20 | + background: var(--bg); |
| 21 | + color: var(--text); |
| 22 | + min-height: 100vh; |
| 23 | + display: flex; |
| 24 | + flex-direction: column; |
| 25 | + align-items: center; |
| 26 | + justify-content: center; |
| 27 | + padding: 2rem; |
| 28 | + } |
| 29 | + .container { text-align: center; max-width: 400px; } |
| 30 | + .logo { |
| 31 | + width: 128px; |
| 32 | + height: 128px; |
| 33 | + margin-bottom: 1.5rem; |
| 34 | + filter: drop-shadow(0 4px 24px rgba(66, 133, 244, 0.3)); |
| 35 | + } |
| 36 | + h1 { |
| 37 | + font-size: 2.5rem; |
| 38 | + font-weight: 600; |
| 39 | + letter-spacing: -0.02em; |
| 40 | + margin-bottom: 0.5rem; |
| 41 | + } |
| 42 | + .tagline { |
| 43 | + color: var(--text-muted); |
| 44 | + font-size: 1rem; |
| 45 | + margin-bottom: 2rem; |
| 46 | + } |
| 47 | + .version { |
| 48 | + display: inline-block; |
| 49 | + background: rgba(66, 133, 244, 0.15); |
| 50 | + color: var(--accent); |
| 51 | + padding: 0.35rem 0.75rem; |
| 52 | + border-radius: 9999px; |
| 53 | + font-size: 0.875rem; |
| 54 | + font-weight: 500; |
| 55 | + margin-bottom: 1.5rem; |
| 56 | + } |
| 57 | + .download-btn { |
| 58 | + display: inline-flex; |
| 59 | + align-items: center; |
| 60 | + gap: 0.5rem; |
| 61 | + background: var(--accent); |
| 62 | + color: white; |
| 63 | + text-decoration: none; |
| 64 | + padding: 0.875rem 1.75rem; |
| 65 | + border-radius: 8px; |
| 66 | + font-size: 1rem; |
| 67 | + font-weight: 500; |
| 68 | + transition: background 0.15s, transform 0.15s; |
| 69 | + } |
| 70 | + .download-btn:hover { |
| 71 | + background: var(--accent-hover); |
| 72 | + transform: translateY(-1px); |
| 73 | + } |
| 74 | + .download-btn svg { width: 18px; height: 18px; } |
| 75 | + .platform { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.75rem; } |
| 76 | + .links { margin-top: 3rem; display: flex; gap: 1.5rem; justify-content: center; } |
| 77 | + .links a { |
| 78 | + color: var(--text-muted); |
| 79 | + text-decoration: none; |
| 80 | + font-size: 0.875rem; |
| 81 | + transition: color 0.15s; |
| 82 | + } |
| 83 | + .links a:hover { color: var(--text); } |
| 84 | + .loading { opacity: 0.5; } |
| 85 | + </style> |
| 86 | +</head> |
| 87 | +<body> |
| 88 | + <div class="container"> |
| 89 | + <img src="icon.png" alt="Kore" class="logo"> |
| 90 | + <h1>Kore</h1> |
| 91 | + <p class="tagline">Kubernetes IDE</p> |
| 92 | + <div class="version loading" id="version">Loading...</div> |
| 93 | + <a href="#" class="download-btn" id="download-btn"> |
| 94 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> |
| 95 | + <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/> |
| 96 | + <polyline points="7 10 12 15 17 10"/> |
| 97 | + <line x1="12" y1="15" x2="12" y2="3"/> |
| 98 | + </svg> |
| 99 | + <span id="download-text">Download</span> |
| 100 | + </a> |
| 101 | + <p class="platform" id="platform"></p> |
| 102 | + <div class="links"> |
| 103 | + <a href="https://github.com/DEVtheOPS/kore">GitHub</a> |
| 104 | + <a href="https://github.com/DEVtheOPS/kore/releases">All Releases</a> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + <script> |
| 108 | + const REPO = 'DEVtheOPS/kore'; |
| 109 | + function detectPlatform() { |
| 110 | + const ua = navigator.userAgent.toLowerCase(); |
| 111 | + if (ua.includes('mac')) return { os: 'macos', arch: ua.includes('arm') ? 'aarch64' : 'x86_64' }; |
| 112 | + if (ua.includes('win')) return { os: 'windows', arch: 'x86_64' }; |
| 113 | + if (ua.includes('linux')) return { os: 'linux', arch: 'x86_64' }; |
| 114 | + return null; |
| 115 | + } |
| 116 | + function getPlatformKey(p) { |
| 117 | + if (!p) return null; |
| 118 | + if (p.os === 'macos') return `darwin-${p.arch}`; |
| 119 | + if (p.os === 'windows') return 'windows-x86_64'; |
| 120 | + if (p.os === 'linux') return 'linux-x86_64'; |
| 121 | + return null; |
| 122 | + } |
| 123 | + function getPlatformLabel(p) { |
| 124 | + if (!p) return ''; |
| 125 | + const labels = { 'macos-aarch64': 'macOS (Apple Silicon)', 'macos-x86_64': 'macOS (Intel)', 'windows-x86_64': 'Windows', 'linux-x86_64': 'Linux' }; |
| 126 | + return labels[`${p.os}-${p.arch}`] || ''; |
| 127 | + } |
| 128 | + async function init() { |
| 129 | + const versionEl = document.getElementById('version'); |
| 130 | + const downloadBtn = document.getElementById('download-btn'); |
| 131 | + const downloadText = document.getElementById('download-text'); |
| 132 | + const platformEl = document.getElementById('platform'); |
| 133 | + try { |
| 134 | + const res = await fetch('update.json'); |
| 135 | + const data = await res.json(); |
| 136 | + versionEl.textContent = `v${data.version}`; |
| 137 | + versionEl.classList.remove('loading'); |
| 138 | + const platform = detectPlatform(); |
| 139 | + const platformKey = getPlatformKey(platform); |
| 140 | + if (platformKey && data.platforms[platformKey]) { |
| 141 | + downloadBtn.href = data.platforms[platformKey].url; |
| 142 | + downloadText.textContent = `Download for ${getPlatformLabel(platform)}`; |
| 143 | + platformEl.textContent = `v${data.version}`; |
| 144 | + } else { |
| 145 | + downloadBtn.href = `https://github.com/${REPO}/releases/latest`; |
| 146 | + downloadText.textContent = 'View Downloads'; |
| 147 | + platformEl.textContent = 'All platforms available'; |
| 148 | + } |
| 149 | + } catch (e) { |
| 150 | + versionEl.textContent = 'Latest'; |
| 151 | + versionEl.classList.remove('loading'); |
| 152 | + downloadBtn.href = `https://github.com/${REPO}/releases/latest`; |
| 153 | + downloadText.textContent = 'View Releases'; |
| 154 | + } |
| 155 | + } |
| 156 | + init(); |
| 157 | + </script> |
| 158 | +</body> |
| 159 | +</html> |
0 commit comments