81 lines
2.4 KiB
Plaintext
81 lines
2.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>RSS Reader</title>
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
<style>
|
|
.top-bar {
|
|
background-color: #333;
|
|
color: white;
|
|
padding: 0.5rem 1rem;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.logout-button {
|
|
background-color: #dc3545;
|
|
color: white;
|
|
border: none;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.logout-button:hover {
|
|
background-color: #c82333;
|
|
}
|
|
|
|
/* Adjust main content to account for top bar */
|
|
.with-sidebar {
|
|
padding-top: 3rem;
|
|
}
|
|
|
|
.sidebar {
|
|
top: 3rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="with-sidebar">
|
|
<div class="top-bar">
|
|
<button class="logout-button" id="logoutButton">Logout</button>
|
|
</div>
|
|
<div class="sidebar">
|
|
<h2>Navigation</h2>
|
|
<ul>
|
|
<li><a href="/">Home</a></li>
|
|
<li><a href="/message">Message</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="main-content">
|
|
<h1>Welcome to RSS Reader</h1>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
|
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
</div>
|
|
|
|
<script>
|
|
document.getElementById('logoutButton').addEventListener('click', async () => {
|
|
try {
|
|
const response = await fetch('/logout', {
|
|
method: 'POST',
|
|
});
|
|
|
|
if (response.ok) {
|
|
window.location.href = '/login';
|
|
}
|
|
} catch (error) {
|
|
console.error('Logout failed:', error);
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|