94 lines
3.2 KiB
HTML
94 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Autotest{% endblock %}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='layout.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='colour-default.css') }}">
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<header class="header-container">
|
|
<h1>Autotest</h1>
|
|
{% if current_user.is_authenticated %}
|
|
<a href="/account" class="user-account-btn" style="text-align: right;">
|
|
{{ current_user.f_name }} {{ current_user.s_name[0] if current_user.s_name else "" }}
|
|
</a>
|
|
{% endif %}
|
|
|
|
<nav>
|
|
<a href="/">Home</a>
|
|
<a href="/operating-system-setup">Operating Systems</a>
|
|
<a href="/projects">Projects</a>
|
|
<a href="/product-setup">Products</a>
|
|
<a href="/test-bench-setup">Test Bench</a>
|
|
<a href="/schedule-new-test">Schedule Test</a>
|
|
<a href="/active-tests">Active Tests</a>
|
|
<a href="/test-reports">Reports</a>
|
|
<a href="/account">Account</a>
|
|
{% if current_user.is_authenticated %}
|
|
<a href="/signout">Sign out</a>
|
|
{% else %}
|
|
<a href="/signin">Sign in</a>
|
|
{% endif %}
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
|
|
<main>
|
|
{% block body %}{% endblock %}
|
|
</main>
|
|
|
|
|
|
<footer>
|
|
|
|
</footer>
|
|
|
|
|
|
<div id="flash-popup-container" style="position: fixed; top: 120px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 400px; padding: 0 20px; box-sizing: border-box;">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="flash-popup {{ category }}" style="min-width: 280px; max-width: 400px; background-color: #e63946; color: white; padding: 14px 18px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-family: sans-serif; display: flex; justify-content: space-between; align-items: center; gap: 12px; animation: popupFadeIn 0.3s ease;">
|
|
<span style="font-size: 14px; font-weight: 500; line-height: 1.4;">{{ message }}</span>
|
|
<button onclick="this.parentElement.remove()" style="background: none; border: none; color: white; cursor: pointer; font-size: 20px; font-weight: bold; padding: 0; line-height: 1; opacity: 0.8;">×</button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
</div>
|
|
|
|
<style>
|
|
@keyframes popupFadeIn {
|
|
from { opacity: 0; transform: translateY(20px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
const popups = document.querySelectorAll('.flash-popup');
|
|
popups.forEach(function(popup) {
|
|
// Automatically fade and remove the popup after 5 seconds
|
|
setTimeout(function() {
|
|
popup.style.transition = "opacity 0.5s ease, transform 0.5s ease";
|
|
popup.style.opacity = "0";
|
|
popup.style.transform = "translateY(-10px)";
|
|
setTimeout(function() {
|
|
popup.remove();
|
|
}, 500);
|
|
}, 5000);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
{% block scripts %}{% endblock %}
|
|
|
|
</body>
|
|
|
|
</html> |