NLP_WSD / templates /error.html
gkc55's picture
Enhanced UI with modern design, better user experience, and responsive layout
e37e31d
<!-- templates/error.html -->
<!DOCTYPE html>
<html>
<head>
<title>Error - Word Sense Disambiguation Tool</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
background: linear-gradient(135deg, #f8fafc 0%, #e3e6f3 100%);
min-height: 100vh;
display: flex;
flex-direction: column;
}
.navbar {
box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.main-container {
max-width: 700px;
margin: 2rem auto;
padding: 2rem;
background-color: white;
border-radius: 16px;
box-shadow: 0 4px 24px rgba(79,140,255,0.07);
}
.error-icon {
font-size: 4rem;
color: #dc3545;
margin-bottom: 1rem;
}
.error-details {
background-color: #f8f9fa;
padding: 1rem;
border-radius: 8px;
font-family: monospace;
white-space: pre-wrap;
margin-top: 1rem;
border-left: 4px solid #dc3545;
}
.suggestion-card {
background-color: #e3e6f3;
border-radius: 8px;
padding: 1rem;
margin-top: 1.5rem;
}
.suggestion-item {
display: flex;
align-items: flex-start;
margin-bottom: 0.5rem;
}
.suggestion-item i {
color: #4f8cff;
margin-right: 0.5rem;
margin-top: 0.25rem;
}
.footer {
margin-top: auto;
background: #f8fafc;
color: #6c757d;
text-align: center;
padding: 1rem 0 0.5rem 0;
font-size: 0.95rem;
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-white mb-4">
<div class="container">
<a class="navbar-brand fw-bold" href="/">
<i class="fa-solid fa-brain me-2"></i>WSD Tool
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a href="{{ url_for('index') }}" class="btn btn-outline-primary">
<i class="fa-solid fa-arrow-left me-1"></i>Back to Input
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container main-container">
<div class="text-center mb-4">
<div class="error-icon">
<i class="fa-solid fa-circle-exclamation"></i>
</div>
<h2 class="text-danger">Oops! Something went wrong</h2>
</div>
<div class="alert alert-danger">
<i class="fa-solid fa-triangle-exclamation me-2"></i>{{ error_message }}
</div>
{% if error_details %}
<div class="error-details">
<div class="mb-2 fw-bold">Error Details:</div>
{{ error_details }}
</div>
{% endif %}
<div class="suggestion-card">
<h5 class="mb-3"><i class="fa-solid fa-lightbulb me-2"></i>Try These Solutions:</h5>
<div class="suggestion-item">
<i class="fa-solid fa-check-circle"></i>
<div>Use a different word or sentence with clear context</div>
</div>
<div class="suggestion-item">
<i class="fa-solid fa-check-circle"></i>
<div>Make sure the word has multiple meanings in WordNet</div>
</div>
<div class="suggestion-item">
<i class="fa-solid fa-check-circle"></i>
<div>Provide more context around the ambiguous word</div>
</div>
<div class="suggestion-item">
<i class="fa-solid fa-check-circle"></i>
<div>Try one of the example sentences from the home page</div>
</div>
</div>
<div class="text-center mt-4">
<a href="{{ url_for('index') }}" class="btn btn-primary px-4 py-2">
<i class="fa-solid fa-home me-2"></i>Return to Home
</a>
</div>
</div>
<footer class="footer">
<div>Made with <i class="fa-solid fa-heart text-danger"></i> by <a href="https://github.com/Gunjankumar55" target="_blank">Gunjankumar Choudhari</a> | <a href="{{ url_for('lesk_explained') }}">How it works</a></div>
<div class="mt-1">&copy; 2024 WSD Tool. All rights reserved.</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>