Skip to content
Snippets Groups Projects
Commit 85533607 authored by Niclas Doege's avatar Niclas Doege
Browse files

Rocket server serving Yew Website

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 751 additions and 0 deletions
target/
*.sh
.DS_Store
*.db
sqlite.*
This diff is collapsed.
[package]
name = "haushalts_server"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rocket = { version = "0.5.0-rc.2", features = ["secrets", "json"] }
#rocket_contrib = "0.4.11"
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"
tokio = "1.23.0"
sqlx = { version = "0.5.7", features = ["runtime-async-std-native-tls", "postgres", "uuid", "chrono", "json"] }
rand = "0.8.5"
lettre_email = "0.9.4"
imap = "2.4.1"
native-tls = "0.2.11"
lettre = { version = "0.10.0-beta.2", default-features = false, features = ["smtp-transport", "tokio1-rustls-tls", "hostname", "builder"] }
tracing-subscriber = "0.3.16"
tera = "1.18.1"
chrono = "0.4.24"
[dependencies.rocket_auth]
version = "0.4.0"
features = ["sqlx-sqlite"]
[dependencies.rocket_dyn_templates]
version = "0.1.0-rc.2"
features = ["handlebars", "tera"]
[debug]
address = "192.168.0.81"
port = 7980
keep_alive = 10
read_timeout = 5
write_timeout = 5
log = "normal"
limits = { forms = 32768 }
[staging]
address = "http://localhost"
port = 8000
keep_alive = 5
read_timeout = 5
write_timeout = 5
log = "normal"
limits = { forms = 32768 }
[production]
address = "192.168.0.81"
port = 8000
keep_alive = 5
read_timeout = 5
write_timeout = 5
log = "normal"
limits = { forms = 32768 }
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Excuse from Chore Duty</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
form {
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px #ccc;
margin: 50px auto;
max-width: 600px;
}
label {
display: block;
font-size: 18px;
margin-bottom: 10px;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 18px;
margin-top: 20px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
textarea {
font-size: 18px;
padding: 10px;
border-radius: 5px;
border: 2px solid #ccc;
width: 100%;
min-height: 150px;
resize: vertical;
}
</style>
</head>
<body>
<form style="font-family: Arial, sans-serif; background-color: #f0f0f0; padding: 20px; margin: 50px auto; max-width: 600px; border-radius: 10px; box-shadow: 0 0 10px #ccc;">
<label style="display: block; font-size: 18px; margin-bottom: 10px;">Entschuldigung:</label>
<textarea style="font-size: 18px; padding: 10px; border-radius: 5px; border: 2px solid #ccc; width: 100%; height: 150px; resize: vertical; box-sizing: border-box;"></textarea>
<input type="submit" value="Abschicken" style="background-color: #4CAF50; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 18px; margin-top: 20px;">
</form>
</body>
</html>
[
{
"marc": false,
"mikiya": false,
"niclas": false,
"week": 1
},
{
"marc": false,
"mikiya": false,
"niclas": false,
"week": 2
},
{
"marc": false,
"mikiya": false,
"niclas": false,
"week": 3
}
]
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Niclas Cleaned the Bathroom</title>
<style>
/* Define your styles here */
body {
font-family: Arial, sans-serif;
color: #333;
background-color: #f6f6f6;
margin: 0;
padding: 0;
}
.container {
width: 600px;
margin: 20px auto;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 5px;
box-shadow: 0px 2px 5px #ccc;
padding: 20px;
}
h1 {
font-size: 24px;
margin: 0 0 20px 0;
}
p {
font-size: 16px;
line-height: 1.5;
margin: 0 0 10px 0;
}
a {
display: inline-block;
background-color: #007bff;
color: #fff;
text-decoration: none;
padding: 10px 20px;
border-radius: 5px;
margin-top: 20px;
}
a:hover {
background-color: #0069d9;
}
</style>
</head>
<body>
<div class="container">
<h1>Niclas Cleaned the Bathroom</h1>
<p>To confirm please click on the link below:</p>
<a href="https://haushaltsserver.ddn.net/affirm_3L/6192532938553285267">Confirm Cleaning</a>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Erinnerung: Aufgabe zu erledigen</title>
<style type="text/css">
/* Font families */
body { font-family: Arial, sans-serif; }
h1 { font-family: Georgia, serif; }
/* Text styling */
p { font-size: 16px; line-height: 1.5; }
a { color: #0000ff; text-decoration: underline; }
/* Layout */
.container { max-width: 600px; margin: 0 auto; padding: 20px; }
.header { text-align: center; margin-bottom: 30px; }
.header h1 { margin-top: 0; }
.logo { text-align: center; margin-bottom: 30px; }
.logo img { max-width: 200px; height: auto; }
.reminder { background-color: #f2f2f2; padding: 20px; margin-bottom: 20px; }
.reminder h2 { margin-top: 0; }
.reminder p { margin-top: 0; }
.footer { text-align: center; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Erinnerung: Aufgabe zu erledigen</h1>
<a class="logo" href="http://haushaltsserver.ddns.net"><img src="http://haushaltsserver.ddns.net/Haushaltsserver.png" alt="Haushaltsserver"></a>
</div>
<div class="reminder">
<h2>Nur noch {{Daysremaining}} Tage bis zum Ablauf des Zeitraums</h2>
<p>Liebe(r) {{who}},</p>
<p>Wir möchten Sie daran erinnern, dass es nur noch {{Daysremaining}} Tage bis zum Ablauf des vorgesehenen Zeitraums für ihren dieszweiwöchigen Beitrag sind.</p>
<p>Denken Sie daran, dass es wichtig ist, Ihre Aufgaben regelmäßig zu erledigen, um ein sauberes und organisiertes Zuhause zu gewährleisten. Indem Sie Ihre Aufgaben rechtzeitig erledigen, können Sie sicherstellen, dass Ihr Wohnraum für Sie und Ihre Lieben immer eine komfortable und einladende Umgebung bleibt.</p>
<p>Hier ist eine kurze Erinnerung an die anstehende Aufgabe:</p>
<ul>
<li>Bereich:{{task}}: Fällig in {{Daysremaining}} Tagen</li>
</ul>
<p>Vielen Dank, dass Sie sich Zeit genommen haben, um Ihre Aufgaben zu priorisieren und Ihr Zuhause in bestem Zustand zu halten. Wenn Sie Fragen oder Bedenken haben, zögern Sie bitte nicht, uns zu kontaktieren.</p>
<p>Falls sie derzeit für 4 oder mehr Tage nicht zu Hause sind, brauchen sie ihrer Aufgabe natürlich nicht nachkommen. Schreiben Sie ihre Mitbewohner an um eine Notiz auf dem Server zu hinterlassen</p>
<p>Hier ist ihre bisherige Bilanz in Wochennummern</p>
<ul>
<li>aktiv: {{active}}</li>
<li>damit gecovered: {{covered}}</li>
<li>versäumt: {{missing}}</li>
</ul>
<p>als zusätzlichen Anreiz erheben wir 3Euro Gebühr pro versäumte Woche </p>
<p>das Geld wird zu einem zu bestimmenden Zeitpunkt auf das Gemeinschaftskonto überwiesen </p>
<p>Es fallen keine Gebühren an wenn sie im Urlaub sind und das ihren Mtbewohnern mitteilen </p>
</div>
<div class="footer">
<p>Vielen Dank,</p>
<p>ChatGPT und die 3Löwen WG</p>
<a href="https://www.example.com/" style="color: #0070c0; text-decoration: none; font-weight: bold;">Klicken sie auf diesen Link falls sie Urlaub machen oder sich aus anderen Gründen entschuldigen möchte</a>
</div>
</div>
</body>
</html>
[
{
"replacing": "marc",
"what": "bathroom",
"week": 12,
"requested_by": "niclas",
"when_exactly": "03-28-2023",
"key": 4235383834797284618
},
{
"replacing": "marc",
"what": "bathroom",
"week": 12,
"requested_by": "niclas",
"when_exactly": "03-28-2023",
"key": 512363826803233742
},
{
"replacing": "mikiya",
"what": "doorway",
"week": 12,
"requested_by": "niclas",
"when_exactly": "03-28-2023",
"key": 6771654698783255334
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 13,
"requested_by": "mikiya",
"when_exactly": "2023-04-05",
"key": 44382
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 13,
"requested_by": "mikiya",
"when_exactly": "2023-04-06",
"key": 87867
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 13,
"requested_by": "mikiya",
"when_exactly": "2023-04-07",
"key": 52476
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 13,
"requested_by": "mikiya",
"when_exactly": "2023-04-07",
"key": 99587
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 13,
"requested_by": "mikiya",
"when_exactly": "2023-04-08",
"key": 155838
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 13,
"requested_by": "mikiya",
"when_exactly": "2023-04-09",
"key": 12403
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 14,
"requested_by": "mikiya",
"when_exactly": "2023-04-12",
"key": 57689
},
{
"replacing": "niclas",
"what": "Excuse",
"week": 14,
"requested_by": "niclas",
"when_exactly": "2023-04-12",
"key": 155610
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 14,
"requested_by": "mikiya",
"when_exactly": "2023-04-13",
"key": 146652
},
{
"replacing": "marc",
"what": "Excuse",
"week": 15,
"requested_by": "marc",
"when_exactly": "2023-04-19",
"key": 45365
},
{
"replacing": "marc",
"what": "Excuse",
"week": 15,
"requested_by": "marc",
"when_exactly": "2023-04-20",
"key": 57842
},
{
"replacing": "marc",
"what": "Excuse",
"week": 15,
"requested_by": "marc",
"when_exactly": "2023-04-21",
"key": 30665
},
{
"replacing": "marc",
"what": "Excuse",
"week": 15,
"requested_by": "marc",
"when_exactly": "2023-04-21",
"key": 169109
},
{
"replacing": "marc",
"what": "Excuse",
"week": 15,
"requested_by": "marc",
"when_exactly": "2023-04-22",
"key": 12519
},
{
"replacing": "marc",
"what": "Excuse",
"week": 15,
"requested_by": "marc",
"when_exactly": "2023-04-23",
"key": 30749
},
{
"replacing": "marc",
"what": "Excuse",
"week": 16,
"requested_by": "marc",
"when_exactly": "2023-04-26",
"key": 156601
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 16,
"requested_by": "mikiya",
"when_exactly": "2023-04-26",
"key": 43533
},
{
"replacing": "niclas",
"what": "Excuse",
"week": 16,
"requested_by": "niclas",
"when_exactly": "2023-04-26",
"key": 38359
},
{
"replacing": "marc",
"what": "Excuse",
"week": 16,
"requested_by": "marc",
"when_exactly": "2023-04-27",
"key": 133194
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 16,
"requested_by": "mikiya",
"when_exactly": "2023-04-27",
"key": 78259
},
{
"replacing": "niclas",
"what": "Excuse",
"week": 16,
"requested_by": "niclas",
"when_exactly": "2023-04-27",
"key": 105431
},
{
"replacing": "marc",
"what": "Excuse",
"week": 16,
"requested_by": "marc",
"when_exactly": "2023-04-28",
"key": 161753
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 16,
"requested_by": "mikiya",
"when_exactly": "2023-04-28",
"key": 87596
},
{
"replacing": "marc",
"what": "Excuse",
"week": 16,
"requested_by": "marc",
"when_exactly": "2023-04-28",
"key": 94683
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 16,
"requested_by": "mikiya",
"when_exactly": "2023-04-28",
"key": 38925
},
{
"replacing": "marc",
"what": "Excuse",
"week": 16,
"requested_by": "marc",
"when_exactly": "2023-04-29",
"key": 148728
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 16,
"requested_by": "mikiya",
"when_exactly": "2023-04-29",
"key": 156222
},
{
"replacing": "marc",
"what": "Excuse",
"week": 16,
"requested_by": "marc",
"when_exactly": "2023-04-29",
"key": 156318
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 16,
"requested_by": "mikiya",
"when_exactly": "2023-04-29",
"key": 83884
},
{
"replacing": "marc",
"what": "Excuse",
"week": 17,
"requested_by": "marc",
"when_exactly": "2023-05-03",
"key": 62154
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 17,
"requested_by": "mikiya",
"when_exactly": "2023-05-03",
"key": 166525
},
{
"replacing": "marc",
"what": "Excuse",
"week": 17,
"requested_by": "marc",
"when_exactly": "2023-05-04",
"key": 95032
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 17,
"requested_by": "mikiya",
"when_exactly": "2023-05-04",
"key": 49775
},
{
"replacing": "marc",
"what": "Excuse",
"week": 17,
"requested_by": "marc",
"when_exactly": "2023-05-04",
"key": 174278
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 17,
"requested_by": "mikiya",
"when_exactly": "2023-05-04",
"key": 32737
},
{
"replacing": "marc",
"what": "Excuse",
"week": 17,
"requested_by": "marc",
"when_exactly": "2023-05-05",
"key": 139037
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 17,
"requested_by": "mikiya",
"when_exactly": "2023-05-05",
"key": 171928
},
{
"replacing": "marc",
"what": "Excuse",
"week": 17,
"requested_by": "marc",
"when_exactly": "2023-05-06",
"key": 105012
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 17,
"requested_by": "mikiya",
"when_exactly": "2023-05-06",
"key": 96057
},
{
"replacing": "mikiya",
"what": "Excuse",
"week": 17,
"requested_by": "mikiya",
"when_exactly": "2023-05-06",
"key": 86662
}
]
\ No newline at end of file
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0;text-align:center">
<div class="m_9044162788989325305rev-retail-header-IOm2soK4e" style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:700px">
<table role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0;text-align:center">
<div class="m_9044162788989325305mj-column-per-100" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%">
<table role="presentation" style="vertical-align:top" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="font-size:0px;padding:32px 24px 8px;word-break:break-word" align="center">
<table role="presentation" style="border-collapse:collapse;border-spacing:0px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="width:66px"><a href="http://haushaltsserver.ddns.net" style="color:#0666eb;text-decoration:none" target="_blank"><img alt="Haushaltsserver" src="http://192.168.0.81:7980/Haushaltsserver.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:10rem;font-size:30px" class="CToWUd" data-bit="iit" width="66" height="auto"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:700px">
<table role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0;text-align:center">
<div class="m_9044162788989325305mj-column-per-100" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top;padding:0">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="m_9044162788989325305rev-title-cXieOKSAN1" style="font-size:0px;padding:16px 24px;word-break:break-word" align="center">
<div style="font-family:Basier Circle,Helvetica Neue,Arial,sans-serif;font-size:34px;font-style:normal;font-weight:bold;letter-spacing:-0.2px;line-height:119%;text-align:center;color:#1a1c1f">Bestätige das Mikiya das Bad sauber gemacht hat</div>
</td>
<a href="url">link text</a>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:700px">
<table role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0;text-align:center">
<div class="m_9044162788989325305mj-column-per-100" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top;padding:0">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="m_9044162788989325305rev-text-YK5sTsOLZr" style="font-size:0px;padding:8px 24px;word-break:break-word" align="center">
<div style="font-family:Basier Circle,Helvetica Neue,Arial,sans-serif;font-size:22px;font-style:normal;font-weight:normal;line-height:167%;text-align:center;color:#1a1c1f">
<p style="margin:16px 0">wenn das stimmt tipp auf den button</p>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="m_9044162788989325305rev-button-ywl8cPrZXm" style="background:#ffffff;background-color:#ffffff;margin:0px auto;max-width:700px">
<table role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
<tr>
<td style="direction:ltr;font-size:0px;padding:0 24px;text-align:center">
<div class="m_9044162788989325305mj-column-per-100" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="vertical-align:top;padding:0">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="font-size:0px;padding:0;padding-top:24px;padding-right:0;padding-bottom:24px;padding-left:0;word-break:break-word" align="center">
<table style="color:#000000;font-family:Basier Circle,Helvetica Neue,Arial,sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:auto;border:0" width="NaN" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td role="presentation" style="border-radius:18px;font-style:normal;text-align:center;border:none;height:56px" valign="middle" bgcolor="#0666EB" align="center"><a href="http://haushaltsserver.ddns.net" style="font-size:18px;font-style:normal;font-weight:500;vertical-align:middle;background:none;color:#ffffff;display:table-cell;margin:0;padding:16px 24px;text-decoration:none" target="_blank" data-saferedirecturl="http://haushaltsserver.ddns.net">Sauber!</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
static/Haushaltsserver.png

38.8 KiB

static/Haushaltsserver_old.png

377 KiB

This diff is collapsed.
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<title>Yew App</title>
<link rel="stylesheet" href="/style-3e72bfed36b0fe1d.css">
<link rel="preload" href="/Haushaltsplan0_1-a57660e7fe73f62d_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/Haushaltsplan0_1-a57660e7fe73f62d.js"></head>
<body> <script type="module">import init from '/Haushaltsplan0_1-a57660e7fe73f62d.js';init('/Haushaltsplan0_1-a57660e7fe73f62d_bg.wasm');</script></body></html>
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment