remove server config

This commit is contained in:
NhanPT 2022-03-25 16:19:40 +07:00
parent e9a0dc89ef
commit b212f115e8
7 changed files with 51 additions and 19 deletions

View file

@ -1,14 +1,8 @@
export class Config {
server: ServerConfig = new ServerConfig();
website: WebsiteConfig = new WebsiteConfig();
addons: string[] = [];
}
class ServerConfig {
port: number = 7000;
minify: boolean = true;
}
class WebsiteConfig {
public title: string = "";
public description: string = "";

View file

@ -15,13 +15,10 @@ export async function startServer(): Promise<void> {
});
Compile();
app.listen(
window.config.server.port,
() =>
console.log(
`server has started on http://localhost:${window.config.server.port} 🚀`,
),
);
app.listen(7000, () =>
console.log(
`server has started on http://localhost:7000 🚀`,
));
}
export async function Compile(): Promise<void> {
@ -58,19 +55,19 @@ export async function CompileIndex(): Promise<void> {
//Write index.html into temp folder
ensureDirSync(tempFolder);
window.index = indexContent;
//await Deno.writeTextFile(`${tempFolder}/index.html`, indexContent);
await Deno.writeTextFile(`${tempFolder}/index.html`, indexContent);
}
export async function CompileCSS(path: string): Promise<void> {
if (!path) {
}
if (window.config.server.minify) {}
if (!path.includes(".min.")) {}
}
export async function CompileJS(path: string): Promise<void> {
if (!path) {
}
if (window.config.server.minify) {}
if (!path.includes(".min.")) {}
}

View file

@ -5,8 +5,7 @@
},
"website": {
"title": "",
"description": "",
"background": ""
"description": ""
},
"addons": []
}

File diff suppressed because one or more lines are too long

1
src/private/css/charts.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,18 @@
body {
background-color: var(--bgColor);
background-image: var(--bgImage);
color: var(--foreground);
z-index: -999;
}
.bg {
width: 100%;
height: 100%;
position: fixed;
background-image: var(--bgImage);
transform: scale(1.1);
filter: blur(0.2rem);
opacity: 0.6;
z-index: -998;
}
#header {

View file

@ -12,10 +12,12 @@
<link rel="stylesheet" href="../public/css/custom.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/charts.min.css">
<link rel="stylesheet" href="css/magma.css">
</head>
<body>
<div class="bg"></div>
<div class="container">
<div id="header" class="row">
<div class="two-thirds column">