Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Account Status</title>
- <style>
- :root {
- --primary-color: #d9534f;
- --primary-hover: #c9302c;
- --secondary-color: #5bc0de;
- --light-bg: #f0f0f0;
- --light-text: #333;
- --dark-bg: #333;
- --dark-text: #f0f0f0;
- --box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
- --border-radius: 8px;
- --transition-speed: 0.3s;
- --success-color: #5cb85c;
- --error-color: #d9534f;
- }
- body {
- font-family: 'Segoe UI', Arial, sans-serif;
- background-color: var(--light-bg);
- color: var(--light-text);
- margin: 0;
- padding: 0;
- transition: background-color var(--transition-speed), color var(--transition-speed);
- line-height: 1.6;
- }
- .dark-mode {
- background-color: var(--dark-bg);
- color: var(--dark-text);
- }
- .dark-mode .message-box,
- .dark-mode section,
- .dark-mode .user-profile {
- background-color: #444;
- color: var(--dark-text);
- border-color: #555;
- }
- .dark-mode .modal,
- .dark-mode .contact-modal,
- .dark-mode .login-modal,
- .dark-mode .settings-modal {
- background-color: #444;
- color: var(--dark-text);
- }
- .dark-mode .modal-header,
- .dark-mode .modal-footer,
- .dark-mode .contact-modal-header,
- .dark-mode .contact-modal-footer,
- .dark-mode .login-modal-header,
- .dark-mode .login-modal-footer,
- .dark-mode .settings-modal-header,
- .dark-mode .settings-modal-footer {
- background-color: #333;
- border-color: #555;
- }
- .loading-screen {
- display: none;
- justify-content: center;
- align-items: center;
- position: fixed;
- width: 100%;
- height: 100vh;
- background-color: rgba(255, 255, 255, 0.8);
- z-index: 9999;
- }
- .dark-mode .loading-screen {
- background-color: rgba(0, 0, 0, 0.8);
- }
- .loading {
- font-size: 24px;
- color: var(--light-text);
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .loading::after {
- content: "";
- width: 30px;
- height: 30px;
- margin-top: 10px;
- border: 5px solid var(--primary-color);
- border-radius: 50%;
- border-top-color: transparent;
- animation: spinner 1s linear infinite;
- }
- @keyframes spinner {
- to {
- transform: rotate(360deg);
- }
- }
- .dark-mode .loading {
- color: var(--dark-text);
- }
- .container {
- display: none;
- justify-content: center;
- align-items: center;
- min-height: 80vh;
- flex-direction: column;
- padding: 20px;
- margin-bottom: 80px; /* Space for footer */
- }
- .message-box {
- background-color: #fff;
- padding: 30px;
- border: 1px solid #ddd;
- box-shadow: var(--box-shadow);
- text-align: center;
- margin-bottom: 20px;
- animation: fadeInUp 2s forwards;
- border-radius: var(--border-radius);
- width: 100%;
- max-width: 600px;
- }
- nav {
- width: 100%;
- background-color: var(--dark-bg);
- color: #fff;
- padding: 15px 0;
- text-align: center;
- animation: fadeInDown 2s forwards;
- position: sticky;
- top: 0;
- z-index: 1000;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
- align-items: center;
- }
- nav a {
- color: #fff;
- margin: 0 15px;
- text-decoration: none;
- position: relative;
- padding: 5px 0;
- font-weight: 500;
- transition: all 0.3s ease;
- }
- nav a::after {
- content: '';
- position: absolute;
- bottom: 0;
- left: 0;
- width: 0;
- height: 2px;
- background-color: var(--primary-color);
- transition: width 0.3s;
- }
- nav a:hover::after {
- width: 100%;
- }
- nav button {
- background-color: var(--primary-color);
- color: white;
- border: none;
- padding: 8px 15px;
- margin: 0 5px;
- border-radius: var(--border-radius);
- cursor: pointer;
- transition: background-color 0.3s;
- }
- nav button:hover {
- background-color: var(--primary-hover);
- }
- footer {
- text-align: center;
- padding: 20px 0;
- background-color: var(--dark-bg);
- color: #fff;
- position: fixed;
- width: 100%;
- bottom: 0;
- animation: fadeInUp 2s forwards;
- box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
- }
- h1 {
- color: var(--primary-color);
- margin-top: 0;
- }
- p {
- margin-top: 20px;
- }
- .modal,
- .contact-modal,
- .login-modal,
- .settings-modal {
- display: none;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 90%;
- max-width: 400px;
- background-color: #fff;
- border: 1px solid #ddd;
- box-shadow: var(--box-shadow);
- z-index: 10000;
- border-radius: var(--border-radius);
- overflow: hidden;
- animation: fadeIn 0.3s;
- }
- .modal-overlay {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 9999;
- animation: fadeIn 0.3s;
- }
- .modal-header,
- .contact-modal-header,
- .login-modal-header,
- .settings-modal-header {
- padding: 15px;
- background-color: #f5f5f5;
- border-bottom: 1px solid #ddd;
- border-top-left-radius: var(--border-radius);
- border-top-right-radius: var(--border-radius);
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .modal-header h2,
- .contact-modal-header h2,
- .login-modal-header h2,
- .settings-modal-header h2 {
- margin: 0;
- font-size: 1.25rem;
- }
- .close-icon {
- cursor: pointer;
- font-size: 1.5rem;
- color: #777;
- transition: color 0.3s;
- }
- .close-icon:hover {
- color: var(--primary-color);
- }
- .modal-body,
- .contact-modal-body,
- .login-modal-body,
- .settings-modal-body {
- padding: 20px;
- }
- .modal-footer,
- .contact-modal-footer,
- .login-modal-footer,
- .settings-modal-footer {
- padding: 15px;
- background-color: #f5f5f5;
- border-top: 1px solid #ddd;
- text-align: right;
- border-bottom-left-radius: var(--border-radius);
- border-bottom-right-radius: var(--border-radius);
- }
- .modal button,
- .contact-modal button,
- .login-modal button,
- .settings-modal button,
- .message-box button {
- padding: 8px 15px;
- background-color: var(--primary-color);
- color: #fff;
- border: none;
- cursor: pointer;
- border-radius: 5px;
- transition: background-color 0.3s;
- margin-left: 10px;
- }
- .modal button.close,
- .contact-modal button.close,
- .login-modal button.close,
- .settings-modal button.close {
- background-color: var(--secondary-color);
- }
- .modal button:hover,
- .contact-modal button:hover,
- .login-modal button:hover,
- .settings-modal button:hover,
- .message-box button:hover {
- background-color: var(--primary-hover);
- }
- .modal form,
- .contact-modal form,
- .login-modal form {
- display: flex;
- flex-direction: column;
- }
- .form-group {
- margin-bottom: 15px;
- }
- .form-group label {
- display: block;
- margin-bottom: 5px;
- font-weight: 500;
- }
- .form-group input,
- .form-group textarea {
- width: 100%;
- padding: 10px;
- border: 1px solid #ddd;
- border-radius: 5px;
- font-family: inherit;
- font-size: 1rem;
- transition: border-color 0.3s;
- }
- .form-group input:focus,
- .form-group textarea:focus {
- outline: none;
- border-color: var(--primary-color);
- box-shadow: 0 0 0 2px rgba(217, 83, 79, 0.2);
- }
- section {
- padding: 30px;
- background-color: #fff;
- margin: 20px auto;
- border: 1px solid #ddd;
- box-shadow: var(--box-shadow);
- border-radius: var(--border-radius);
- max-width: 800px;
- animation: fadeIn 1s;
- }
- section h2 {
- color: var(--primary-color);
- margin-top: 0;
- padding-bottom: 10px;
- border-bottom: 2px solid #eee;
- }
- .faq {
- margin: 15px 0;
- cursor: pointer;
- padding: 15px;
- border: 1px solid #ddd;
- border-radius: 5px;
- transition: all 0.3s;
- box-shadow: 0 1px 3px rgba(0,0,0,0.05);
- }
- .faq:hover {
- background-color: #f9f9f9;
- transform: translateY(-2px);
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
- }
- .faq.active {
- border-color: var(--primary-color);
- background-color: rgba(217, 83, 79, 0.05);
- }
- .faq-answer {
- display: none;
- padding: 15px;
- border-top: 1px solid #ddd;
- margin-top: 10px;
- line-height: 1.6;
- }
- .success-message,
- .error-message {
- color: var(--success-color);
- font-weight: bold;
- margin-top: 10px;
- padding: 10px;
- border-radius: 5px;
- animation: fadeIn 0.5s;
- }
- .error-message {
- color: white;
- background-color: var(--error-color);
- }
- .success-message {
- color: white;
- background-color: var(--success-color);
- }
- .back-to-top {
- position: fixed;
- bottom: 80px;
- right: 20px;
- background-color: var(--primary-color);
- color: white;
- border: none;
- border-radius: 50%;
- width: 50px;
- height: 50px;
- font-size: 20px;
- cursor: pointer;
- display: none;
- transition: all 0.3s;
- box-shadow: 0 2px 5px rgba(0,0,0,0.2);
- z-index: 99;
- }
- .back-to-top:hover {
- background-color: var(--primary-hover);
- transform: translateY(-3px);
- box-shadow: 0 4px 8px rgba(0,0,0,0.3);
- }
- .toast {
- position: fixed;
- bottom: 20px;
- right: 20px;
- background-color: var(--success-color);
- color: white;
- padding: 15px 25px;
- border-radius: 5px;
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
- display: none;
- z-index: 10000;
- animation: slideIn 0.5s;
- }
- @keyframes slideIn {
- from {
- transform: translateX(100%);
- opacity: 0;
- }
- to {
- transform: translateX(0);
- opacity: 1;
- }
- }
- .cookie-consent {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background-color: var(--dark-bg);
- color: #fff;
- padding: 15px;
- text-align: center;
- display: none;
- z-index: 9998;
- animation: slideUp 0.5s;
- box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
- }
- @keyframes slideUp {
- from {
- transform: translateY(100%);
- }
- to {
- transform: translateY(0);
- }
- }
- .cookie-consent button {
- background-color: var(--secondary-color);
- border: none;
- color: white;
- padding: 8px 15px;
- margin-left: 10px;
- cursor: pointer;
- border-radius: 5px;
- transition: background-color 0.3s;
- }
- .cookie-consent button:hover {
- background-color: #46b8da;
- }
- .rating {
- display: flex;
- justify-content: center;
- margin: 15px 0;
- }
- .rating label {
- margin: 0 5px;
- cursor: pointer;
- font-size: 24px;
- color: #ccc;
- transition: color 0.3s;
- }
- .rating input {
- display: none;
- }
- .rating label:hover,
- .rating label:hover ~ label,
- .rating input:checked ~ label {
- color: #ffcc00;
- }
- .character-count {
- font-size: 12px;
- color: #888;
- margin-top: 5px;
- text-align: right;
- }
- .password-toggle {
- cursor: pointer;
- color: #007bff;
- text-decoration: underline;
- margin-top: 5px;
- display: block;
- font-size: 14px;
- }
- .user-profile {
- display: none;
- margin: 20px auto;
- padding: 30px;
- background-color: #fff;
- border: 1px solid #ddd;
- border-radius: var(--border-radius);
- box-shadow: var(--box-shadow);
- width: 100%;
- max-width: 600px;
- animation: fadeIn 1s;
- }
- .user-avatar {
- width: 100px;
- height: 100px;
- border-radius: 50%;
- background-color: #eee;
- margin: 0 auto 20px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 40px;
- color: #aaa;
- }
- .logout-button {
- background-color: var(--primary-color);
- color: white;
- border: none;
- padding: 10px 15px;
- border-radius: 5px;
- cursor: pointer;
- margin-top: 20px;
- transition: background-color 0.3s;
- }
- .logout-button:hover {
- background-color: var(--primary-hover);
- }
- .ad-blocker-warning {
- display: none;
- background-color: #f8d7da;
- color: #721c24;
- padding: 15px;
- border: 1px solid #f5c6cb;
- border-radius: 5px;
- margin: 20px auto;
- max-width: 800px;
- animation: fadeIn 1s;
- }
- .points-display {
- font-weight: bold;
- margin: 20px;
- padding: 10px 15px;
- background-color: #f8f9fa;
- border-radius: 5px;
- display: inline-block;
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
- animation: pulse 2s infinite;
- }
- @keyframes pulse {
- 0% {
- box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.4);
- }
- 70% {
- box-shadow: 0 0 0 5px rgba(217, 83, 79, 0);
- }
- 100% {
- box-shadow: 0 0 0 0 rgba(217, 83, 79, 0);
- }
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @keyframes fadeInUp {
- from {
- transform: translateY(20px);
- opacity: 0;
- }
- to {
- transform: translateY(0);
- opacity: 1;
- }
- }
- @keyframes fadeInDown {
- from {
- transform: translateY(-20px);
- opacity: 0;
- }
- to {
- transform: translateY(0);
- opacity: 1;
- }
- }
- /* Responsive design improvements */
- @media (max-width: 768px) {
- nav {
- flex-direction: column;
- padding: 10px 0;
- }
- nav a {
- margin: 5px 10px;
- }
- nav button {
- margin: 5px;
- }
- section {
- padding: 20px;
- margin: 15px;
- }
- .message-box {
- padding: 20px;
- }
- .back-to-top {
- bottom: 70px;
- right: 15px;
- width: 40px;
- height: 40px;
- font-size: 16px;
- }
- }
- </style>
- </head>
- <body>
- <nav>
- <div class="nav-links">
- <a href="#home" data-tooltip="Go to Home">Home</a>
- <a href="#about" data-tooltip="Learn more About us">About</a>
- <a href="#contact" data-tooltip="Get in touch">Contact</a>
- <a href="#faqs" data-tooltip="Frequently Asked Questions">FAQs</a>
- </div>
- <div class="nav-actions">
- <button id="settings-button" aria-label="Settings"><i class="fa">⚙️</i></button>
- <button id="theme-toggle" aria-label="Toggle Theme"><i class="fa">🌓</i></button>
- <button id="login-button">Login</button>
- </div>
- </nav>
- <div class="loading-screen">
- <div class="loading">Loading...</div>
- </div>
- <div class="container">
- <div class="message-box" role="alert">
- <h1>Account Deleted</h1>
- <p>Your account has been successfully deleted.</p>
- <p>If you have any questions, please contact our support team.</p>
- <div class="message-actions">
- <button class="feedback-button">Share Feedback</button>
- <button class="contact-button">Contact Support</button>
- </div>
- <div class="success-message"></div>
- </div>
- <!-- User Profile Section -->
- <div class="user-profile" id="user-profile">
- <div class="user-avatar">👤</div>
- <h2>Your Profile</h2>
- <p><strong>Username:</strong> <span id="profile-username"></span></p>
- <p><strong>Email:</strong> <span id="profile-email"></span></p>
- <button class="logout-button" id="logout-button">Logout</button>
- </div>
- <!-- Ad Blocker Warning -->
- <div class="ad-blocker-warning" id="ad-blocker-warning">
- <p>It seems you are using an ad blocker. Please consider disabling it to support us.</p>
- <button id="dismiss-ad-warning">Dismiss</button>
- </div>
- <!-- Points Display -->
- <div class="points-display" id="points-display">
- Points Earned: <span id="points">0</span>
- </div>
- </div>
- <section id="about">
- <h2>About Us</h2>
- <p>We are committed to providing the best service for our customers. Our team is dedicated to ensuring your
- satisfaction.</p>
- <p>For any inquiries, please reach out to us through the contact form or our support channels.</p>
- </section>
- <section id="faqs">
- <h2>Frequently Asked Questions</h2>
- <div class="faq" role="button" aria-expanded="false" tabindex="0">
- <strong>Q:</strong> How can I retrieve my account?
- <div class="faq-answer" aria-hidden="true">A: Unfortunately, once an account is deleted, it cannot be
- retrieved. Please contact support for further assistance.</div>
- </div>
- <div class="faq" role="button" aria-expanded="false" tabindex="0">
- <strong>Q:</strong> Who can I contact for more help?
- <div class="faq-answer" aria-hidden="true">A: You can reach our support team through the Contact section
- for more help.</div>
- </div>
- <div class="faq" role="button" aria-expanded="false" tabindex="0">
- <strong>Q:</strong> What should I do if I change my mind about deleting my account?
- <div class="faq-answer" aria-hidden="true">A: If you have any concerns, please get in touch with our
- support team as soon as possible.</div>
- </div>
- <div class="faq" role="button" aria-expanded="false" tabindex="0">
- <strong>Q:</strong> Can I create a new account after deletion?
- <div class="faq-answer" aria-hidden="true">A: Yes, you can create a new account anytime after deletion.
- </div>
- </div>
- </section>
- <div class="modal-overlay" id="modal-overlay"></div>
- <div class="modal" role="dialog" aria-labelledby="feedback-label" aria-hidden="true">
- <div class="modal-header">
- <h2 id="feedback-label">Feedback</h2>
- <span class="close-icon">×</span>
- </div>
- <div class="modal-body">
- <form id="feedback-form" aria-labelledby="feedback-label">
- <div class="form-group">
- <label for="feedback">Your Feedback:</label>
- <textarea id="feedback" name="feedback" rows="4" required></textarea>
- <div class="character-count" id="feedback-char-count">0/200</div>
- </div>
- <div class="rating">
- <input type="radio" id="star5" name="rating" value="5">
- <label for="star5">★</label>
- <input type="radio" id="star4" name="rating" value="4">
- <label for="star4">★</label>
- <input type="radio" id="star3" name="rating" value="3">
- <label for="star3">★</label>
- <input type="radio" id="star2" name="rating" value="2">
- <label for="star2">★</label>
- <input type="radio" id="star1" name="rating" value="1">
- <label for="star1">★</label>
- </div>
- <div class="error-message" id="feedback-error"></div>
- <button type="submit">Submit</button>
- </form>
- <p><strong>Instructions:</strong> Please provide your feedback regarding our service. Your input is valuable to
- us!</p>
- </div>
- </div>
- <div class="contact-modal" role="dialog" aria-labelledby="contact-label" aria-hidden="true">
- <div class="contact-modal-header">
- <h2 id="contact-label">Contact Support</h2>
- <span class="close-icon">×</span>
- </div>
- <div class="contact-modal-body">
- <form id="contact-form" aria-labelledby="contact-label">
- <div class="form-group">
- <label for="name">Your Name:</label>
- <input type="text" id="name" name="name" required>
- </div>
- <div class="form-group">
- <label for="email">Your Email:</label>
- <input type="email" id="email" name="email" required>
- </div>
- <div class="form-group">
- <label for="message">Your Message:</label>
- <textarea id="message" name="message" rows="4" required></textarea>
- <div class="character-count" id="message-char-count">0/500</div>
- </div>
- <div class="error-message" id="contact-error"></div>
- <button type="submit">Send</button>
- </form>
- <p><strong>Instructions:</strong> Fill out the form to get in touch with our support team. We'll get back to
- you as soon as possible!</p>
- </div>
- </div>
- <div class="login-modal" role="dialog" aria-labelledby="login-label" aria-hidden="true">
- <div class="login-modal-header">
- <h2 id="login-label">Login</h2>
- <span class="close-icon">×</span>
- </div>
- <div class="login-modal-body">
- <form id="login-form" aria-labelledby="login-label">
- <div class="form-group">
- <label for="username">Username:</label>
- <input type="text" id="username" name="username" required>
- </div>
- <div class="form-group">
- <label for="password">Password:</label>
- <input type="password" id="password" name="password" required>
- <span class="password-toggle" id="toggle-password">Show Password</span>
- </div>
- <a href="#" id="forgot-password">Forgot Password?</a>
- <div class="error-message" id="login-error"></div>
- <button type="submit">Login</button>
- </form>
- </div>
- </div>
- <div class="settings-modal" role="dialog" aria-labelledby="settings-label" aria-hidden="true">
- <div class="settings-modal-header">
- <h2 id="settings-label">Settings</h2>
- <span class="close-icon">×</span>
- </div>
- <div class="settings-modal-body">
- <h3>Preferences</h3>
- <div class="form-group">
- <label for="notifications">
- <input type="checkbox" id="notifications"> Enable Notifications
- </label>
- </div>
- <div class="form-group">
- <label for="points-system">
- <input type="checkbox" id="points-system"> Enable Points System
- </label>
- </div>
- <div class="form-group">
- <label for="animation-speed">Animation Speed:</label>
- <select id="animation-speed">
- <option value="slow">Slow</option>
- <option value="normal" selected>Normal</option>
- <option value="fast">Fast</option>
- </select>
- </div>
- <div class="error-message" id="settings-error"></div>
- <button id="save-settings">Save Settings</button>
- </div>
- </div>
- <button class="back-to-top" aria-label="Back to top">↑</button>
- <div class="toast" id="toast">Thank you for your feedback!</div>
- <div class="cookie-consent" id="cookie-consent">
- <p>We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.
- <button id="accept-cookies">Accept</button>
- <button id="cookie-settings">Settings</button>
- </p>
- </div>
- <footer>
- <p>© 2023 Your Company. All rights reserved.</p>
- <div class="footer-links">
- <a href="#">Privacy Policy</a> |
- <a href="#">Terms of Service</a> |
- <a href="#">Contact Us</a>
- </div>
- </footer>
- <script>
- document.addEventListener("DOMContentLoaded", function () {
- // DOM elements
- const loadingScreen = document.querySelector(".loading-screen");
- const container = document.querySelector(".container");
- const feedbackError = document.getElementById("feedback-error");
- const contactError = document.getElementById("contact-error");
- const loginError = document.getElementById("login-error");
- const toast = document.getElementById("toast");
- const cookieConsent = document.getElementById("cookie-consent");
- const modalOverlay = document.getElementById("modal-overlay");
- const adBlockerWarning = document.getElementById("ad-blocker-warning");
- const pointsDisplay = document.getElementById("points-display");
- const pointsValue = document.getElementById("points");
- // Loading screen
- loadingScreen.style.display = "flex";
- // Load user preferences from localStorage
- function loadUserPreferences() {
- // Theme preference
- if (localStorage.getItem('theme') === 'dark') {
- document.body.classList.add('dark-mode');
- }
- // User profile
- if (localStorage.getItem('username')) {
- document.getElementById('profile-username').textContent = localStorage.getItem('username');
- document.getElementById('profile-email').textContent = localStorage.getItem('email') || 'No email provided';
- document.getElementById('user-profile').style.display = 'block';
- document.getElementById('login-button').textContent = 'My Account';
- }
- // Settings
- if (localStorage.getItem('notifications') === 'true') {
- document.getElementById('notifications').checked = true;
- }
- if (localStorage.getItem('points-system') === 'true') {
- document.getElementById('points-system').checked = true;
- pointsDisplay.style.display = 'inline-block';
- pointsValue.textContent = localStorage.getItem('points') || '0';
- } else {
- pointsDisplay.style.display = 'none';
- }
- // Animation speed
- const animationSpeed = localStorage.getItem('animation-speed');
- if (animationSpeed) {
- document.getElementById('animation-speed').value = animationSpeed;
- document.documentElement.style.setProperty('--transition-speed',
- animationSpeed === 'slow' ? '0.6s' :
- animationSpeed === 'fast' ? '0.2s' : '0.3s');
- }
- }
- // Initialize app
- function initApp() {
- loadUserPreferences();
- setTimeout(() => {
- loadingScreen.style.display = "none";
- container.style.display = "flex";
- // Increment points if points system is enabled
- if (localStorage.getItem('points-system') === 'true') {
- let points = parseInt(localStorage.getItem('points') || '0');
- points += 10;
- localStorage.setItem('points', points);
- pointsValue.textContent = points;
- // Show points notification
- showToast("You earned 10 points for visiting!");
- }
- }, 1500); // Reduced loading time for better UX
- // Show cookie consent if not accepted
- if (!localStorage.getItem('cookiesAccepted')) {
- cookieConsent.style.display = "block";
- }
- // Check for ad blocker
- setTimeout(() => {
- if (!window.canRunAds) {
- adBlockerWarning.style.display = "block";
- }
- }, 2000);
- }
- // Initialize the app
- initApp();
- // Helper functions
- function showToast(message, duration = 3000) {
- toast.innerText = message;
- toast.style.display = "block";
- setTimeout(() => {
- toast.style.opacity = 0;
- setTimeout(() => {
- toast.style.display = "none";
- toast.style.opacity = 1;
- }, 300);
- }, duration);
- }
- function openModal(modal) {
- modalOverlay.style.display = "block";
- modal.style.display = "block";
- // Focus on first input
- const firstInput = modal.querySelector('input, textarea');
- if (firstInput) firstInput.focus();
- }
- function closeModal(modal) {
- modalOverlay.style.display = "none";
- modal.style.display = "none";
- }
- function closeAllModals() {
- document.querySelectorAll('.modal, .contact-modal, .login-modal, .settings-modal').forEach(modal => {
- modal.style.display = "none";
- });
- modalOverlay.style.display = "none";
- }
- // Event listeners
- document.getElementById("accept-cookies").addEventListener("click", function () {
- localStorage.setItem('cookiesAccepted', 'true');
- cookieConsent.style.display = "none";
- });
- document.getElementById("cookie-settings").addEventListener("click", function() {
- alert("Cookie settings functionality would go here.");
- });
- document.querySelector(".feedback-button").addEventListener("click", function () {
- openModal(document.querySelector(".modal"));
- });
- document.querySelector(".contact-button").addEventListener("click", function () {
- openModal(document.querySelector(".contact-modal"));
- // Auto-fill from localStorage if available
- if (localStorage.getItem('name')) {
- document.getElementById('name').value = localStorage.getItem('name');
- }
- if (localStorage.getItem('email')) {
- document.getElementById('email').value = localStorage.getItem('email');
- }
- });
- document.getElementById("login-button").addEventListener("click", function () {
- if (localStorage.getItem('username')) {
- // If logged in, scroll to profile
- document.getElementById('user-profile').scrollIntoView({behavior: 'smooth'});
- } else {
- // If not logged in, show login modal
- openModal(document.querySelector(".login-modal"));
- }
- });
- document.getElementById("settings-button").addEventListener("click", function () {
- openModal(document.querySelector(".settings-modal"));
- });
- document.getElementById("dismiss-ad-warning").addEventListener("click", function() {
- adBlockerWarning.style.display = "none";
- });
- // Close buttons and overlay
- document.querySelectorAll(".close-icon").forEach(button => {
- button.addEventListener("click", function () {
- closeAllModals();
- });
- });
- modalOverlay.addEventListener("click", function() {
- closeAllModals();
- });
- // Save settings
- document.getElementById("save-settings").addEventListener("click", function() {
- // Save notification preference
- localStorage.setItem('notifications', document.getElementById('notifications').checked);
- // Save points system preference
- const pointsEnabled = document.getElementById('points-system').checked;
- localStorage.setItem('points-system', pointsEnabled);
- // Update points display
- pointsDisplay.style.display = pointsEnabled ? 'inline-block' : 'none';
- // Save animation speed
- const animationSpeed = document.getElementById('animation-speed').value;
- localStorage.setItem('animation-speed', animationSpeed);
- document.documentElement.style.setProperty('--transition-speed',
- animationSpeed === 'slow' ? '0.6s' :
- animationSpeed === 'fast' ? '0.2s' : '0.3s');
- showToast("Settings saved successfully!");
- closeAllModals();
- });
- // Feedback Form Submission
- document.querySelector("#feedback-form").addEventListener("submit", function (event) {
- event.preventDefault();
- feedbackError.textContent = ""; // Clear previous error message
- // Validate form
- const feedback = document.getElementById('feedback').value;
- if (!feedback.trim()) {
- feedbackError.textContent = "Please provide your feedback";
- return;
- }
- // Check if rating is selected
- const rating = document.querySelector('input[name="rating"]:checked');
- if (!rating) {
- feedbackError.textContent = "Please select a rating";
- return;
- }
- // Simulate form submission loading
- const submitButton = this.querySelector('button[type="submit"]');
- const originalButtonText = submitButton.textContent;
- submitButton.textContent = "Submitting...";
- submitButton.disabled = true;
- setTimeout(() => {
- // Simulate a random error for demonstration (less frequent now)
- const hasError = Math.random() < 0.2; // 20% chance of error
- if (hasError) {
- feedbackError.textContent = "Failed to submit feedback. Please try again.";
- } else {
- closeAllModals();
- showToast("Thank you for your feedback!");
- this.reset(); // Reset the form fields
- // Add points if points system is enabled
- if (localStorage.getItem('points-system') === 'true') {
- let points = parseInt(localStorage.getItem('points') || '0');
- points += 50;
- localStorage.setItem('points', points);
- pointsValue.textContent = points;
- showToast("You earned 50 points for your feedback!", 4000);
- }
- }
- submitButton.textContent = originalButtonText;
- submitButton.disabled = false;
- }, 1000); // Simulate async submission
- });
- // Contact Form Submission
- document.querySelector("#contact-form").addEventListener("submit", function (event) {
- event.preventDefault();
- contactError.textContent = ""; // Clear previous error message
- // Save name and email to localStorage for autofill
- localStorage.setItem('name', document.getElementById('name').value);
- localStorage.setItem('email', document.getElementById('email').value);
- // Simulate form submission loading
- const submitButton = this.querySelector('button[type="submit"]');
- const originalButtonText = submitButton.textContent;
- submitButton.textContent = "Sending...";
- submitButton.disabled = true;
- setTimeout(() => {
- // Simulate a random error for demonstration (less frequent now)
- const hasError = Math.random() < 0.2; // 20% chance of error
- if (hasError) {
- contactError.textContent = "Failed to send message. Please try again.";
- } else {
- closeAllModals();
- showToast("Your message has been sent!");
- this.reset(); // Reset the form fields
- // Add points if points system is enabled
- if (localStorage.getItem('points-system') === 'true') {
- let points = parseInt(localStorage.getItem('points') || '0');
- points += 30;
- localStorage.setItem('points', points);
- pointsValue.textContent = points;
- showToast("You earned 30 points for contacting us!", 4000);
- }
- }
- submitButton.textContent = originalButtonText;
- submitButton.disabled = false;
- }, 1000); // Simulate async submission
- });
- // Login Form Submission
- document.querySelector("#login-form").addEventListener("submit", function (event) {
- event.preventDefault();
- loginError.textContent = ""; // Clear previous error message
- const predefinedUsername = "user";
- const predefinedPassword = "password";
- // Simulate form submission loading
- const submitButton = this.querySelector('button[type="submit"]');
- const originalButtonText = submitButton.textContent;
- submitButton.textContent = "Logging in...";
- submitButton.disabled = true;
- setTimeout(() => {
- const username = document.getElementById('username').value;
- const password = document.getElementById('password').value;
- if (username === predefinedUsername && password === predefinedPassword) {
- // Store user data in localStorage
- localStorage.setItem('username', username);
- localStorage.setItem('email', "[email protected]"); // Placeholder for email
- closeAllModals();
- // Update UI for logged in user
- document.getElementById('profile-username').textContent = localStorage.getItem('username');
- document.getElementById('profile-email').textContent = localStorage.getItem('email');
- document.getElementById('user-profile').style.display = 'block';
- document.getElementById('login-button').textContent = 'My Account';
- showToast("Login successful!");
- this.reset(); // Reset the form fields
- // Add points if points system is enabled
- if (localStorage.getItem('points-system') === 'true') {
- let points = parseInt(localStorage.getItem('points') || '0');
- points += 100;
- localStorage.setItem('points', points);
- pointsValue.textContent = points;
- showToast("You earned 100 points for logging in!", 4000);
- }
- } else {
- loginError.textContent = "Invalid username or password. Please try again. (Hint: Use 'user' and 'password')";
- }
- submitButton.textContent = originalButtonText;
- submitButton.disabled = false;
- }, 1000); // Simulate async submission
- });
- // Character Count for Feedback and Message
- const feedbackTextarea = document.getElementById("feedback");
- const messageTextarea = document.getElementById("message");
- const feedbackCharCount = document.getElementById("feedback-char-count");
- const messageCharCount = document.getElementById("message-char-count");
- feedbackTextarea.addEventListener("input", function () {
- const count = this.value.length;
- const max = 200;
- feedbackCharCount.textContent = `${count}/${max}`;
- // Visual feedback for character limit
- if (count > max) {
- feedbackCharCount.style.color = 'red';
- } else if (count > max * 0.8) {
- feedbackCharCount.style.color = 'orange';
- } else {
- feedbackCharCount.style.color = '#888';
- }
- });
- messageTextarea.addEventListener("input", function () {
- const count = this.value.length;
- const max = 500;
- messageCharCount.textContent = `${count}/${max}`;
- // Visual feedback for character limit
- if (count > max) {
- messageCharCount.style.color = 'red';
- } else if (count > max * 0.8) {
- messageCharCount.style.color = 'orange';
- } else {
- messageCharCount.style.color = '#888';
- }
- });
- // Smooth scrolling for navigation links
- const navLinks = document.querySelectorAll("nav a");
- navLinks.forEach(link => {
- link.addEventListener("click", function (event) {
- event.preventDefault();
- const targetId = link.getAttribute("href").substring(1);
- const targetElement = document.getElementById(targetId);
- if (targetElement) {
- targetElement.scrollIntoView({
- behavior: "smooth"
- });
- }
- });
- });
- // FAQ accordions
- const faqs = document.querySelectorAll(".faq");
- faqs.forEach(faq => {
- faq.addEventListener("click", function () {
- const answer = this.querySelector(".faq-answer");
- const expanded = this.getAttribute('aria-expanded') === 'true';
- // Close other FAQs
- faqs.forEach(item => {
- if (item !== faq) {
- item.querySelector(".faq-answer").style.display = "none";
- item.setAttribute('aria-expanded', 'false');
- item.classList.remove('active');
- }
- });
- // Toggle current FAQ
- answer.style.display = expanded ? "none" : "block";
- this.setAttribute('aria-expanded', !expanded);
- this.classList.toggle('active');
- answer.setAttribute('aria-hidden', expanded);
- });
- // Keyboard support for FAQs
- faq.addEventListener("keydown", function(event) {
- if (event.key === 'Enter' || event.key === ' ') {
- event.preventDefault();
- faq.click();
- }
- });
- });
- // Back to top button functionality
- const backToTopButton = document.querySelector(".back-to-top");
- window.addEventListener("scroll", function() {
- if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
- backToTopButton.style.display = "block";
- } else {
- backToTopButton.style.display = "none";
- }
- });
- backToTopButton.addEventListener("click", function () {
- window.scrollTo({
- top: 0,
- behavior: "smooth"
- });
- });
- // Theme toggle functionality
- document.getElementById("theme-toggle").addEventListener("click", function () {
- document.body.classList.toggle("dark-mode");
- // Save theme preference in localStorage
- if (document.body.classList.contains('dark-mode')) {
- localStorage.setItem('theme', 'dark');
- } else {
- localStorage.removeItem('theme');
- }
- });
- // Password visibility toggle
- const togglePassword = document.getElementById("toggle-password");
- const passwordInput = document.getElementById("password");
- togglePassword.addEventListener("click", function () {
- const type = passwordInput.getAttribute("type") === "password" ? "text" : "password";
- passwordInput.setAttribute("type", type);
- this.textContent = type === "password" ? "Show Password" : "Hide Password";
- });
- // Forgot password link
- document.getElementById("forgot-password").addEventListener("click", function (event) {
- event.preventDefault();
- alert("Please contact support to reset your password.");
- });
- // Logout functionality
- document.getElementById("logout-button").addEventListener("click", function () {
- localStorage.removeItem('username');
- localStorage.removeItem('email');
- document.getElementById('user-profile').style.display = 'none';
- document.getElementById('login-button').textContent = 'Login';
- showToast("You have logged out successfully!");
- });
- // Define the ad detection function
- window.canRunAds = true;
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement