Download codeburn.html from VanyaJ/bada-terminal: direct link, hf CLI and curl.
- Browser
- Download file 3.18 kB
-
https://huggingface.co/VanyaJ/bada-terminal/resolve/main/codeburn.html
- Command line
-
hf download hf://VanyaJ/bada-terminal/codeburn.html
-
curl -L -o codeburn.html https://huggingface.co/VanyaJ/bada-terminal/resolve/main/codeburn.html
3.18 kB
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>CodeBurn β Token Dashboard</title> | |
| <link rel="stylesheet" href="node_modules/xterm/css/xterm.css" /> | |
| <link rel="stylesheet" href="style.css" /> | |
| </head> | |
| <body> | |
| <div id="terminal-container"></div> | |
| <script> | |
| const { ipcRenderer } = require('electron'); | |
| const { Terminal } = require('xterm'); | |
| const { FitAddon } = require('xterm-addon-fit'); | |
| const theme = { | |
| background: '#1e1e2e', foreground: '#cdd6f4', cursor: '#f5e0dc', cursorAccent: '#1e1e2e', | |
| selectionBackground: '#585b70', | |
| black: '#45475a', red: '#f38ba8', green: '#a6e3a1', yellow: '#f9e2af', | |
| blue: '#89b4fa', magenta: '#f5c2e7', cyan: '#94e2d5', white: '#bac2de', | |
| brightBlack: '#585b70', brightRed: '#f38ba8', brightGreen: '#a6e3a1', brightYellow: '#f9e2af', | |
| brightBlue: '#89b4fa', brightMagenta: '#f5c2e7', brightCyan: '#94e2d5', brightWhite: '#a6adc8' | |
| }; | |
| const term = new Terminal({ | |
| cursorBlink: true, cursorStyle: 'bar', fontSize: 14, | |
| fontFamily: '"JetBrains Mono", "Fira Code", Consolas, monospace', | |
| theme, allowProposedApi: true, scrollback: 5000 | |
| }); | |
| const fitAddon = new FitAddon(); | |
| term.loadAddon(fitAddon); | |
| term.open(document.getElementById('terminal-container')); | |
| fitAddon.fit(); | |
| // CodeBurn PTY μμ μμ² | |
| ipcRenderer.send('codeburn-start'); | |
| ipcRenderer.send('codeburn-resize', { cols: term.cols, rows: term.rows }); | |
| term.onData((data) => ipcRenderer.send('codeburn-input', data)); | |
| ipcRenderer.on('codeburn-output', (event, data) => term.write(data)); | |
| let resizeTimeout; | |
| window.addEventListener('resize', () => { | |
| clearTimeout(resizeTimeout); | |
| resizeTimeout = setTimeout(() => { | |
| fitAddon.fit(); | |
| ipcRenderer.send('codeburn-resize', { cols: term.cols, rows: term.rows }); | |
| }, 100); | |
| }); | |
| term.focus(); | |
| // βββ Light/Dark ν λ§ λμ μ ν βββ | |
| const lightTheme = { | |
| background: '#eff1f5', foreground: '#4c4f69', cursor: '#dc8a78', cursorAccent: '#eff1f5', | |
| selectionBackground: '#acb0be', | |
| black: '#5c5f77', red: '#d20f39', green: '#40a02b', yellow: '#df8e1d', | |
| blue: '#1e66f5', magenta: '#ea76cb', cyan: '#179287', white: '#4c4f69', | |
| brightBlack: '#6c6f85', brightRed: '#d20f39', brightGreen: '#40a02b', brightYellow: '#df8e1d', | |
| brightBlue: '#1e66f5', brightMagenta: '#ea76cb', brightCyan: '#179287', brightWhite: '#ccd0da' | |
| }; | |
| function applyTerminalTheme(themeName) { | |
| if (themeName === 'light') { | |
| term.options.theme = lightTheme; | |
| document.body.classList.add('light-theme'); | |
| } else { | |
| term.options.theme = theme; // theme is dark theme defined at top | |
| document.body.classList.remove('light-theme'); | |
| } | |
| } | |
| // μ΄κΈ° ν λ§ λ‘λ | |
| ipcRenderer.invoke('get-app-settings').then(settings => { | |
| if (settings && settings.theme) { | |
| applyTerminalTheme(settings.theme); | |
| } | |
| }); | |
| // ν λ§ λ³κ²½ μμ | |
| ipcRenderer.on('theme-changed', (event, themeName) => { | |
| applyTerminalTheme(themeName); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |