Spaces:
Running
Running
File size: 3,649 Bytes
e209a78 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
{% extends 'base.html' %}
{% block content %}
<style>
/* Full-page setup */
html, body {
height: 100%;
margin: 0;
}
.container {
display: flex;
flex-direction: column;
height: 50vh; /* Full viewport height */
justify-content: center;
align-items: center;
}
/* Card styling */
.card {
margin: auto;
background-color: #2c2c3e;
color: #f5f5f5;
border: none;
width: 50%;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Refined shadow effect */
max-height: calc(50vh - 50px); /* Adjust to fit within view */
overflow: hidden; /* Ensures no overflow from child elements */
}
/* Fixed header */
.card-header {
background-color: #181831;
border-bottom: 2px solid #444;
padding: 1rem;
text-align: center;
position: sticky; /* Keeps header fixed */
top: 0;
z-index: 1000; /* Ensures it stays above scrollable content */
}
.card-body {
max-height: 60vh; /* Limits height of scrollable area */
overflow-y: auto; /* Adds vertical scrolling */
}
/* Scrollbar customization */
.card-body::-webkit-scrollbar {
width: 8px;
}
.card-body::-webkit-scrollbar-thumb {
background-color: #444; /* Thumb color */
border-radius: 4px; /* Rounded scrollbar edges */
}
.card-body::-webkit-scrollbar-thumb:hover {
background-color: #555; /* Thumb hover color */
}
.card-body::-webkit-scrollbar-track {
background-color: #2c2c3e; /* Track background */
}
/* List group items */
.list-group-item {
background-color: #2c2c3e;
color: #f5f5f5;
border: 1px solid #444;
transition: background-color 0.3s ease;
}
.list-group-item:hover {
background-color: #383850;
}
/* Button styling */
.btn-primary {
background-color: #4c4cff;
border-color: #4c4cff;
}
.btn-primary:hover {
background-color: #3838e8;
border-color: #3838e8;
}
/* Align buttons side-by-side */
.button-container {
display: flex;
gap: 0.5rem; /* Adds space between buttons */
}
.btn-primary {
flex: 1; /* Ensures buttons have the same width */
}
/* Optional: Adjust margin and padding for better spacing */
.list-group-item {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
<div class="container">
<div class="card shadow">
<div class="card-header">
<h3>Available Vector Databases</h3>
</div>
<div class="card-body">
<h4 class="text-center mb-4">Select a Vector Database</h4>
<ul class="list-group">
{% for db in vector_dbs %}
<li class="list-group-item">
<span>{{ db }}</span>
<div class="button-container">
<!--form method="post" action="{{ url_for('update_db', db_name=db) }}" class="mb-0">
<button type="submit" class="btn btn-primary btn-sm">Update</button>
</form-->
<form method="post" action="{{ url_for('select_db', db_name=db) }}" class="mb-0">
<button type="submit" class="btn btn-primary btn-sm">Select</button>
</form>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endblock %}
|