diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 46349f7..04d68b2 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -3,6 +3,7 @@ import { Navbar } from "./pages/navbar"; import { DarkStyle, LightStyle, defaultStyle } from "./styles"; import { ControllerAPI } from "./api/RESTful"; import { NewsFeed } from "./pages/feed/news"; +import { AuthenticationPage } from "./pages/auth/auth"; // I'll add a dark mode toggle later, but for now let's just use the light style by default let currentStyle = defaultStyle; @@ -27,7 +28,11 @@ async function authInit() { async function logInInit () { console.log("User is not authenticated"); - // Load the auth page + const authPage = new AuthenticationPage(); + authPage.style = currentStyle; + const appElement = document.getElementById("app"); + if (appElement) + appElement.innerHTML = authPage.build(); } async function main() { diff --git a/frontend/src/pages/auth/auth.ts b/frontend/src/pages/auth/auth.ts new file mode 100644 index 0000000..10dd3f7 --- /dev/null +++ b/frontend/src/pages/auth/auth.ts @@ -0,0 +1,7 @@ +import { DefaultElement } from "../default-element"; + +export class AuthenticationPage extends DefaultElement { + constructor() { + super([]); + } +} \ No newline at end of file