diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..68bc17f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,160 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/README.md b/README.md index 761d60cd..27a33d50 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,47 @@ -feel free to improve the code / suggest improvements +# ChatGPT Clone +Feel free to improve the code / suggest improvements -run it: `python3 run.py` + - + +## Getting Started +To get started with this project, you'll need to clone the repository and set up a virtual environment. This will allow you to install the required dependencies without affecting your system-wide Python installation. + +### Requisites +Before you can set up a virtual environment, you'll need to have Python installed on your system. You can download Python from the official website: https://www.python.org/downloads/ + +### Cloning the Repository +Run the following command to clone the repository: +``` +git clone https://github.com/QuartzWarrior/GPT-clone.git +``` + +### Setting up a Virtual Environment +To set up a virtual environment, follow these steps: + +1. Navigate to the root directory of your project. +``` +cd chatgpt-clone +``` +2. Run the following command to create a new virtual environment: +``` +python -m venv venv +``` +3. Activate the virtual environment by running the following command: +``` +source venv/bin/activate +``` +If you're on Windows, the command will be slightly different: +``` +venv\Scripts\activate +``` +4. Install the required dependencies by running the following command: +``` +pip install -r requirements.txt +``` + +### Running the Application +To run the application, make sure the virtual environment is active and run the following command: +``` +python run.py +``` diff --git a/client/css/style.css b/client/css/style.css index 09731045..c4548052 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -1,622 +1,3 @@ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"); -/* :root { - --colour-1: #ffffff; - --colour-2: #000000; - --colour-3: #000000; - --colour-4: #000000; - --colour-5: #000000; - --colour-6: #000000; - - --accent: #ffffff; - --blur-bg: #98989866; - --blur-border: #00000040; - --user-input: #000000; - --conversations: #000000; -} */ - -:root { - --colour-1: #000000; - --colour-2: #ccc; - --colour-3: #e4d4ff; - --colour-4: #f0f0f0; - --colour-5: #181818; - --colour-6: #242424; - - --accent: #8b3dff; - --blur-bg: #16101b66; - --blur-border: #84719040; - --user-input: #ac87bb; - --conversations: #c7a2ff; -} - -:root { - --font-1: "Inter", sans-serif; - --section-gap: 25px; - --border-radius-1: 8px; -} - -* { - margin: 0; - padding: 0; - box-sizing: border-box; - position: relative; - font-family: var(--font-1); -} - -html, -body { - scroll-behavior: smooth; - overflow: hidden; -} - -body { - padding: var(--section-gap); - background: var(--colour-1); - color: var(--colour-3); - height: 100vh; -} - -.row { - display: flex; - gap: var(--section-gap); - height: 100%; -} - -.box { - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - background-color: var(--blur-bg); - height: 100%; - width: 100%; - border-radius: var(--border-radius-1); - border: 1px solid var(--blur-border); -} - -.conversations { - max-width: 260px; - padding: var(--section-gap); - overflow: auto; - flex-shrink: 0; - display: flex; - flex-direction: column; - justify-content: space-between; -} - -.conversation { - width: 100%; - display: flex; - flex-direction: column; - gap: 15px; -} - -.conversation #messages { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - overflow: auto; - overflow-wrap: break-word; - padding-bottom: 50px; -} - -.conversation .user-input { - max-height: 200px; -} - -.conversation .user-input input { - font-size: 15px; - width: 100%; - height: 100%; - padding: 12px 15px; - background: none; - border: none; - outline: none; - color: var(--colour-3); -} - -.conversation .user-input input::placeholder { - color: var(--user-input) -} - -.gradient:nth-child(1) { - --top: 0; - --right: 0; - --size: 70vw; - --blur: calc(0.5 * var(--size)); - --opacity: 0.3; - animation: zoom_gradient 6s infinite; -} - -.gradient { - position: absolute; - z-index: -1; - border-radius: calc(0.5 * var(--size)); - background-color: var(--accent); - background: radial-gradient(circle at center, var(--accent), var(--accent)); - width: 70vw; - height: 70vw; - top: 50%; - right: 0; - transform: translateY(-50%); - filter: blur(calc(0.5 * 70vw)) opacity(var(--opacity)); -} - -.conversations { - display: flex; - flex-direction: column; - gap: 16px; -} - -.conversations .title { - font-size: 14px; - font-weight: 500; -} - -.conversations .convo { - padding: 8px 12px; - display: flex; - gap: 18px; - align-items: center; - user-select: none; - justify-content: space-between; -} - -.conversations .convo .left { - cursor: pointer; - display: flex; - align-items: center; - gap: 10px; -} - -.conversations i { - color: var(--conversations); - cursor: pointer; -} - -.convo-title { - color: var(--colour-3); - font-size: 14px; -} - -.message { - - width: 100%; - overflow-wrap: break-word; - display: flex; - gap: var(--section-gap); - padding: var(--section-gap); - padding-bottom: 0; -} - -.message:last-child { - animation: 0.6s show_message; -} - -@keyframes show_message { - from { - transform: translateY(10px); - opacity: 0; - } -} - -.message .user { - max-width: 48px; - max-height: 48px; - flex-shrink: 0; -} - -.message .user img { - width: 100%; - height: 100%; - object-fit: cover; - border-radius: 8px; - outline: 1px solid var(--blur-border); -} - -.message .user:after { - content: "63"; - position: absolute; - bottom: 0; - right: 0; - height: 60%; - width: 60%; - background: var(--colour-3); - filter: blur(10px) opacity(0.5); - z-index: 10000; -} - -.message .content { - display: flex; - flex-direction: column; - gap: 18px; -} - -.message .content p, -.message .content li, -.message .content code { - font-size: 15px; - line-height: 1.3; -} - -.message .user i { - position: absolute; - bottom: -6px; - right: -6px; - z-index: 1000; -} - -.new_convo { - padding: 8px 12px; - display: flex; - gap: 18px; - align-items: center; - cursor: pointer; - user-select: none; - background: transparent; - border: 1px dashed var(--conversations); - border-radius: var(--border-radius-1); -} - -.new_convo span { - color: var(--colour-3); - font-size: 14px; -} - -.new_convo:hover { - border-style: solid; -} - -.stop_generating { - position: absolute; - bottom: 118px; - /* left: 10px; - bottom: 125px; - right: 8px; */ - left: 50%; - transform: translateX(-50%); - z-index: 1000000; -} - -.stop_generating button { - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - background-color: var(--blur-bg); - border-radius: var(--border-radius-1); - border: 1px solid var(--blur-border); - padding: 10px 15px; - color: var(--colour-3); - display: flex; - justify-content: center; - align-items: center; - gap: 12px; - cursor: pointer; - animation: show_popup 0.4s; -} - -@keyframes show_popup { - from { - opacity: 0; - transform: translateY(10px); - } -} - -@keyframes hide_popup { - to { - opacity: 0; - transform: translateY(10px); - } -} - -.stop_generating-hiding button { - animation: hide_popup 0.4s; -} - -.stop_generating-hidden button { - display: none; -} - -.typing { - position: absolute; - top: -25px; - left: 0; - font-size: 14px; - animation: show_popup 0.4s; -} - -.typing-hiding { - animation: hide_popup 0.4s; -} - -.typing-hidden { - display: none; -} - -input[type="checkbox"] { - height: 0; - width: 0; - display: none; -} - -label { - cursor: pointer; - text-indent: -9999px; - width: 50px; - height: 30px; - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - background-color: var(--blur-bg); - border-radius: var(--border-radius-1); - border: 1px solid var(--blur-border); - display: block; - border-radius: 100px; - position: relative; - overflow: hidden; - transition: 0.33s; -} - -label:after { - content: ""; - position: absolute; - top: 50%; - transform: translateY(-50%); - left: 5px; - width: 20px; - height: 20px; - background: var(--colour-3); - border-radius: 90px; - transition: 0.33s; -} - -input:checked+label { - background: var(--blur-border); -} - -input:checked+label:after { - left: calc(100% - 5px - 20px); -} - -.buttons { - display: flex; - align-items: center; - justify-content: left; - width: 100%; -} - -.field { - height: fit-content; - display: flex; - align-items: center; - gap: 16px; - padding-right: 15px -} - -.field .about { - font-size: 14px; - color: var(--colour-3); -} - - -select { - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - border-radius: 8px; - - -webkit-backdrop-filter: blur(20px); - backdrop-filter: blur(20px); - - cursor: pointer; - background-color: var(--blur-bg); - border: 1px solid var(--blur-border); - color: var(--colour-3); - display: block; - position: relative; - overflow: hidden; - outline: none; - padding: 8px 16px; - - appearance: none; -} - -.input-box { - display: flex; - align-items: center; - padding-right: 15px; - cursor: pointer; -} - -.info { - padding: 8px 12px; - display: flex; - gap: 18px; - align-items: center; - user-select: none; - background: transparent; - border-radius: var(--border-radius-1); - width: 100%; - cursor: default; - border: 1px dashed var(--conversations) -} - -.bottom_buttons { - width: 100%; - display: flex; - flex-direction: column; - gap: 10px; -} - -.bottom_buttons button { - padding: 8px 12px; - display: flex; - gap: 18px; - align-items: center; - cursor: pointer; - user-select: none; - background: transparent; - border: 1px solid #c7a2ff; - border-radius: var(--border-radius-1); - width: 100%; -} - -.bottom_buttons button span { - color: var(--colour-3); - font-size: 14px; -} - -.conversations .top { - display: flex; - flex-direction: column; - gap: 16px; - overflow: auto; -} - -#cursor { - line-height: 17px; - margin-left: 3px; - -webkit-animation: blink 0.8s infinite; - animation: blink 0.8s infinite; - width: 7px; - height: 15px; -} - -@keyframes blink { - 0% { - background: #ffffff00; - } - - 50% { - background: white; - } - - 100% { - background: #ffffff00; - } -} - -@-webkit-keyframes blink { - 0% { - background: #ffffff00; - } - - 50% { - background: white; - } - - 100% { - background: #ffffff00; - } -} - - -ol, -ul { - padding-left: 20px; -} - - -@keyframes spinner { - to { - transform: rotate(360deg); - } -} - -.spinner:before { - content: ''; - box-sizing: border-box; - position: absolute; - top: 50%; - left: 45%; - width: 20px; - height: 20px; - - border-radius: 50%; - border: 1px solid var(--conversations); - border-top-color: white; - animation: spinner .6s linear infinite; -} - -.grecaptcha-badge { - visibility: hidden; -} - -.mobile-sidebar { - display: none !important; - position: absolute; - z-index: 100000; - top: 0; - left: 0; - margin: 10px; - font-size: 20px; - cursor: pointer; - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - background-color: var(--blur-bg); - border-radius: 10px; - border: 1px solid var(--blur-border); - width: 40px; - height: 40px; - justify-content: center; - align-items: center; - transition: 0.33s; -} - -.mobile-sidebar i { - transition: 0.33s; -} - -.rotated { - transform: rotate(360deg); -} - -@media screen and (max-width: 990px) { - .conversations { - display: none; - width: 100%; - max-width: none; - } - - .buttons { - align-items: flex-start; - flex-wrap: wrap; - gap: 15px; - } - - .field { - width: fit-content; - } - - .mobile-sidebar { - display: flex !important; - } -} - -@media screen and (max-height: 640px) { - body { - height: 87vh - } -} - - -.shown { - display: flex; -} - - -a:-webkit-any-link { - color: var(--accent); -} - -.conversation .user-input textarea { - font-size: 15px; - width: 100%; - height: 100%; - padding: 12px 15px; - background: none; - border: none; - outline: none; - color: var(--colour-3); - - resize: vertical; - max-height: 150px; - min-height: 80px; -} \ No newline at end of file +/*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.mb-4{margin-bottom:1rem}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-6{height:1.5rem}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-3\/4{width:75%}.w-full{width:100%}.flex-shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.scroll-auto{scroll-behavior:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.bg-purple-900{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.text-justify{text-align:justify}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--colour-1:#000;--colour-2:#ccc;--colour-3:#e4d4ff;--colour-4:#f0f0f0;--colour-5:#181818;--colour-6:#242424;--accent:#8b3dff;--blur-bg:#16101b66;--blur-border:#84719040;--user-input:#ac87bb;--conversations:#c7a2ff;--font-1:"Inter",sans-serif;--section-gap:25px;--border-radius-1:8px}*{box-sizing:border-box;font-family:var(--font-1);margin:0;padding:0;position:relative}body,html{overflow:hidden;scroll-behavior:smooth}body{background:var(--colour-1);color:var(--colour-3);height:100vh;padding:var(--section-gap)}.row{display:flex;gap:var(--section-gap)}.box,.row{height:100%}.box{backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);background-color:var(--blur-bg);border:1px solid var(--blur-border);border-radius:var(--border-radius-1);width:100%}.conversations{flex-shrink:0;justify-content:space-between;max-width:260px;overflow:auto;padding:var(--section-gap)}.conversation{gap:15px}.conversation,.conversation #messages{display:flex;flex-direction:column;width:100%}.conversation #messages{height:100%;overflow:auto;overflow-wrap:break-word;padding-bottom:50px}.conversation .user-input{max-height:200px}.conversation .user-input input{background:none;border:none;color:var(--colour-3);font-size:15px;height:100%;outline:none;padding:12px 15px;width:100%}.conversation .user-input input::-moz-placeholder{color:var(--user-input)}.conversation .user-input input::placeholder{color:var(--user-input)}.gradient:first-child{--top:0;--right:0;--size:70vw;--blur:calc(var(--size)*0.5);--opacity:0.3;animation:zoom_gradient 6s infinite}.gradient{background-color:var(--accent);background:radial-gradient(circle at center,var(--accent),var(--accent));border-radius:calc(var(--size)*.5);filter:blur(35vw) opacity(var(--opacity));height:70vw;position:absolute;right:0;top:50%;transform:translateY(-50%);width:70vw;z-index:-1}.conversations{display:flex;flex-direction:column;gap:16px}.conversations .title{font-size:14px;font-weight:500}.conversations .convo{align-items:center;display:flex;gap:18px;justify-content:space-between;padding:8px 12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.conversations .convo .left{align-items:center;cursor:pointer;display:flex;gap:10px}.conversations i{color:var(--conversations);cursor:pointer}.convo-title{color:var(--colour-3);font-size:14px}.message{display:flex;gap:var(--section-gap);overflow-wrap:break-word;padding:var(--section-gap);padding-bottom:0;width:100%}.message:last-child{animation:show_message .6s}@keyframes show_message{0%{opacity:0;transform:translateY(10px)}}.message .user{flex-shrink:0;max-height:48px;max-width:48px}.message .user img{border-radius:8px;height:100%;-o-object-fit:cover;object-fit:cover;outline:1px solid var(--blur-border);width:100%}.message .user:after{background:var(--colour-3);bottom:0;content:"63";filter:blur(10px) opacity(.5);height:60%;position:absolute;right:0;width:60%;z-index:10000}.message .content{display:flex;flex-direction:column;gap:18px}.message .content code,.message .content li,.message .content p{font-size:15px;line-height:1.3}.message .user i{bottom:-6px;position:absolute;right:-6px;z-index:1000}.new_convo{align-items:center;background:#0000;border:1px dashed var(--conversations);border-radius:var(--border-radius-1);cursor:pointer;display:flex;gap:18px;padding:8px 12px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.new_convo span{color:var(--colour-3);font-size:14px}.new_convo:hover{border-style:solid}.stop_generating{bottom:118px;left:50%;position:absolute;transform:translateX(-50%);z-index:1000000}.stop_generating button{align-items:center;animation:show_popup .4s;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);background-color:var(--blur-bg);border:1px solid var(--blur-border);border-radius:var(--border-radius-1);color:var(--colour-3);cursor:pointer;display:flex;gap:12px;justify-content:center;padding:10px 15px}@keyframes show_popup{0%{opacity:0;transform:translateY(10px)}}@keyframes hide_popup{to{opacity:0;transform:translateY(10px)}}.stop_generating-hiding button{animation:hide_popup .4s}.stop_generating-hidden button{display:none}.typing{animation:show_popup .4s;font-size:14px;left:0;position:absolute;top:-25px}.typing-hiding{animation:hide_popup .4s}.typing-hidden{display:none}input[type=checkbox]{display:none;height:0;width:0}label{backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);background-color:var(--blur-bg);border:1px solid var(--blur-border);border-radius:var(--border-radius-1);border-radius:100px;cursor:pointer;display:block;height:30px;overflow:hidden;position:relative;text-indent:-9999px;transition:.33s;width:50px}label:after{background:var(--colour-3);border-radius:90px;content:"";height:20px;left:5px;position:absolute;top:50%;transform:translateY(-50%);transition:.33s;width:20px}input:checked+label{background:var(--blur-border)}input:checked+label:after{left:calc(100% - 25px)}.buttons{justify-content:left;width:100%}.buttons,.field{align-items:center;display:flex}.field{gap:16px;height:-moz-fit-content;height:fit-content;padding-right:15px}.field .about{font-size:14px}.field .about,select{color:var(--colour-3)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:var(--blur-bg);border:1px solid var(--blur-border);border-radius:8px;cursor:pointer;display:block;outline:none;overflow:hidden;padding:8px 16px;position:relative}.input-box{cursor:pointer;padding-right:15px}.info,.input-box{align-items:center;display:flex}.info{background:#0000;border:1px dashed var(--conversations);border-radius:var(--border-radius-1);cursor:default;gap:18px;padding:8px 12px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.bottom_buttons{display:flex;flex-direction:column;gap:10px;width:100%}.bottom_buttons button{align-items:center;background:#0000;border:1px solid #c7a2ff;border-radius:var(--border-radius-1);cursor:pointer;display:flex;gap:18px;padding:8px 12px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.bottom_buttons button span{color:var(--colour-3);font-size:14px}.conversations .top{display:flex;flex-direction:column;gap:16px;overflow:auto}#cursor{animation:blink .8s infinite;height:15px;line-height:17px;margin-left:3px;width:7px}@keyframes blink{0%{background:#fff0}50%{background:#fff}to{background:#fff0}}ol,ul{padding-left:20px}@keyframes spinner{to{transform:rotate(1turn)}}.spinner:before{animation:spinner .6s linear infinite;border:1px solid var(--conversations);border-radius:50%;border-top:1px solid #fff;box-sizing:border-box;content:"";height:20px;left:45%;position:absolute;top:50%;width:20px}.grecaptcha-badge{visibility:hidden}.mobile-sidebar{align-items:center;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);background-color:var(--blur-bg);border:1px solid var(--blur-border);border-radius:10px;cursor:pointer;display:none!important;font-size:20px;height:40px;justify-content:center;left:0;margin:10px;position:absolute;top:0;transition:.33s;width:40px;z-index:100000}.mobile-sidebar i{transition:.33s}.rotated{transform:rotate(1turn)}@media screen and (max-width:990px){.conversations{display:none;max-width:none;width:100%}.buttons{align-items:flex-start;flex-wrap:wrap;gap:15px}.field{width:-moz-fit-content;width:fit-content}.mobile-sidebar{display:flex!important}}@media screen and (max-height:640px){body{height:87vh}}.shown{display:flex}a:-webkit-any-link{color:var(--accent)}.conversation .user-input textarea{background:none;border:none;color:var(--colour-3);font-size:15px;height:100%;max-height:150px;min-height:80px;outline:none;padding:12px 15px;resize:vertical;width:100%} \ No newline at end of file diff --git a/client/html/index.html b/client/html/index.html index 558fefbe..3e672419 100644 --- a/client/html/index.html +++ b/client/html/index.html @@ -1,137 +1,150 @@ -
- - - - - - - - - - - - - - - - - - - - - -