|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="UTF-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>{% block title %}PatChat - AI Chat Application{% endblock %}</title> |
|
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> |
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet"> |
|
|
|
<style> |
|
body { |
|
background-color: #f8f9fa; |
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
|
} |
|
|
|
.navbar-brand { |
|
font-weight: bold; |
|
color: #0d6efd !important; |
|
} |
|
|
|
.chat-container { |
|
height: calc(100vh - 200px); |
|
background: white; |
|
border-radius: 10px; |
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1); |
|
} |
|
|
|
.chat-messages { |
|
height: calc(100% - 120px); |
|
overflow-y: auto; |
|
padding: 20px; |
|
} |
|
|
|
.message { |
|
margin-bottom: 20px; |
|
display: flex; |
|
align-items: flex-start; |
|
} |
|
|
|
.message.user { |
|
justify-content: flex-end; |
|
} |
|
|
|
.message.assistant { |
|
justify-content: flex-start; |
|
} |
|
|
|
.message-content { |
|
max-width: 70%; |
|
padding: 12px 16px; |
|
border-radius: 18px; |
|
word-wrap: break-word; |
|
} |
|
|
|
.message.user .message-content { |
|
background-color: #0d6efd; |
|
color: white; |
|
} |
|
|
|
.message.assistant .message-content { |
|
background-color: #e9ecef; |
|
color: #212529; |
|
} |
|
|
|
.message-avatar { |
|
width: 32px; |
|
height: 32px; |
|
border-radius: 50%; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
margin: 0 8px; |
|
font-size: 14px; |
|
font-weight: bold; |
|
} |
|
|
|
.message.user .message-avatar { |
|
background-color: #0d6efd; |
|
color: white; |
|
} |
|
|
|
.message.assistant .message-avatar { |
|
background-color: #6c757d; |
|
color: white; |
|
} |
|
|
|
.chat-input-container { |
|
padding: 20px; |
|
border-top: 1px solid #dee2e6; |
|
} |
|
|
|
.system-prompt-container { |
|
background-color: #f8f9fa; |
|
border-radius: 8px; |
|
padding: 15px; |
|
margin-bottom: 15px; |
|
} |
|
|
|
.conversation-item { |
|
transition: all 0.2s ease; |
|
} |
|
|
|
.conversation-item:hover { |
|
background-color: #f8f9fa; |
|
transform: translateY(-1px); |
|
} |
|
|
|
.loading { |
|
display: none; |
|
text-align: center; |
|
padding: 20px; |
|
} |
|
|
|
.spinner-border-sm { |
|
width: 1rem; |
|
height: 1rem; |
|
} |
|
</style> |
|
|
|
{% block extra_css %}{% endblock %} |
|
</head> |
|
<body> |
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm"> |
|
<div class="container"> |
|
<a class="navbar-brand" href="{{ url_for('index') }}"> |
|
<i class="bi bi-chat-dots"></i> PatChat |
|
</a> |
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-label="Toggle navigation"> |
|
<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 class="nav-link" href="{{ url_for('index') }}"> |
|
<i class="bi bi-chat"></i> Chat |
|
</a> |
|
</li> |
|
<li class="nav-item"> |
|
<a class="nav-link" href="{{ url_for('history') }}"> |
|
<i class="bi bi-clock-history"></i> History |
|
</a> |
|
</li> |
|
</ul> |
|
</div> |
|
</div> |
|
</nav> |
|
|
|
|
|
<main class="container mt-4"> |
|
{% block content %}{% endblock %} |
|
</main> |
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> |
|
|
|
{% block extra_js %}{% endblock %} |
|
</body> |
|
</html> |