Browse Source

remove server config

NhanPT 3 years ago
parent
commit
b212f115e8

+ 0 - 6
src/modules/config.ts

@@ -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 = "";

+ 7 - 10
src/modules/server.ts

@@ -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.")) {}
 }

+ 1 - 2
src/private/config.json

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

File diff suppressed because it is too large
+ 26 - 0
src/private/css/charts.css.map


File diff suppressed because it is too large
+ 0 - 0
src/private/css/charts.min.css


+ 12 - 1
src/private/css/magma.css

@@ -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 {

+ 2 - 0
src/private/index.html

@@ -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">

Some files were not shown because too many files changed in this diff