Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added inbox master project #825

Merged
merged 1 commit into from
Oct 10, 2024
Merged
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
3 changes: 3 additions & 0 deletions projects/Inbox_Master/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
49 changes: 49 additions & 0 deletions projects/Inbox_Master/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Inbox Master</title>
</head>

<body>
<div class="container">
<div class="gradient-content">
<h1 class="heading">Welcome to Inbox Master</h1>
<p class="paragraph">Mailing made easier for you</p>
</div>
<div class="form-section">
<h2>Hello There!</h2>
<p></p>
<form>
<div class="form-group">
<label for="to">To:</label>
<input type="text" id="to" name="to" required autocomplete="off" placeholder="[email protected]">
</div>
<div class="form-group">
<label for="subject">Subject:</label>
<input type="text" id="subject" name="subject" required autocomplete="off"
placeholder="Brief Description">
</div>
<div class="form-group">
<label for="message">Message:</label>
<textarea id="message" name="message" required spellcheck="false" autocomplete="off"
placeholder="Your Text..."></textarea>
</div>
<div class="form-group result-container">
<p class="result">Email sent successfully.</p>
<button type="button" class="send-btn">Send Email</button>
</div>
</form>
</div>
</div>
<footer>
<p>Made by Anantesh</p>
</footer>

<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js"></script>
<script src="script.js"></script>
</body>
</html>
33 changes: 33 additions & 0 deletions projects/Inbox_Master/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
emailjs.init("k4rG2S6EpHlovYiHt");

const sendBtn = document.querySelector('.send-btn');
const result = document.querySelector('.result');

sendBtn.addEventListener('click', sendEmail);

function sendEmail() {
const to = document.getElementById("to").value;
const subject = document.getElementById("subject").value;
const message = document.getElementById("message").value;

emailjs.send("service_9txlvao", "template_cj83noq", {
to_email: to,
to_name: to,
subject: subject,
message: message,
from_name: "Hades",
})
.then(function (response) {
console.log('Email sent:', response);
result.innerHTML = "Email sent successfully!";
result.classList.remove('error');
result.style.opacity = 1;
},

function (error) {
console.error('Email sending error:', error);
result.innerHTML = "Email failed to send";
result.classList.add('error');
result.style.opacity = 1;
});
}
142 changes: 142 additions & 0 deletions projects/Inbox_Master/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}

body {
margin: 0;
font-family: 'Poppins', sans-serif;
overflow: hidden;
}

.container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
height: 100vh;
}

.gradient-content {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20px;
background: linear-gradient(to right, #ffd2cf, #ffb5b8);
color: white;
overflow: hidden;
text-align: center;
}

.heading {
margin: 0;
background: linear-gradient(45deg, #3498db, #8e44ad, #3498db);
background-size: 200% 200%;
color: transparent;
-webkit-background-clip: text;
background-clip: text;
animation: gradientAnimation 3s linear infinite;
}

@keyframes gradientAnimation {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}

.paragraph {
margin-top: 10px;
color: #100b0b;
text-align: center;
}

.form-section {
flex: 1;
background: black;
color: white;
padding: 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

form {
width: 100%;
max-width: 400px;
}

.form-group {
margin-bottom: 20px;
}

label {
display: block;
color: white;
margin-bottom: 15px;
}

input, textarea {
width: 100%;
padding: 10px;
border: 1px solid white;
background-color: transparent;
color: white;
}

.result-container {
position: relative;
}

.result {
position: absolute;
top: 0;
left: 0;
color: #2ecc71;
display: none;
}

.send-btn {
background-color: #3498db;
color: white;
padding: 10px 15px;
border: none;
cursor: pointer;
}

.send-btn:hover {
background-color: #2980b9;
}

footer {
position: absolute;
bottom: 0;
right: 0;
color: #f0f0f0;
padding: 10px;
transform-origin: 100% 100%;
}

@media screen and (max-width: 600px) {
.container {
flex-direction: column-reverse;
}

.gradient-content{
order: 2;
}
.form-section {
flex: 1;
}
}
Loading