Initial version

This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2026-01-30 10:06:46 +01:00
commit 50d66c2985
Signed by: ps
GPG key ID: D7026C21E81584BC
5 changed files with 1117 additions and 0 deletions

468
static/style.css Normal file
View file

@ -0,0 +1,468 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f5f5f5;
color: #333;
line-height: 1.6;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 30px;
padding: 20px 0;
border-bottom: 1px solid #ddd;
}
header h1 {
color: #2c3e50;
margin-bottom: 10px;
}
header p {
color: #7f8c8d;
font-size: 1.1em;
}
.input-section {
background: white;
padding: 25px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
/* Server Management Section */
.server-section {
background: white;
padding: 25px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
.server-section h3 {
color: #2c3e50;
margin-bottom: 15px;
font-weight: 600;
}
/* Server Selector Container with Settings Button */
.server-selector-container {
display: flex;
gap: 10px;
align-items: center;
}
.settings-btn {
background-color: #3498db;
color: white;
border: none;
padding: 12px 15px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
flex-shrink: 0;
}
.settings-btn:hover {
background-color: #2980b9;
}
/* Server Management Modal Styles */
#server-modal .modal-content {
max-width: 500px;
}
.server-list {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #eee;
}
.server-list h4 {
margin-bottom: 10px;
color: #2c3e50;
}
#server-list-items {
list-style-type: none;
padding: 0;
margin: 0;
}
#server-list-items li {
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
margin-bottom: 5px;
background-color: #f8f9fa;
}
#server-list-items li:hover {
background-color: #e9ecef;
}
.server-input-group,
.server-select-group {
margin-bottom: 20px;
}
.server-input-group label,
.server-select-group label {
display: block;
margin-bottom: 10px;
font-weight: 600;
color: #2c3e50;
}
.input-section label {
display: block;
margin-bottom: 10px;
font-weight: 600;
color: #2c3e50;
}
#endpoint-url,
#server-url,
#server-api-key,
#server-name {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 4px;
font-size: 16px;
margin-bottom: 15px;
transition: border-color 0.3s;
}
#endpoint-url:focus,
#server-url:focus,
#server-api-key:focus,
#server-name:focus {
outline: none;
border-color: #3498db;
}
#fetch-button,
#add-server,
#remove-server {
background-color: #3498db;
color: white;
border: none;
padding: 12px 24px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
#fetch-button:hover,
#add-server:hover,
#remove-server:hover {
background-color: #2980b9;
}
#fetch-button:disabled {
background-color: #bdc3c7;
cursor: not-allowed;
}
/* Server Selector Styling */
#server-selector {
width: 100%;
padding: 12px;
border: 2px solid #ddd;
border-radius: 4px;
font-size: 16px;
margin-bottom: 15px;
transition: border-color 0.3s;
background-color: white;
}
#server-selector:focus {
outline: none;
border-color: #3498db;
}
/* Server Button Styling */
#add-server,
#remove-server {
background-color: #3498db;
color: white;
border: none;
padding: 12px 24px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
width: 100%;
margin-top: 10px;
}
#add-server:hover,
#remove-server:hover {
background-color: #2980b9;
}
/* Green button for add */
#add-server {
background-color: #27ae60;
}
#add-server:hover {
background-color: #219653;
}
/* Red button for remove */
#remove-server {
background-color: #e74c3c;
}
#remove-server:hover {
background-color: #c0392b;
}
.loading {
text-align: center;
padding: 20px;
}
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto 15px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.error {
background-color: #e74c3c;
color: white;
padding: 15px;
border-radius: 4px;
margin: 20px 0;
}
.results {
background: white;
padding: 25px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.results h2 {
color: #2c3e50;
margin-bottom: 20px;
text-align: center;
}
.model-item {
background-color: #f8f9fa;
border: 1px solid #eee;
border-radius: 6px;
padding: 15px;
margin-bottom: 10px;
transition: transform 0.2s;
}
.model-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.model-name {
font-weight: 600;
color: #2c3e50;
font-size: 1.1em;
}
.model-id {
color: #7f8c8d;
font-family: monospace;
font-size: 0.9em;
margin-top: 5px;
}
.hidden {
display: none;
}
@media (max-width: 600px) {
.container {
padding: 10px;
}
.input-section,
.results {
padding: 15px;
}
header h1 {
font-size: 1.5em;
}
}
/* Chat Modal Styles */
.modal {
display: flex;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
align-items: center;
justify-content: center;
}
/* Ensure hidden modals are completely invisible and don't interfere with page interaction */
.modal.hidden {
display: none !important;
visibility: hidden;
}
.modal-content {
background-color: white;
border-radius: 8px;
width: 90%;
max-width: 600px;
max-height: 80vh;
display: flex;
flex-direction: column;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.modal-header {
padding: 20px;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
color: #2c3e50;
}
.close {
font-size: 28px;
font-weight: bold;
cursor: pointer;
color: #aaa;
}
.close:hover {
color: #000;
}
.modal-body {
padding: 20px;
flex: 1;
display: flex;
flex-direction: column;
}
.chat-messages {
flex: 1;
overflow-y: auto;
margin-bottom: 20px;
min-height: 300px;
max-height: 400px;
}
.chat-message {
margin-bottom: 15px;
padding: 10px;
border-radius: 6px;
max-width: 80%;
}
.chat-message.user {
background-color: #3498db;
color: white;
margin-left: auto;
text-align: right;
}
.chat-message.ai {
background-color: #f8f9fa;
color: #333;
margin-right: auto;
}
.chat-input-container {
display: flex;
gap: 10px;
align-items: flex-end;
}
#chat-input {
flex: 1;
padding: 12px;
border: 2px solid #ddd;
border-radius: 4px;
font-family: inherit;
font-size: 14px;
resize: vertical;
}
#chat-input:focus {
outline: none;
border-color: #3498db;
}
#send-message {
background-color: #3498db;
color: white;
border: none;
padding: 12px 20px;
border-radius: 4px;
cursor: pointer;
height: fit-content;
}
#send-message:hover:not(:disabled) {
background-color: #2980b9;
}
#send-message:disabled {
background-color: #bdc3c7;
cursor: not-allowed;
}
.chat-message.streaming {
opacity: 0.7;
}
@media (max-width: 600px) {
.modal-content {
width: 95%;
margin: 20px;
}
.chat-messages {
min-height: 200px;
max-height: 300px;
}
}