diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..f949edb --- /dev/null +++ b/js/index.js @@ -0,0 +1,8 @@ +window.addEventListener("load",async function(){ + let data = await(await fetch("/api/getuser")).json() + if(data["username"] != undefined) { + document.getElementById("HasAccount").style="" + } else { + document.getElementById("NoAccount").style="" + } +}) diff --git a/views/index.html b/views/index.html index 22b3909..339baf8 100644 --- a/views/index.html +++ b/views/index.html @@ -1,27 +1,39 @@ - +
-

Auth website

+

IPost

- Do you not have an account? Register now! + + IPost is a revolutionary chatting website
+ featuring an innovative design


- Do you already have an account? Login now! -
-
- This is open source, find more about this project on github + + + + + This is open source, find more about this project on github