add resume react app
This commit is contained in:
parent
65ba8028d8
commit
2ede37e3c3
|
@ -0,0 +1,2 @@
|
|||
.parcel-cache
|
||||
dist
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "resume",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "src/index.js",
|
||||
"source": "src/index.html",
|
||||
"browserslist": "> 0.5%, last 2 versions, not dead",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "parcel",
|
||||
"build": "parcel build"
|
||||
},
|
||||
"author": "blek",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"parcel": "^2.8.3",
|
||||
"process": "^0.11.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export function Base() {
|
||||
return <p></p>;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import { createRoot } from "react-dom/client";
|
||||
import { Base } from './Base';
|
||||
|
||||
const container = document.getElementById("resume_js_app");
|
||||
const root = createRoot(container)
|
||||
root.render(<Base />);
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'/>
|
||||
<title>Resume debug mode</title>
|
||||
<script type="module" src='app.js'></script>
|
||||
<link rel="stylesheet" href='styles.css'/>
|
||||
</head>
|
||||
<body>
|
||||
<div id='resume_js_app'></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1 @@
|
|||
../../../public/static/ui/resume.css
|
|
@ -2,6 +2,12 @@ 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='/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
|
||||
h2 My online resume
|
||||
|
@ -11,4 +17,10 @@ block content
|
|||
p(class='js_loading_indicator')
|
||||
| JS is loading. Please hold on...
|
||||
br
|
||||
img(src='/static/ui/load.gif' style='border-radius:4px;margin-top:6px')
|
||||
img(src='/static/ui/load.gif' style='border-radius:4px;margin-top:6px')
|
||||
br
|
||||
noscript
|
||||
span(style='font-size:9pt;color:darkred;font-weight:bold;text-align:center')
|
||||
| It seems that you have JS disabled.
|
||||
br
|
||||
| Please, enable it in order to run the app.
|
Loading…
Reference in New Issue