Преглед изворни кода

Create the outline code for the landing page.

Lee Morgan пре 1 година
родитељ
комит
0695971383

+ 1 - 1
src/views/createHtml.js

@@ -5,7 +5,7 @@ import fsSync from "fs";
 const fs = fsSync.promises;
 
 const esbuildProm = esbuild.build({
-    entryPoints: [`${import.meta.dirname}/index.js`, `${import.meta.dirname}/index.css`],
+    entryPoints: [`${import.meta.dirname}/js/index.js`, `${import.meta.dirname}/css/index.css`],
     bundle: true,
     minify: true,
     sourcemap: process.env.NODE_ENV === "production",

+ 7 - 4
src/views/index.css → src/views/css/index.css

@@ -1,15 +1,18 @@
-:root{
+:root {
     --primary:     #6E4B3A;
     --secondary:   #3A5A85;
     --accent:      #D4AF37;
     --background:  #F9F6F0;
     --surface:     #DCD6CF;
-    --text-main:   #2A2A2A;
-    --text-muted:  #6D6D6D;
+    --textMain:   #2A2A2A;
+    --textMuted:  #6D6D6D;
     --error:       #B7410E;
     --success:     #708238;
 }
 
 body{
-    background: var(--primary);
+    height: 100vh;
+    width: 100vw;
+    background: var(--background);
+    color: var(--textMain);
 }

+ 0 - 1
src/views/index.html

@@ -11,7 +11,6 @@
 </head>
 <body>
     <img src="/logo.svg" alt="Suma logo">
-    <h1>Suma landing page</h1>
     <script></script>
 </body>
 </html>

+ 0 - 2
src/views/index.js

@@ -1,2 +0,0 @@
-console.log("Suma");
-console.log("Something else");

+ 12 - 0
src/views/js/index.js

@@ -0,0 +1,12 @@
+import LoginPage from "./pages/login.js";
+
+const pages = document.querySelector(".page");
+let page;
+
+const changePage = (page, data)=>{
+    page.close();
+
+    switch(page){
+        case "login": page = new LoginPage(); break;
+    }
+}

+ 0 - 0
src/views/js/pages/login.js