152 lines
5.2 KiB
HTML
152 lines
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{block "title" .}}HeaderAnalyzer{{end}}</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
|
<style>
|
|
/* Popup notification styles */
|
|
.popup-notification {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
z-index: 10000;
|
|
background: #f44336;
|
|
color: white;
|
|
padding: 15px 20px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
|
max-width: 400px;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
transform: translateX(100%);
|
|
transition: transform 0.3s ease-in-out;
|
|
}
|
|
|
|
.popup-notification.show {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.popup-notification.error {
|
|
background: #f44336;
|
|
}
|
|
|
|
.popup-notification.warning {
|
|
background: #ff9800;
|
|
}
|
|
|
|
.popup-notification.success {
|
|
background: #4caf50;
|
|
}
|
|
|
|
.popup-notification.info {
|
|
background: #2196f3;
|
|
}
|
|
|
|
.popup-notification .close-btn {
|
|
float: right;
|
|
background: none;
|
|
border: none;
|
|
color: white;
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
margin-left: 10px;
|
|
padding: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
.popup-notification .close-btn:hover {
|
|
opacity: 0.7;
|
|
}
|
|
</style>
|
|
{{block "head" .}}{{end}}
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="/" {{if eq .CurrentPage "home"}}class="active"{{end}}>Analyze New Header</a>
|
|
<a href="/dns" {{if eq .CurrentPage "dns"}}class="active"{{end}}>DNS Tools</a>
|
|
<a href="/password" {{if eq .CurrentPage "password"}}class="active"{{end}}>Password Generator</a>
|
|
<a href="/pwpush" {{if eq .CurrentPage "pwpush"}}class="active"{{end}}>Password Pusher</a>
|
|
</nav>
|
|
|
|
<main>
|
|
{{block "content" .}}
|
|
<div class="container">
|
|
<h1>HeaderAnalyzer</h1>
|
|
<p>Welcome to HeaderAnalyzer - your tool for email header analysis, DNS tools, and password generation.</p>
|
|
</div>
|
|
{{end}}
|
|
</main>
|
|
|
|
<!-- Popup notification container -->
|
|
<div id="popup-container"></div>
|
|
|
|
<script>
|
|
// Popup notification system
|
|
function showPopup(message, type = 'error', duration = 5000) {
|
|
const container = document.getElementById('popup-container');
|
|
const popup = document.createElement('div');
|
|
popup.className = `popup-notification ${type}`;
|
|
popup.innerHTML = `
|
|
<button class="close-btn" onclick="this.parentElement.remove()">×</button>
|
|
${message}
|
|
`;
|
|
|
|
container.appendChild(popup);
|
|
|
|
// Trigger animation
|
|
setTimeout(() => popup.classList.add('show'), 10);
|
|
|
|
// Auto-remove after duration
|
|
if (duration > 0) {
|
|
setTimeout(() => {
|
|
popup.classList.remove('show');
|
|
setTimeout(() => popup.remove(), 300);
|
|
}, duration);
|
|
}
|
|
}
|
|
|
|
// Show popup from URL parameters (for redirects)
|
|
function checkForErrorParams() {
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const error = urlParams.get('error');
|
|
const warning = urlParams.get('warning');
|
|
const success = urlParams.get('success');
|
|
const info = urlParams.get('info');
|
|
|
|
if (error) {
|
|
showPopup(decodeURIComponent(error), 'error');
|
|
// Clean URL
|
|
urlParams.delete('error');
|
|
window.history.replaceState({}, '', `${window.location.pathname}${urlParams.toString() ? '?' + urlParams.toString() : ''}`);
|
|
}
|
|
|
|
if (warning) {
|
|
showPopup(decodeURIComponent(warning), 'warning');
|
|
urlParams.delete('warning');
|
|
window.history.replaceState({}, '', `${window.location.pathname}${urlParams.toString() ? '?' + urlParams.toString() : ''}`);
|
|
}
|
|
|
|
if (success) {
|
|
showPopup(decodeURIComponent(success), 'success');
|
|
urlParams.delete('success');
|
|
window.history.replaceState({}, '', `${window.location.pathname}${urlParams.toString() ? '?' + urlParams.toString() : ''}`);
|
|
}
|
|
|
|
if (info) {
|
|
showPopup(decodeURIComponent(info), 'info');
|
|
urlParams.delete('info');
|
|
window.history.replaceState({}, '', `${window.location.pathname}${urlParams.toString() ? '?' + urlParams.toString() : ''}`);
|
|
}
|
|
}
|
|
|
|
// Check for error parameters when page loads
|
|
document.addEventListener('DOMContentLoaded', checkForErrorParams);
|
|
</script>
|
|
|
|
{{block "scripts" .}}{{end}}
|
|
</body>
|
|
</html>
|