f4b79a1004
- Modell gewechselt zu aratan/gemma-4-E4B-q8-it-heretic:latest - Multimodale Anfragen (Text + Bild) über Ollama API - Bild-Upload im Chat-Interface mit Vorschau - Automatisches Image-Resizing und JPEG-Kompression - Vision-Regeln im Persona-Prompt integriert - Memory-System erweitert für Bildhinweise - Frontend: Bildvorschau, Upload-Button, responsive Styling - README aktualisiert
428 lines
7.7 KiB
CSS
428 lines
7.7 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--bg-primary: #1a1a2e;
|
|
--bg-secondary: #16213e;
|
|
--bg-tertiary: #0f3460;
|
|
--accent: #e94560;
|
|
--accent-soft: #d4a5a5;
|
|
--text-primary: #eaeaea;
|
|
--text-secondary: #a0a0a0;
|
|
--user-bubble: #0f3460;
|
|
--assistant-bubble: #2d1b4e;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
|
|
color: var(--text-primary);
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.container {
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Header */
|
|
header {
|
|
text-align: center;
|
|
padding: 20px 0;
|
|
border-bottom: 1px solid var(--bg-tertiary);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 2.5rem;
|
|
background: linear-gradient(45deg, var(--accent), var(--accent-soft));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
font-weight: 300;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
.subtitle {
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 3px;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.model-info {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
margin-top: 10px;
|
|
}
|
|
|
|
#vision-badge {
|
|
color: #7ee787;
|
|
font-weight: 600;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.memory-status {
|
|
font-size: 0.8rem;
|
|
color: var(--accent-soft);
|
|
margin-top: 5px;
|
|
padding: 5px 15px;
|
|
background: var(--bg-tertiary);
|
|
border-radius: 15px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.memory-status.warning {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
/* Chat Container */
|
|
.chat-container {
|
|
flex-grow: 1;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
max-height: 60vh;
|
|
}
|
|
|
|
.message {
|
|
padding: 15px 20px;
|
|
border-radius: 20px;
|
|
max-width: 80%;
|
|
line-height: 1.6;
|
|
word-wrap: break-word;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.message.user {
|
|
align-self: flex-end;
|
|
background: var(--user-bubble);
|
|
border-bottom-right-radius: 5px;
|
|
}
|
|
|
|
.message.assistant {
|
|
align-self: flex-start;
|
|
background: var(--assistant-bubble);
|
|
border-bottom-left-radius: 5px;
|
|
border-left: 3px solid var(--accent);
|
|
}
|
|
|
|
.message.system {
|
|
align-self: center;
|
|
background: rgba(233, 69, 96, 0.1);
|
|
border: 1px solid var(--accent);
|
|
font-style: italic;
|
|
}
|
|
|
|
.message em {
|
|
color: var(--accent-soft);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Images inside messages */
|
|
.message-image {
|
|
max-width: 240px;
|
|
max-height: 180px;
|
|
border-radius: 12px;
|
|
margin-bottom: 8px;
|
|
display: block;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
|
cursor: pointer;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.message-image:hover {
|
|
transform: scale(1.03);
|
|
}
|
|
|
|
/* Input Area */
|
|
.input-area {
|
|
position: sticky;
|
|
bottom: 0;
|
|
background: var(--bg-primary);
|
|
padding: 20px 0;
|
|
border-top: 1px solid var(--bg-tertiary);
|
|
}
|
|
|
|
.typing-indicator {
|
|
text-align: center;
|
|
color: var(--accent-soft);
|
|
font-size: 0.85rem;
|
|
margin-bottom: 10px;
|
|
animation: pulse 1.5s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 0.5; }
|
|
50% { opacity: 1; }
|
|
}
|
|
|
|
/* Image Preview above input */
|
|
.image-preview-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 10px;
|
|
padding: 8px;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--bg-tertiary);
|
|
border-radius: 12px;
|
|
width: fit-content;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.image-preview {
|
|
max-height: 80px;
|
|
max-width: 120px;
|
|
border-radius: 8px;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.remove-image-btn {
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 50%;
|
|
width: 24px;
|
|
height: 24px;
|
|
font-size: 16px;
|
|
line-height: 24px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.remove-image-btn:hover {
|
|
background: #ff5a75;
|
|
}
|
|
|
|
/* Input Row */
|
|
.input-row {
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
textarea {
|
|
flex-grow: 1;
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--bg-tertiary);
|
|
border-radius: 25px;
|
|
padding: 15px 20px;
|
|
color: var(--text-primary);
|
|
font-size: 1rem;
|
|
resize: none;
|
|
min-height: 50px;
|
|
max-height: 150px;
|
|
font-family: inherit;
|
|
outline: none;
|
|
transition: border-color 0.3s;
|
|
}
|
|
|
|
textarea:focus {
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.upload-btn {
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-primary);
|
|
border: none;
|
|
border-radius: 25px;
|
|
padding: 15px 18px;
|
|
font-size: 1.1rem;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
height: 50px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.upload-btn:hover:not(:disabled) {
|
|
background: var(--accent);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.upload-btn:disabled {
|
|
background: var(--bg-tertiary);
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.send-btn {
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 25px;
|
|
padding: 15px 30px;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
transition: all 0.3s;
|
|
height: 50px;
|
|
}
|
|
|
|
.send-btn:hover:not(:disabled) {
|
|
background: #ff5a75;
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.send-btn:disabled {
|
|
background: var(--bg-tertiary);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.controls {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 15px;
|
|
margin-top: 15px;
|
|
align-items: center;
|
|
}
|
|
|
|
.control-btn {
|
|
background: transparent;
|
|
border: 1px solid var(--bg-tertiary);
|
|
color: var(--text-secondary);
|
|
padding: 8px 15px;
|
|
border-radius: 15px;
|
|
cursor: pointer;
|
|
font-size: 0.8rem;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
.control-btn:hover {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.char-count {
|
|
font-size: 0.75rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Modal */
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 1000;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: var(--bg-secondary);
|
|
margin: 5% auto;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
width: 80%;
|
|
max-width: 600px;
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
border: 1px solid var(--bg-tertiary);
|
|
}
|
|
|
|
.close {
|
|
color: var(--text-secondary);
|
|
float: right;
|
|
font-size: 28px;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.close:hover {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.modal-content h2 {
|
|
color: var(--accent);
|
|
margin-bottom: 20px;
|
|
font-weight: 300;
|
|
}
|
|
|
|
.modal-content h3 {
|
|
color: var(--accent-soft);
|
|
margin: 20px 0 10px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.modal-content p {
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
margin: 5px 0;
|
|
}
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--bg-tertiary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--accent);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 600px) {
|
|
.container {
|
|
padding: 10px;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.message {
|
|
max-width: 90%;
|
|
padding: 12px 15px;
|
|
}
|
|
|
|
.message-image {
|
|
max-width: 180px;
|
|
max-height: 140px;
|
|
}
|
|
|
|
.input-row {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.upload-btn, .send-btn {
|
|
height: 44px;
|
|
padding: 10px 18px;
|
|
}
|
|
|
|
textarea {
|
|
width: 100%;
|
|
order: -1;
|
|
margin-bottom: 8px;
|
|
}
|
|
}
|