This repository has been archived on 2024-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
ai-virtual-assistant/py/static/styles.css

525 lines
10 KiB
CSS
Raw Permalink Normal View History

2024-09-16 12:17:53 +02:00
:root {
2024-09-16 16:08:00 +02:00
--background-color: white;
2024-09-16 12:17:53 +02:00
--text-color: white;
--font-family: Arial, sans-serif;
--history-background-color: rgb(0, 0, 48);
--models-background-color: rgb(0, 0, 48);
2024-09-17 16:32:27 +02:00
--output-background-color: black;
/* Set the conversation background to black */
--user-message-color: rgb(0, 128, 255);
/* Blueish bubble for user */
--ai-message-color: rgb(100, 100, 255);
/* Lighter blue for AI */
2024-09-16 12:17:53 +02:00
--input-background-color: rgb(0, 0, 48);
--input-button-color: rgb(0, 128, 255);
--input-button-hover-color: rgb(0, 100, 200);
2024-09-17 16:32:27 +02:00
--scrollbar-track: rgb(91, 172, 253);
--scrollbar-thumb: rgb(0, 88, 176);
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
/* Global Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
2024-09-16 16:08:00 +02:00
2024-09-17 16:32:27 +02:00
html,
body {
2024-09-16 12:17:53 +02:00
height: 100vh;
2024-09-17 16:32:27 +02:00
overflow: hidden;
/* Prevent scrolling */
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
/* Body Styling */
body {
margin-top: 2em;
2024-09-16 12:17:53 +02:00
display: flex;
justify-content: center;
align-items: center;
background-color: var(--background-color);
color: var(--text-color);
font-family: var(--font-family);
margin-bottom: 0.5em;
2024-09-16 12:17:53 +02:00
}
2024-09-16 16:08:00 +02:00
/* Header Styling */
2024-09-16 16:08:00 +02:00
header {
background-color: var(--background-color);
color: black;
2024-09-16 16:08:00 +02:00
width: 100%;
text-decoration: none;
position: fixed;
top: 0;
left: 0;
padding: 10px 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
z-index: 1000;
font-family: var(--font-family);
2024-09-16 16:08:00 +02:00
}
header li {
display: inline-block;
margin: 0 15px;
2024-09-16 16:08:00 +02:00
}
header img {
height: 2em;
vertical-align: middle;
2024-09-16 16:08:00 +02:00
}
header a {
color: black;
text-decoration: none;
transition: color 0.3s;
2024-09-16 16:08:00 +02:00
}
header a:hover {
color: var(--input-button-color);
2024-09-16 16:08:00 +02:00
}
2024-09-16 12:17:53 +02:00
/* Container Grid Layout */
.container {
display: grid;
grid-template-columns: 1fr 3fr;
2024-09-17 16:32:27 +02:00
grid-template-rows: 3fr 1fr 1fr 1fr;
2024-09-16 12:17:53 +02:00
gap: 10px;
width: 90vw;
2024-09-17 16:32:27 +02:00
height: 95vh;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
/* History Section */
2024-09-17 16:32:27 +02:00
.history-background {
grid-column: 1/2;
grid-row: 1/2;
height: 100%;
overflow: hidden;
2024-09-16 12:17:53 +02:00
background-color: var(--history-background-color);
padding: 1em;
2024-09-17 16:32:27 +02:00
border-radius: 2em;
}
.history {
height: 100%;
overflow-y: scroll;
padding-right: 10px;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.history ul {
list-style: none;
}
2024-09-16 12:17:53 +02:00
.history ul li {
padding: 10px 0;
border-bottom: 1px solid var(--text-color);
2024-09-16 13:16:11 +02:00
width: 100%;
}
.history ul li a {
2024-09-16 13:16:11 +02:00
display: block;
text-decoration: none;
color: white;
width: 100%;
2024-09-16 16:08:00 +02:00
padding: 5px;
2024-09-16 12:17:53 +02:00
}
2024-09-16 13:16:11 +02:00
.history ul li a:hover {
2024-09-16 13:16:11 +02:00
background-color: var(--input-button-hover-color);
}
2024-09-16 12:17:53 +02:00
/* Models Section */
2024-09-17 16:32:27 +02:00
.model-background {
grid-column: 1/2;
grid-row: 2/5;
overflow-y: auto;
background-color: var(--models-background-color);
border-radius: 2em;
padding: 1em;
height: 90%;
box-sizing: border-box;
overflow: hidden;
}
2024-09-16 12:17:53 +02:00
.models {
2024-09-17 16:32:27 +02:00
grid-column: 1/2;
grid-row: 2/5;
overflow-y: auto;
2024-09-16 12:17:53 +02:00
background-color: var(--models-background-color);
border-radius: 2em;
padding: 1em;
2024-09-17 16:32:27 +02:00
height: 100%;
box-sizing: border-box;
2024-09-17 16:32:27 +02:00
overflow: hidden;
overflow-y: scroll;
}
.models form {
2024-09-18 09:04:09 +02:00
padding-right: 10px;
padding-left: 10px;
display: flex;
align-items: center;
justify-content: center;
2024-09-16 12:17:53 +02:00
}
2024-09-16 13:16:11 +02:00
.models .titel {
padding-bottom: 1em;
display: flex;
justify-content: center;
align-items: center;
2024-09-16 13:16:11 +02:00
}
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5vh;
2024-09-18 09:04:09 +02:00
width: fit-content;
2024-09-17 16:32:27 +02:00
/* height: calc(100% - 2em); */
}
.grid h3 {
font-size: x-large;
2024-09-16 12:17:53 +02:00
}
2024-09-16 13:16:11 +02:00
.model-box {
2024-09-16 13:16:11 +02:00
display: flex;
align-items: center;
justify-content: center;
color: #fff;
border-radius: 5%;
overflow: hidden;
position: relative;
2024-09-17 16:32:27 +02:00
height: 18vh;
width: 18vh;
2024-09-16 13:16:11 +02:00
}
2024-09-17 16:32:27 +02:00
.overlay {
z-index: 900;
position: absolute;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
/* Dark overlay */
color: white;
2024-09-16 12:17:53 +02:00
display: flex;
justify-content: center;
align-items: center;
font-size: 300%;
transition: opacity 0.5s ease;
pointer-events: none;
opacity: 0;
2024-09-17 16:32:27 +02:00
font-size: xx-large;
2024-09-16 12:17:53 +02:00
}
2024-09-18 09:04:09 +02:00
.overlay img {
align-self: flex-end;
justify-self: end;
height: 3vh;
width: 3vh;
position: absolute;
right: 15px;
bottom: 15px;
}
2024-09-17 16:32:27 +02:00
.model-box:hover .overlay {
opacity: 1;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.code-model {
background-image: url(/static/img/code.jpg);
background-repeat: no-repeat;
background-size: cover;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.math-model {
background-image: url(/static/img/math.jpg);
background-color: white;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.language-model {
background-image: url(/static/img/language.jpg);
background-color: #72cce4;
background-repeat: no-repeat;
background-size: contain;
background-position: center;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.default-model {
background-image: url(/static/img/default.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
/* Output Section */
.output {
grid-column: 2;
2024-09-17 16:32:27 +02:00
grid-row: 1 / 4;
2024-09-16 12:17:53 +02:00
border-radius: 2em;
background-color: var(--output-background-color);
padding: 1.5em;
2024-09-16 12:17:53 +02:00
display: flex;
flex-direction: column;
justify-content: flex-start;
font-size: 1.2em;
overflow-y: auto;
2024-09-17 16:32:27 +02:00
min-height: 75vh;
2024-09-16 12:17:53 +02:00
margin-bottom: 0;
width: 100%;
height: 100%;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
/* Conversation */
#conversation {
display: flex;
flex-direction: column;
padding: 10px;
overflow-y: auto;
max-height: 80vh;
2024-09-17 16:32:27 +02:00
background-color: var(--output-background-color);
/* Black background */
border-radius: 10px;
2024-09-17 16:32:27 +02:00
scroll-behavior: smooth;
/* Optional: Smooth scrolling */
2024-09-16 12:17:53 +02:00
}
/* Resizable Conversation */
.resize {
resize: both;
overflow: auto;
/* Allow resizing both horizontally and vertically */
min-width: 300px;
min-height: 300px;
/* Minimum dimensions to prevent it from becoming too small */
}
/* User and AI Messages */
.user-message,
.ai-message {
margin: 10px 0;
padding: 10px 15px;
border-radius: 15px;
max-width: 60%;
2024-09-17 16:32:27 +02:00
width: fit-content;
/* Adjusts width to fit the content */
word-wrap: break-word;
2024-09-17 16:32:27 +02:00
display: block;
/* Changed from inline-block to block */
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
2024-09-16 12:17:53 +02:00
}
/* Align user message to the right */
2024-09-16 12:17:53 +02:00
.user-message {
background-color: var(--user-message-color);
color: var(--text-color);
border-bottom-right-radius: 0;
margin-left: auto;
2024-09-17 16:32:27 +02:00
text-align: right;
/* Align text to the right */
2024-09-16 12:17:53 +02:00
}
/* Align AI message to the left */
2024-09-16 12:17:53 +02:00
.ai-message {
background-color: var(--ai-message-color);
color: var(--text-color);
border-bottom-left-radius: 0;
margin-right: auto;
2024-09-17 16:32:27 +02:00
text-align: left;
/* Align text to the left */
}
/* Output Form Buttons */
.output form {
display: flex;
justify-content: flex-start;
gap: 10px;
}
.output form button {
background-color: transparent;
color: white;
border: none;
padding: 0;
2024-09-17 13:48:04 +02:00
margin: 5px;
cursor: pointer;
transition: transform 0.2s ease-in-out;
}
.output form button:hover {
transform: scale(1.2);
2024-09-16 12:17:53 +02:00
}
.output form button img {
height: 1.8em;
}
2024-09-16 12:17:53 +02:00
/* Input Section */
.input {
2024-09-17 16:32:27 +02:00
grid-column: 2/3;
grid-row: 4/5;
border-radius: 20px;
2024-09-16 12:17:53 +02:00
background-color: var(--input-background-color);
2024-09-17 16:32:27 +02:00
padding: 1.5vh;
2024-09-16 12:17:53 +02:00
display: flex;
justify-content: space-between;
align-items: center;
height: auto;
2024-09-17 16:32:27 +02:00
/* margin-top: -9em; */
gap: 10px;
2024-09-17 16:32:27 +02:00
height: 10vh;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.input input {
flex-grow: 1;
2024-09-17 16:32:27 +02:00
padding: 5px;
2024-09-16 12:17:53 +02:00
font-size: 1.2em;
border-radius: 8px;
border: 2px solid var(--input-button-color);
outline: none;
2024-09-16 12:17:53 +02:00
margin-right: 10px;
background-color: rgba(255, 255, 255, 0.9);
color: #333;
transition: border-color 0.3s ease-in-out;
2024-09-17 16:32:27 +02:00
height: 7vh;
2024-09-16 12:17:53 +02:00
}
.input input:focus {
border-color: var(--input-button-hover-color);
}
2024-09-16 12:17:53 +02:00
.input button {
2024-09-17 16:32:27 +02:00
padding: 1em;
2024-09-17 13:48:04 +02:00
margin: 5px;
2024-09-16 12:17:53 +02:00
background-color: var(--input-button-color);
color: white;
border: none;
border-radius: 50%;
font-size: 1.5em;
2024-09-16 12:17:53 +02:00
cursor: pointer;
height: 50px;
width: 50px;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s ease;
position: relative;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.input button img {
height: 1em;
2024-09-16 12:17:53 +02:00
}
2024-09-16 12:17:53 +02:00
.input button:hover {
background-color: var(--input-button-hover-color);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
2024-09-16 17:08:09 +02:00
/* FAQ Section */
#faq {
max-width: 800px;
width: 90%;
margin-top: 50px;
padding: 20px;
background-color: #222;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
#faq h2 {
text-align: center;
color: #00ccff;
font-size: 2em;
margin-bottom: 20px;
}
.faq-item {
margin-bottom: 20px;
padding: 10px;
border-radius: 5px;
background-color: #333;
}
.faq-item h3 {
color: #00ccff;
margin-bottom: 10px;
font-size: 1.5em;
}
.faq-item p {
color: #ddd;
font-size: 1.1em;
line-height: 1.5;
}
.faq-item:hover {
background-color: #444;
transition: background-color 0.3s;
}
2024-09-17 16:32:27 +02:00
::-webkit-scrollbar {
width: 7px;
}
::-webkit-scrollbar-track {
background-color: var(--scrollbar-track);
border-radius: 5px;
overflow: hidden;
2024-09-18 09:04:09 +02:00
margin-left: 10px;
padding-left: 15px;
2024-09-17 16:32:27 +02:00
}
::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb);
border-radius: 5px;
}
2024-09-17 12:33:11 +02:00
@media (max-width: 1400px) {
2024-09-17 16:32:27 +02:00
.grid {
2024-09-17 12:33:11 +02:00
grid-template-columns: 1fr;
}
2024-09-17 16:32:27 +02:00
.model-box {
width: 15vw;
aspect-ratio: 1/1;
}
2024-09-17 12:33:11 +02:00
}
/* Responsive Adjustments */
@media (max-width: 768px) {
.container {
grid-template-columns: 1fr;
grid-template-rows: auto;
width: 95vw;
}
2024-09-17 16:32:27 +02:00
.history,
.models {
display: none;
/* Hide history and models */
}
.output {
grid-column: 1;
grid-row: 1 / span 2;
}
.input {
grid-column: 1;
grid-row: 3;
2024-09-17 16:32:27 +02:00
/* margin-top: -4em; */
}
.input button {
height: 40px;
width: 40px;
}
.output form button img {
height: 1.5em;
}
}