Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
Subhajit-2023-44 committed Nov 8, 2024
1 parent 3bfa9f9 commit aab22ce
Show file tree
Hide file tree
Showing 3 changed files with 254 additions and 0 deletions.
213 changes: 213 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,221 @@ <h2>Buy Stock</h2>
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
/* Slightly stronger shadow in dark mode */
}



</style>


<!-- Newsletter pop-up -->
<style>
.popup-nl {

display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
justify-content: center;
align-items: center;
z-index: 1009;

}

.popup-content-nl {

display: flex;
background-color: white;
border-radius: 10px;
max-width: 800px;
height: 450px;
width: 700px;
overflow: hidden;
position: relative;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);

}

.close1-btn-nl {

width: 20px;
cursor: pointer;
margin: 18px 10px;
position: absolute;
top: -4px;
right: 12px;
font-size: 18px;
font-weight: 800;

}

.popup-left-nl img {

width: 100%;
height: 100%;
object-fit: cover;

}

.popup-right-nl {

padding: 20px;
width: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;

}

.popup-nl h1 {

font-size: 24px;
background: linear-gradient(to right, #8bed4d, #5ec313);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
text-align: center;
margin-bottom: 12px;
margin-top: 35px;

}

.h2-nl{

font-size: 18px;
margin-bottom: 8px;
text-align: center;
color: #333;

}

.pop_up-nl {

margin-bottom: 15px;
font-weight: bold;
background: linear-gradient(135deg, #305807, #339a00);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 12.7px;

}

.bold{

font-size: 13.1px;

}

input[type="email"] {

width: 100%;
padding: 10px;
margin-bottom: 16px;
border: 1px solid #000000;
border-radius: 5px;
font-size: 14px;

}

.signup-btn1-nl {

width: 100%;
height: 40px;
text-align: center;
background: radial-gradient(circle, #82e143, #5c962f);
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;

}

.signup-btn1-nl:hover {

background-color: #ff4aac;

}

.no-thanks-nl {

display: block;
margin-top: 10px;
color: #888;
text-decoration: none;
margin-bottom: 15px;

}

.no-thanks-nl:hover {

color: #000000;
font-size: 14px;

}

.terms-nl {

margin-top: 15px;
font-size: 10px;
color: #888;

}

.terms-nl a {

display: inline;

}

.terms-nl a:hover {

text-decoration: underline;

}

.popup-right-nl p {

margin-top: 0;
margin-bottom: 10px;
text-align: center;

}

</style>


<div id="popup-nl" class="popup-nl">
<div class="popup-content-nl">
<div class="popup-left-nl">
<img src="newsletterpopup.jpg" alt="finance">
</div>

<div class="popup-right-nl">

<a href="# " class="close1-btn-nl close-nl">X</a>
<h1>Subscribe to Newsletter</h1>
<h2 class="h2-nl">Stay Informed, Stay Ahead!</h2>
<p class="pop_up-nl">Join our community of investors, traders, and financial enthusiasts. Get exclusive access to expert market insights, investment tips, stock analysis, trading strategies, and more!</p>
<form id="emailForm-nl">
<input type="email" id="email-nl" placeholder="Enter your email" required>
<button type="submit" class="signup-btn1-nl">Subscribe</button>
</form>
<a href="#" class="no-thanks-nl close-nl">No thanks</a>
<p class="terms-nl" style="white-space: nowrap;">By subscribing to newsletters, you agree to our <br><a href="terms&cond.html">Terms of Service</a> and <a href="privacynotice.html">Privacy Policy</a>.</p>

</div>

</div>


</div>

<script src="newsletterpopup.js"></script>



<script>
let web3;
Expand Down
Binary file added templates/newsletterpopup.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions templates/newsletterpopup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Show the pop-up automatically when the page loads
window.onload = function() {
document.getElementById('popup-nl').style.display = 'flex';
};


// Close the pop-up when the user clicks the close button
document.querySelector('.close-nl').addEventListener('click', function() {
document.getElementById('popup-nl').style.display = 'none';
});


// // Close the pop-up when clicking outside the pop-up content
// window.addEventListener('click', function(event) {
// const popupContent = document.querySelector('.popup-content'); // Select the popup content
// if (event.target === document.getElementById('popup')) {
// document.getElementById('popup').style.display = 'none';
// }
// });


// Handle form submission
document.getElementById('emailForm-nl').addEventListener('submit', function(event) {
event.preventDefault();

const email = document.getElementById('email-nl').value;
if (email) {
alert(`Your email ID ${email} has been registered successfully for the newsletter.`);
document.getElementById('popup').style.display = 'none';
}
});


// Handle "No thanks" link
document.querySelector('.no-thanks-nl').addEventListener('click', function(event) {
event.preventDefault();
document.getElementById('popup-nl').style.display = 'none';
});



0 comments on commit aab22ce

Please sign in to comment.