Spaces:
Running
Running
Download index.html from powerllm/anycoder-3dfb5929: direct link, hf CLI and curl.
- Browser
- Download file 22 kB
-
https://huggingface.co/spaces/powerllm/anycoder-3dfb5929/resolve/main/index.html
- Command line
-
hf download hf://spaces/powerllm/anycoder-3dfb5929/index.html
-
curl -L -o index.html https://huggingface.co/spaces/powerllm/anycoder-3dfb5929/resolve/main/index.html
22 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Code Diff & File Tracker</title> | |
| <!-- Import FontAwesome for Icons --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <!-- Import Google Fonts --> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"> | |
| <style> | |
| :root { | |
| /* Color Palette - Dark Theme */ | |
| --bg-app: #0f1117; | |
| --bg-sidebar: #161b22; | |
| --bg-panel: #21262d; | |
| --bg-hover: #30363d; | |
| --text-main: #f0f6fc; | |
| --text-muted: #8b949e; | |
| --accent-primary: #58a6ff; | |
| --accent-glow: rgba(88, 166, 255, 0.15); | |
| /* Status Colors */ | |
| --status-added: #3fb950; | |
| --status-added-bg: rgba(63, 185, 80, 0.15); | |
| --status-modified: #d29922; | |
| --status-modified-bg: rgba(210, 153, 34, 0.15); | |
| --status-deleted: #f85149; | |
| --status-deleted-bg: rgba(248, 81, 73, 0.15); | |
| --border: #30363d; | |
| --radius: 12px; | |
| --shadow: 0 4px 24px rgba(0,0,0,0.4); | |
| } | |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| background-color: var(--bg-app); | |
| color: var(--text-main); | |
| height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| /* --- Header --- */ | |
| header { | |
| height: 60px; | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 0 24px; | |
| background: rgba(22, 27, 34, 0.8); | |
| backdrop-filter: blur(10px); | |
| z-index: 10; | |
| } | |
| .brand { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| font-weight: 600; | |
| font-size: 1.1rem; | |
| } | |
| .brand i { | |
| color: var(--accent-primary); | |
| } | |
| .anycoder-link { | |
| font-size: 0.85rem; | |
| color: var(--text-muted); | |
| text-decoration: none; | |
| padding: 6px 12px; | |
| border-radius: 20px; | |
| background: var(--bg-panel); | |
| border: 1px solid var(--border); | |
| transition: all 0.2s ease; | |
| } | |
| .anycoder-link:hover { | |
| color: var(--text-main); | |
| border-color: var(--accent-primary); | |
| background: var(--accent-glow); | |
| } | |
| /* --- Main Layout --- */ | |
| main { | |
| display: flex; | |
| flex: 1; | |
| overflow: hidden; | |
| } | |
| /* --- Sidebar (File List) --- */ | |
| aside { | |
| width: 320px; | |
| background: var(--bg-sidebar); | |
| border-right: 1px solid var(--border); | |
| display: flex; | |
| flex-direction: column; | |
| transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); | |
| } | |
| .sidebar-header { | |
| padding: 20px; | |
| border-bottom: 1px solid var(--border); | |
| } | |
| .status-filters { | |
| display: flex; | |
| gap: 8px; | |
| margin-top: 12px; | |
| } | |
| .filter-btn { | |
| flex: 1; | |
| background: transparent; | |
| border: 1px solid var(--border); | |
| color: var(--text-muted); | |
| padding: 6px; | |
| border-radius: 6px; | |
| cursor: pointer; | |
| font-size: 0.8rem; | |
| transition: 0.2s; | |
| } | |
| .filter-btn.active { | |
| background: var(--bg-panel); | |
| color: var(--text-main); | |
| border-color: var(--text-muted); | |
| } | |
| .file-list { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 10px; | |
| } | |
| /* Scrollbar Styling */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background: var(--border); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background: var(--text-muted); | |
| } | |
| .file-item { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 12px 16px; | |
| border-radius: var(--radius); | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| margin-bottom: 4px; | |
| border: 1px solid transparent; | |
| } | |
| .file-item:hover { | |
| background: var(--bg-hover); | |
| } | |
| .file-item.active { | |
| background: var(--bg-panel); | |
| border-color: var(--accent-primary); | |
| } | |
| .file-info { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| overflow: hidden; | |
| } | |
| .file-icon { | |
| font-size: 1.1rem; | |
| width: 20px; | |
| text-align: center; | |
| } | |
| .file-name { | |
| font-family: 'JetBrains Mono', monospace; | |
| font-size: 0.9rem; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| /* Status Badges */ | |
| .status-badge { | |
| font-size: 0.7rem; | |
| padding: 2px 8px; | |
| border-radius: 12px; | |
| font-weight: 600; | |
| text-transform: uppercase; | |
| letter-spacing: 0.5px; | |
| } | |
| .status-added { | |
| background: var(--status-added-bg); | |
| color: var(--status-added); | |
| } | |
| .status-modified { | |
| background: var(--status-modified-bg); | |
| color: var(--status-modified); | |
| } | |
| .status-deleted { | |
| background: var(--status-deleted-bg); | |
| color: var(--status-deleted); | |
| } | |
| /* Special Highlight for "Edited" files as requested */ | |
| .edited-highlight { | |
| border-left: 3px solid var(--status-modified); | |
| } | |
| /* --- Editor Area --- */ | |
| .editor-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--bg-app); | |
| position: relative; | |
| } | |
| .editor-header { | |
| padding: 16px 24px; | |
| border-bottom: 1px solid var(--border); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| background: var(--bg-app); | |
| } | |
| .current-file-path { | |
| font-family: 'JetBrains Mono', monospace; | |
| color: var(--text-muted); | |
| font-size: 0.9rem; | |
| } | |
| .current-file-path span { | |
| color: var(--text-main); | |
| } | |
| .editor-actions { | |
| display: flex; | |
| gap: 12px; | |
| } | |
| .btn { | |
| padding: 8px 16px; | |
| border-radius: 6px; | |
| border: none; | |
| font-weight: 500; | |
| cursor: pointer; | |
| font-size: 0.9rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| transition: transform 0.1s, opacity 0.2s; | |
| } | |
| .btn:active { | |
| transform: scale(0.98); | |
| } | |
| .btn-primary { | |
| background: var(--accent-primary); | |
| color: #fff; | |
| box-shadow: 0 0 15px var(--accent-glow); | |
| } | |
| .btn-secondary { | |
| background: var(--bg-panel); | |
| color: var(--text-main); | |
| border: 1px solid var(--border); | |
| } | |
| .code-area { | |
| flex: 1; | |
| padding: 20px; | |
| overflow: auto; | |
| font-family: 'JetBrains Mono', monospace; | |
| font-size: 0.95rem; | |
| line-height: 1.6; | |
| color: #c9d1d9; | |
| } | |
| .code-line { | |
| display: flex; | |
| padding: 2px 0; | |
| } | |
| .line-num { | |
| width: 40px; | |
| color: var(--text-muted); | |
| text-align: right; | |
| padding-right: 16px; | |
| user-select: none; | |
| font-size: 0.85rem; | |
| opacity: 0.5; | |
| } | |
| .line-content { | |
| flex: 1; | |
| white-space: pre; | |
| } | |
| /* Diff Highlighting */ | |
| .diff-added { | |
| background-color: rgba(46, 160, 67, 0.15); | |
| } | |
| .diff-added .line-num::after { | |
| content: '+'; | |
| color: var(--status-added); | |
| margin-left: 4px; | |
| } | |
| .diff-removed { | |
| background-color: rgba(248, 81, 73, 0.15); | |
| text-decoration: line-through; | |
| opacity: 0.7; | |
| } | |
| .diff-removed .line-num::after { | |
| content: '-'; | |
| color: var(--status-deleted); | |
| margin-left: 4px; | |
| } | |
| .keyword { color: #ff7b72; } | |
| .string { color: #a5d6ff; } | |
| .function { color: #d2a8ff; } | |
| .comment { color: #8b949e; font-style: italic; } | |
| /* --- Empty State --- */ | |
| .empty-state { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| height: 100%; | |
| color: var(--text-muted); | |
| text-align: center; | |
| } | |
| .empty-state i { | |
| font-size: 4rem; | |
| margin-bottom: 20px; | |
| opacity: 0.2; | |
| } | |
| /* --- Responsive --- */ | |
| @media (max-width: 768px) { | |
| main { | |
| flex-direction: column; | |
| } | |
| aside { | |
| width: 100%; | |
| height: 40%; | |
| border-right: none; | |
| border-bottom: 1px solid var(--border); | |
| } | |
| .editor-container { | |
| height: 60%; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <div class="brand"> | |
| <i class="fa-solid fa-code-branch"></i> | |
| <span>DevTrack UI</span> | |
| </div> | |
| <!-- Required Link --> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link" target="_blank"> | |
| Built with anycoder | |
| </a> | |
| </header> | |
| <main> | |
| <!-- Sidebar --> | |
| <aside> | |
| <div class="sidebar-header"> | |
| <h3 style="font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted);">Changed Files</h3> | |
| <div class="status-filters"> | |
| <button class="filter-btn active" onclick="filterFiles('all')">All</button> | |
| <button class="filter-btn" onclick="filterFiles('modified')">Edited</button> | |
| <button class="filter-btn" onclick="filterFiles('added')">New</button> | |
| </div> | |
| </div> | |
| <div class="file-list" id="fileList"> | |
| <!-- Files will be injected here via JS --> | |
| </div> | |
| </aside> | |
| <!-- Editor View --> | |
| <section class="editor-container"> | |
| <div class="editor-header" id="editorHeader" style="display: none;"> | |
| <div class="current-file-path" id="filePathDisplay"> | |
| <!-- Path goes here --> | |
| </div> | |
| <div class="editor-actions"> | |
| <button class="btn btn-secondary" onclick="discardChanges()"> | |
| <i class="fa-solid fa-rotate-left"></i> Discard | |
| </button> | |
| <button class="btn btn-primary" onclick="commitChanges()"> | |
| <i class="fa-solid fa-check"></i> Commit | |
| </button> | |
| </div> | |
| </div> | |
| <div class="code-area" id="codeArea"> | |
| <div class="empty-state"> | |
| <i class="fa-regular fa-folder-open"></i> | |
| <h3>Select a file to view changes</h3> | |
| <p>Review the diffs and commit your work.</p> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <script> | |
| </script> | |
| </body> | |
| </html> |