Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions app.js

This file was deleted.

8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const express = require('express');
const router = express.Router();

//router.get('/', (req, res) => {
//res.type('html').send('<h1>Hello, World!</h1>'); // Replace with your HTML content
//});

module.exports = router;
4 changes: 4 additions & 0 deletions public/functions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function showScreen(id) {
document.querySelectorAll('div').forEach(div => div.style.display = 'none');
document.getElementById(id).style.display = 'block';
}
Binary file added public/homeImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Welcome to Kappa Sigma</title>
<style>
body {
background: #185012;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
width: 100%;
padding: 10px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div id="login" style="display: block;">
<h2>LOG IN</h2>
<label for="username">Username</label>
<input type="text" id="username" name="username" required>

<label for="password">Password</label>
<input type="password" id="password" name="password" required>

<button onclick="showScreen('home')">LOG IN</button>
</div>

<div id="home" style="display: none;">
<img src="homeImage.png" alt="Logo">
</div>

<script src="functions.js" defer></script> <!-- Reference to external JavaScript -->
</body>
</html>
14 changes: 14 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const express = require("express");
const app = express();
const port = process.env.PORT || 3001;
const path = require('path');

app.use(express.static(path.join(__dirname, 'public')));

app.get('/', (req, res) => {res.sendFile(path.join(__dirname, 'public', 'index.html'));});

const routes = require('./index')
app.use('/', routes);

const server = app.listen(port, () => console.log(`Example app listening on port ${port}!`));