Skip to content

Commit

Permalink
Merge pull request #2 from thrivingproject/email-backend-integration
Browse files Browse the repository at this point in the history
Email backend integration
  • Loading branch information
thrivingproject authored May 13, 2024
2 parents 5859f31 + 242e96a commit 6ac5fad
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vscode

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
11 changes: 8 additions & 3 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def handle_send_email():
This function emulates traditional (1990s) handling of form POST requests.
"""
send_email(request.form.get("message"), request.form.get("email"))
return redirect("http://www.christianisaman.com")
return redirect(os.getenv("FRONTEND_SERVER_DOMAIN"))


def send_email(message, user):
Expand All @@ -30,7 +30,12 @@ def send_email(message, user):


if __name__ == "__main__":
import os
from os import path
from dotenv import load_dotenv
load_dotenv()

env_file = path.join(path.dirname(path.realpath(__file__)), "env/.env")

load_dotenv(env_file)

print(os.getenv("FRONTEND_SERVER_DOMAIN"))
app.run(debug=True, port=5001)
50 changes: 28 additions & 22 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
* {
box-sizing: border-box;
}
/* use dark/light based on users web browser settings */
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;
color: #fff;
}
textarea,
input {
background-color: #333;
color: #fff;
border: solid 1px #a2a2a2;
}
a {
color: #73ffd0;
}
box-sizing: border-box;
}
body {
margin: 0;
}
.flex {
display: flex;
}
/* Don't change clicked link color */
/* a:visited {
color: none;
} */
.center {
justify-content: center;
align-items: center;
}
main {
height: 100vh;
}
a,
a:visited {
color: #ff00ff;
}
article {
padding: 3rem;
text-align: center;
Expand All @@ -54,11 +38,33 @@ input {
}
button {
padding: 0.5rem 1rem;
background-color: #73ffd0;
background-color: #ff00ff;
color: white;
border: none;
cursor: pointer;
width: 100px;
align-self: center;
margin-top: 1rem;
border-radius: 3%;
}
/* use dark/light based on users web browser settings */
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;
color: #fff;
}
textarea,
input {
background-color: #333;
color: #fff;
border: solid 1px #a2a2a2;
}
a,
a:visited {
color: #73ffd0;
}
button {
background-color: #73ffd0;
color: black;
}
}

0 comments on commit 6ac5fad

Please sign in to comment.