feat: Add initial code
All checks were successful
Build Docker / BuildImage (push) Successful in 54s

This commit is contained in:
2024-10-04 20:43:58 +10:00
parent 8508e5fbd7
commit 039a24bc64
8 changed files with 529 additions and 3 deletions

View File

@@ -2,19 +2,103 @@ body {
background-color: #000000;
color: #ffffff;
}
h1 {
font-size: 50px;
margin: 0;
padding: 0;
}
.centre {
margin-top: 10%;
text-align: center;
}
a {
color: #ffffff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
header h1 {
display: inline;
}
.button {
background-color: #ffffff;
border: 1px solid #ffffff;
border-radius: 5px;
color: #000000;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
}
.button:hover {
background-color: #000000;
border: 1px solid #ffffff;
border-radius: 5px;
color: #ffffff;
text-decoration: none;
}
.conversation {
border: 5px solid #ffffff;
border-radius: 5px;
margin-bottom: 25px;
padding: 10px;
}
.email {
border: 1px solid #ffffff;
border-radius: 5px;
margin: auto;
margin-top: 10px;
margin-bottom: 10px;
padding: 10px;
width: fit-content;
}
.from {
font-weight: bold;
display: inline;
}
.date {
display: inline;
font-size: 12px;
color: #ffffff;
font-weight: bold;
margin-top: 10px;
}
.body {
margin-top: 10px;
font-size: 12px;
color: #000000;
background-color: #ffffff;
border-radius: 10px;
padding: 10px;
}
.body a {
color: #000000;
}
input {
background-color: #ffffff;
border: 1px solid #ffffff;
border-radius: 5px;
color: #000000;
padding: 10px;
text-decoration: none;
display: inline-block;
margin-top: 10px;
margin-bottom: 10px;
width: min(500px, 90%);
}

37
templates/inbox.html Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inbox | HNS Login Email</title>
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
<link rel="stylesheet" href="/assets/css/index.css">
</head>
<body>
<header style="display: inline;">
<h1>HNS Login Email</h1> <span style="float:right">{{emails.email}} | <a href="/notifications">Notifications</a> | <a href="/logout">Logout</a></span>
</header>
<div class="centre">
{% for conversation in emails.conversations %}
<div class="conversation">
<span>Conversation: {{conversation.id}}</span>
{% for message in conversation.messages %}
<div class="email">
<div class="from">{{message.name}} ({{message.from}})</div> <div class="date">{{message.date}}</div>
<div class="body">{{message.body|safe}}</div>
</div>
{% endfor %}
<a class="button" href="/delete/{{conversation.id}}">Delete Conversation</a>
</div>
{% endfor %}
</div>
</body>
</html>

19
templates/login.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HNS Login Email</title>
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
<link rel="stylesheet" href="/assets/css/index.css">
</head>
<body>
<div class="centre">
<a href="{{login}}"><h1>Login to HNS Login Email</h1></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Notifications | HNS Login Email</title>
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
<link rel="stylesheet" href="/assets/css/index.css">
</head>
<body>
<header style="display: inline;">
<h1>HNS Login Email</h1> <span style="float:right">{{email}} | <a href="/inbox">Inbox</a> | <a
href="/logout">Logout</a></span>
</header>
<div class="centre">
<form action="/notifications" method="post">
<!-- Discord webhook url -->
<label for="webhook">Discord Webhook URL</label>
<input type="text" name="webhook" placeholder="https://discord.com/api/webhooks/..." value="{{webhook}}">
<!-- Email -->
<br>
<label for="email">Email Notification</label>
<input type="email" name="email" placeholder="example@example.com" value="{{email_alert}}">
<br>
<input class="button" type="submit" value="Submit">
</form>
</div>
</body>
</html>