diff --git a/react/resume/src/Base.js b/react/resume/src/Base.js index d771755..778790d 100644 --- a/react/resume/src/Base.js +++ b/react/resume/src/Base.js @@ -48,8 +48,11 @@ export class Base extends Component { styleEchoBack={'fullInherit'} noDefaults - noAutoScroll /> ) } + + componentDidMount() { + this.terminal.current.focusTerminal(); + } } \ No newline at end of file diff --git a/react/resume/src/emulation/commands/index.js b/react/resume/src/emulation/commands/index.js index 56c3ff2..f1d8768 100644 --- a/react/resume/src/emulation/commands/index.js +++ b/react/resume/src/emulation/commands/index.js @@ -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 - {cmd} + {cmd} : - {commands[cmd].description} + {commands[cmd].description} }) } diff --git a/react/resume/src/index.html b/react/resume/src/index.html index 8c05bd2..5aba79d 100644 --- a/react/resume/src/index.html +++ b/react/resume/src/index.html @@ -3,7 +3,7 @@ Resume debug mode - + diff --git a/react/resume/src/style.css b/react/resume/src/style.css index d0e3499..475ba83 100644 --- a/react/resume/src/style.css +++ b/react/resume/src/style.css @@ -17,9 +17,4 @@ a:hover { th { text-align: left; padding-right: 16px !important; -} - -.console { - font-family: 'Source Code Pro'/*, monospace*/ !important; - height: 100% } \ No newline at end of file diff --git a/view/page/resume.pug b/view/page/resume.pug index 60ccd65..5a54764 100644 --- a/view/page/resume.pug +++ b/view/page/resume.pug @@ -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') \ No newline at end of file + if (process.env.APP_DEBUG != 'true') + script(src='/static/dist/resume.js') \ No newline at end of file