put resume on pug page

This commit is contained in:
b1ek 2023-03-10 17:05:46 +10:00
parent e321de68fe
commit 1d745745ff
Signed by: blek
GPG Key ID: 14546221E3595D0C
19 changed files with 1745 additions and 11 deletions

BIN
public/static/dist/SourceCodeBold.ttf vendored Normal file

Binary file not shown.

BIN
public/static/dist/SourceCodeMedium.ttf vendored Normal file

Binary file not shown.

BIN
public/static/dist/SourceCodeRegular.ttf vendored Normal file

Binary file not shown.

Binary file not shown.

1
public/static/dist/resume.css vendored Normal file
View File

@ -0,0 +1 @@
@font-face{font-family:Source Code Pro;src:url(SourceCodeRegular.ttf);font-weight:400}@font-face{font-family:Source Code Pro;src:url(SourceCodeMedium.ttf);font-weight:500}@font-face{font-family:Source Code Pro;src:url(SourceCodeSemiBold.ttf);font-weight:600}@font-face{font-family:Source Code Pro;src:url(SourceCodeBold.ttf);font-weight:700}td{padding-right:16px!important}a,a:visited{color:#24557e;font-weight:500;text-decoration:none;transition:all .15s}a:hover{text-shadow:0 0 4px #24557e30}th{text-align:left;padding-right:16px!important}.console{height:100%;font-family:Source Code Pro!important}

48
public/static/dist/resume.js vendored Normal file

File diff suppressed because one or more lines are too long

4
react/resume/.parcelrc Normal file
View File

@ -0,0 +1,4 @@
{
"extends": "@parcel/config-default",
"namers": ["parcel-namer-without-hash"]
}

6
react/resume/build.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
rm -rf dist/*
yarn run build
mv dist ../../public/static

View File

@ -2,13 +2,12 @@
"name": "resume", "name": "resume",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "src/index.js",
"source": "src/index.html", "source": "src/index.html",
"browserslist": "> 0.5%, last 2 versions, not dead", "browserslist": "> 0.5%, last 2 versions, not dead",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "parcel", "start": "parcel",
"build": "parcel build" "build": "parcel build src/resume.js --no-source-maps"
}, },
"author": "blek", "author": "blek",
"license": "MIT", "license": "MIT",
@ -19,6 +18,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.21.0", "@babel/runtime": "^7.21.0",
"parcel-namer-without-hash": "^0.0.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-console-emulator": "^5.0.2", "react-console-emulator": "^5.0.2",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"

View File

@ -4,6 +4,7 @@ import Files from './emulation/files';
import commands from './emulation/commands'; import commands from './emulation/commands';
import Colored from './helpers/color'; import Colored from './helpers/color';
import './font/sourcecode.css';
import './style.css'; import './style.css';
const welcome = <pre> const welcome = <pre>
@ -40,7 +41,7 @@ export class Base extends Component {
errorText={'zsh: command not found: [command]'} errorText={'zsh: command not found: [command]'}
style={{height:'100%', fontFamily: '\'Source Code Pro\', monospace'}} className='console'
promptLabelStyle={inputStyle} promptLabelStyle={inputStyle}
inputTextStyle={{...inputStyle, color: '#5ba2b0', transform: 'translateY(2px)'}} inputTextStyle={{...inputStyle, color: '#5ba2b0', transform: 'translateY(2px)'}}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,23 @@
@font-face {
font-family: 'Source Code Pro';
src: url(./SourceCodeRegular.ttf);
font-weight: 400;
}
@font-face {
font-family: 'Source Code Pro';
src: url(./SourceCodeMedium.ttf);
font-weight: 500;
}
@font-face {
font-family: 'Source Code Pro';
src: url(./SourceCodeSemiBold.ttf);
font-weight: 600;
}
@font-face {
font-family: 'Source Code Pro';
src: url(./SourceCodeBold.ttf);
font-weight: 700;
}

View File

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

View File

@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600&display=swap'); /* @import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600&display=swap'); */
td { td {
padding-right: 16px !important padding-right: 16px !important
@ -18,3 +18,8 @@ th {
text-align: left; text-align: left;
padding-right: 16px !important; padding-right: 16px !important;
} }
.console {
font-family: 'Source Code Pro'/*, monospace*/ !important;
height: 100%
}

1647
react/resume/yarn-error.log Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,6 @@ extends ../layout/main.pug
block root block root
- var title = 'Resume' - var title = 'Resume'
link(rel='stylesheet' href='/static/ui/resume.css') link(rel='stylesheet' href='/static/ui/resume.css')
if (process.env.APP_DEBUG != 'true')
script(src='/static/assets/resume.js')
else
script(src='https://unpkg.com/react@18/umd/react.development.js' crossorigin)
script(src='https://unpkg.com/react-dom@18/umd/react-dom.development.js' crossorigin)
script(src='/dev_asset/resume.js')
block content block content
h2 My online resume h2 My online resume
@ -24,3 +18,7 @@ block content
| It seems that you have JS disabled. | It seems that you have JS disabled.
br br
| Please, enable it in order to run the app. | 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')