login page

This commit is contained in:
Tyler Murphy 2023-01-19 23:50:15 -05:00
commit 0c7c21a86b
10 changed files with 1242 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

14
index.js Normal file
View file

@ -0,0 +1,14 @@
const express = require('express')
const app = express()
const port = 8080
app.use(express.json());
app.use(express.static('public'))
app.get('/', (req, res) => {
res.sendFile('login.html', { root: './public' })
})
app.listen(port, () => {
console.log(`App listening on port http://127.0.0.1:${port}`)
})

1018
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

14
package.json Normal file
View file

@ -0,0 +1,14 @@
{
"name": "xssbook",
"version": "1.0.0",
"description": "a terrible facebook clone",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "Tyler Murphy",
"license": "WTFPL",
"dependencies": {
"express": "^4.18.2"
}
}

41
public/css/login.css Normal file
View file

@ -0,0 +1,41 @@
.login {
background-color: #f0f2f5;
display: flex;
justify-content: center;
align-content: center;
flex-direction: row;
padding: 8em 0em;
}
.prompt {
display: flex;
flex-direction: column;
background-color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .1);
border-radius: 8px;
width: 396px;
}
.show {
display: flex;
flex-direction: column;
justify-content: center;
}
.login-button {
margin-bottom: 10px;
font-size: 20px;
font-weight: 10000;
}
.newacc {
margin: 10px 70px;
margin-bottom: 20px;
}
@media (max-aspect-ratio: 2/3) {
.login {
flex-direction: column;
align-items: center;
}
}

126
public/css/main.css Normal file
View file

@ -0,0 +1,126 @@
body {
background-color: white;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
@font-face {
font-family: facebook;
src: url("../fonts/facebook.otf") format("opentype");
}
@font-face {
font-family: sfpro;
src: url("../fonts/sfpro.otf") format("opentype");
}
.logo {
color: #1778f2;
font-size: 3.5em;
font-family: facebook;
}
.text {
font-family: sfpro;
font-size: 28px;
font-weight: normal;
line-height: 32px;
width: 500px;
}
.btext {
font-family: sfpro;
color: #1778f2
}
.ctext {
font-family: sfpro;
text-align: center;
}
a {
text-decoration: none;
cursor: pointer;
}
p {
padding: 0;
margin: 0;
}
span {
padding: 0;
margin: 0;
}
footer {
bottom: 0;
height: 400px;
background-color: white;
}
input {
all: unset;
font-family: sfpro;
background-color: white;
padding: 10px;
margin: 20px;
margin-bottom: 0;
border-radius: 5px;
border: 1px solid #dddfe2;
color: #1d2129;
font-size: 18px;
}
input:focus {
border: 1px solid #1778f2;
}
.primary {
all: unset;
font-family: sfpro;
background-color: #1778f2;
color: white;
padding: 10px;
margin: 20px;
border-radius: 5px;
font-weight: 1000;
text-align: center;
cursor: pointer;
}
.success {
all: unset;
font-family: sfpro;
background-color: #42b72a;
color: white;
padding: 10px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
border-radius: 5px;
text-align: center;
cursor: pointer;
}
.line {
width: calc(100% - 40px);
margin-left: 20px;
margin-right: 20px;
border-bottom: 1px solid #dadde1;
margin-bottom: 10px;
margin-top: 10px;
}
footer {
text-align: center;
font-family: sfpro;
padding-top: 30px;
padding-bottom: 30px;
font-size: 13px;
color: #737373;
}

BIN
public/fonts/facebook.otf Executable file

Binary file not shown.

BIN
public/fonts/sfpro.otf Normal file

Binary file not shown.

0
public/js/main.js Normal file
View file

28
public/login.html Normal file
View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/login.css">
<title>XSSBook - Login</title>
</head>
<body>
<div class="login">
<div class="show">
<span class="logo">xssbook</span>
<p class="text">Connect with javascript and the world around you on XSSBook.</p>
</div>
<div class="prompt">
<input type="text" name="email" id="email" placeholder="Email" autofocus="1">
<input type="password" name="pass" id="pass" placeholder="Password">
<button class="primary login-button" value="1" name="login" type="submit" id="login">Log In</button>
<a class="btext ctext">Forgot Password?</a>
<div class="line"></div>
<a class="success newacc">Create new account</a>
</div>
</div>
<footer>
Metashit © 2023 | This website does not care about you
</footer>
</body>
</html>