Compare commits

..

2 Commits

Author SHA1 Message Date
b1ek d46d7e28b7
add load simulation 2023-03-10 17:26:44 +10:00
b1ek b9b0a63ae3
fix colors 2023-03-10 17:21:34 +10:00
6 changed files with 18 additions and 18 deletions

View File

@ -48,8 +48,11 @@ export class Base extends Component {
styleEchoBack={'fullInherit'}
noDefaults
noAutoScroll
/>
)
}
componentDidMount() {
this.terminal.current.focusTerminal();
}
}

View File

@ -24,7 +24,7 @@ const commands = (terminal) => {
clear: {
description: 'Clear the terminal.',
fn: () => {
terminal.current.setState({stdout: []});
terminal.current.clearStdout();
}
},
@ -51,9 +51,9 @@ const commands = (terminal) => {
Object.keys(commands).map((cmd, i) => {
if (commands[cmd].unlisted) return;
return <tr key={i}>
<td style={{color: 'violet'}}>{cmd}</td>
<td style={{color: 'aquamarine'}}>{cmd}</td>
<td style={{padding: '0 8px'}}> : </td>
<td>{commands[cmd].description}</td>
<td style={{color: 'white'}}>{commands[cmd].description}</td>
</tr>
})
}

View File

@ -3,7 +3,7 @@
<head>
<meta charset='utf-8'/>
<title>Resume debug mode</title>
<script type="module" src='app.js'></script>
<script type="module" src='resume.js'></script>
<link rel="stylesheet" href='styles.css'/>
</head>
<body>

View File

@ -1,7 +1,9 @@
import { createRoot } from "react-dom/client";
import { Base } from './Base';
document.getElementById('resume_js_app').innerHTML = '';
const container = document.getElementById("resume_js_app");
const root = createRoot(container)
root.render(<Base />);
setTimeout(() => {
document.getElementById('resume_js_app').innerHTML = '';
const container = document.getElementById("resume_js_app");
const root = createRoot(container)
root.render(<Base />);
}, (Math.random() * 200) + 500)

View File

@ -18,8 +18,3 @@ th {
text-align: left;
padding-right: 16px !important;
}
.console {
font-family: 'Source Code Pro'/*, monospace*/ !important;
height: 100%
}

View File

@ -2,6 +2,8 @@ extends ../layout/main.pug
block root
- var title = 'Resume'
link(rel='stylesheet' href='/static/ui/resume.css')
if (process.env.APP_DEBUG == 'true')
script(src='http://localhost:1234/resume.js' defer='')
block content
h2 My online resume
@ -18,7 +20,5 @@ block content
| It seems that you have JS disabled.
br
| Please, enable it in order to run the app.
if (process.env.APP_DEBUG != 'true')
script(src='/static/dist/resume.js')
else
script(src='http://localhost:1234/resume.js' type='module')
if (process.env.APP_DEBUG != 'true')
script(src='/static/dist/resume.js')