add dev env script

This commit is contained in:
b1ek 2023-03-11 19:51:41 +10:00
parent 32d3a128b6
commit 7460ff6f88
Signed by: blek
GPG Key ID: 14546221E3595D0C
7 changed files with 34 additions and 13 deletions

8
dev.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
cp docker-compose.dev docker-compose.yml
cp Dockerfile.dev Dockerfile
docker-compose build
echo -e "\033[1;32mDevelopment environment set up successfully\033[0m\n"

View File

@ -38,6 +38,7 @@
"pug": "^3.0.2",
"redis": "^4.6.4",
"sequelize": "^7.0.0-alpha.9",
"sync-fetch": "^0.4.2",
"totp-generator": "^0.0.14",
"unit.js": "^2.1.1",
"xml": "^1.0.1"

View File

@ -1,11 +1,17 @@
div#resume_js_app {
background: #303030;
width:640px;
height:480px;
background: #212121;
width:800px;
height:600px;
border: 1px solid #e1e1e1;
border-radius: 6px;
font-family: monospace;
box-shadow: 0 2px 4px #30303060;
box-shadow: 0 2px 1px #303030A0;
color: #e1e1e1 !important;
padding: 2px;
transition: 150ms ease;
}
div#resume_js_app:hover {
box-shadow: 0 2px 3px #303030;
}
div#resume_js_app p.js_loading_indicator {
padding: 0; margin: 0;
@ -18,4 +24,8 @@ div#resume_js_app p.js_loading_indicator {
div#resume_js_app * {
color: #e1e1e1;
}
div#resume_js_app table * {
border:0;
text-align: left;
}

View File

@ -5,7 +5,6 @@ import commands from './emulation/commands';
import Colored from './helpers/color';
import './font/sourcecode.css';
import './style.css';
const welcome = <pre>
Welcome to my resume!<br/>

View File

@ -1,9 +1,11 @@
/* @import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600&display=swap'); */
td {
padding-right: 16px !important
}
.console {
font-family: 'Source Code Pro', monospace;
}
a, a:visited {
color: rgb(36, 85, 126);
text-decoration: none;

View File

@ -1,9 +1,10 @@
import { createRoot } from "react-dom/client";
import { Base } from './Base';
import './Style.css';
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)
}, (Math.random() * 50) + 50)

View File

@ -1,9 +1,11 @@
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/dist/resume.js' async defer='')
if (process.env.APP_DEBUG == 'true')
script(src='http://localhost:1234/resume.js' defer='')
script(src='http://localhost:1234/resume.js' async defer='')
link(rel='stylesheet' href='/static/ui/resume.css')
block content
h2 My online resume
@ -19,6 +21,4 @@ block content
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.
if (process.env.APP_DEBUG != 'true')
script(src='/static/dist/resume.js')
| Please, enable it in order to run the app.