nemaquant / static /style.css
sloneckity's picture
Add NemaQuant Flask application files
30d5634
raw
history blame
7.54 kB
/* Refined styling to better match screenshot */
:root {
--primary-color: #0d6efd; /* Bootstrap blue */
--secondary-color: #6c757d; /* Bootstrap secondary grey */
--light-grey: #f8f9fa; /* Light background */
--border-color: #dee2e6; /* Standard border */
--card-bg: #ffffff;
--text-color: #212529;
--selected-row-bg: #e9ecef;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
margin: 20px;
background-color: var(--light-grey);
color: var(--text-color);
font-size: 0.95rem;
}
h1 {
text-align: center;
color: #333;
margin-bottom: 25px;
}
.container {
display: flex;
gap: 25px;
}
.left-panel,
.right-panel {
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
.card {
background-color: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 20px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.card h2 {
margin-top: 0;
margin-bottom: 15px;
border-bottom: 1px solid var(--border-color);
padding-bottom: 10px;
font-size: 1.1rem;
font-weight: 500;
}
/* --- General Form Elements --- */
label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
select,
input[type="text"],
input[type="number"],
input[type="file"]::file-selector-button, /* Style the button part */
textarea {
display: block;
width: calc(100% - 16px); /* Account for padding */
padding: 8px;
margin-bottom: 15px;
border: 1px solid var(--border-color);
border-radius: 4px;
font-size: 0.9rem;
}
select {
width: 100%; /* Select takes full width */
cursor: pointer;
}
/* Style the actual file input button */
input[type="file"] {
padding: 0;
border: none;
}
input[type="file"]::file-selector-button {
background-color: var(--primary-color);
color: white;
border: none;
padding: 8px 12px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s ease;
margin-right: 10px; /* Space between button and text */
font-size: 0.9rem;
width: auto; /* Override width */
}
input[type="file"]::file-selector-button:hover {
background-color: #0b5ed7; /* Darker blue on hover */
}
/* --- Buttons --- */
button {
padding: 8px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
transition: background-color 0.2s ease, box-shadow 0.2s ease;
text-align: center;
}
button:disabled {
opacity: 0.65;
cursor: not-allowed;
}
/* Primary Button Style (e.g., Start Processing) */
#start-processing,
#export-csv,
#export-images {
background-color: var(--primary-color);
color: white;
}
#start-processing:not(:disabled):hover,
#export-csv:not(:disabled):hover,
#export-images:not(:disabled):hover {
background-color: #0b5ed7; /* Darker blue */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Secondary/Control Button Style (e.g., Zoom, Prev/Next) */
#zoom-in, #zoom-out, #prev-image, #next-image {
background-color: var(--secondary-color);
color: white;
}
#zoom-in:not(:disabled):hover, #zoom-out:not(:disabled):hover, #prev-image:not(:disabled):hover, #next-image:not(:disabled):hover {
background-color: #5c636a; /* Darker grey */
}
/* --- Specific Sections --- */
/* Parameters */
#parameters {
display: flex;
align-items: center; /* Align items vertically */
flex-wrap: wrap; /* Allow wrapping if needed */
}
#parameters label {
margin-right: 10px;
margin-bottom: 0; /* Remove bottom margin for inline */
display: inline-block; /* Make label inline */
}
#parameters input[type="range"] {
flex-grow: 1; /* Allow slider to take up space */
width: auto; /* Override default width */
height: 5px; /* Make slider thinner */
cursor: pointer;
margin: 0 10px; /* Add some margin */
vertical-align: middle;
padding: 0; /* Remove padding */
margin-bottom: 0;
}
/* Basic range slider styling (will vary by browser) */
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 16px;
height: 16px;
background: var(--primary-color);
cursor: pointer;
border-radius: 50%;
}
input[type=range]::-moz-range-thumb {
width: 16px;
height: 16px;
background: var(--primary-color);
cursor: pointer;
border-radius: 50%;
border: none;
}
#parameters #confidence-value {
font-weight: bold;
min-width: 30px; /* Ensure space for value */
text-align: right;
margin-left: 5px;
}
/* Processing */
#processing progress {
width: calc(100% - 50px); /* Adjust width to fit text */
height: 10px;
vertical-align: middle;
margin-right: 5px;
border: 1px solid var(--border-color);
border-radius: 4px;
overflow: hidden; /* Ensure border radius clips the progress */
}
/* Basic progress bar styling */
progress::-webkit-progress-bar {
background-color: #e9ecef;
border-radius: 4px;
}
progress::-webkit-progress-value {
background-color: var(--primary-color);
border-radius: 4px;
transition: width 0.3s ease;
}
progress::-moz-progress-bar {
background-color: var(--primary-color);
border-radius: 4px;
transition: width 0.3s ease;
}
#processing #progress-text {
vertical-align: middle;
font-weight: bold;
}
#processing button {
margin-top: 15px;
display: block; /* Make button block level */
width: auto;
}
#processing #processing-status {
margin-top: 10px;
font-size: 0.9em;
color: var(--secondary-color);
}
/* Status Log */
#status-log textarea {
width: calc(100% - 16px); /* Account for padding */
height: 180px; /* Slightly taller */
font-family: monospace;
font-size: 0.85em;
border: 1px solid var(--border-color);
padding: 8px;
resize: vertical; /* Allow vertical resize */
}
/* Results Summary */
#export-options {
margin-bottom: 10px;
}
#export-options label {
display: inline-block;
margin-right: 10px;
}
#export-options button {
margin-left: 5px;
}
#results-summary table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
font-size: 0.9em;
}
#results-summary th,
#results-summary td {
border: 1px solid var(--border-color);
padding: 10px;
text-align: left;
vertical-align: middle;
}
#results-summary th {
background-color: #e9ecef; /* Lighter grey header */
font-weight: 600;
}
#results-summary tbody tr {
cursor: pointer;
transition: background-color 0.15s ease;
}
#results-summary tbody tr:hover {
background-color: #f8f9fa; /* Very light grey on hover */
}
#results-summary tbody tr.selected {
background-color: var(--selected-row-bg); /* Use variable for selected */
font-weight: 500;
}
/* Image Preview */
#image-preview #image-container {
border: 1px solid var(--border-color);
height: 350px; /* Adjust as needed */
overflow: auto;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 10px;
background-color: #e9ecef; /* Light background for container */
}
#image-preview img {
max-width: 100%;
max-height: 100%;
display: block;
object-fit: contain; /* Ensure image fits well */
}
#image-preview #image-info {
font-size: 0.9em;
color: var(--secondary-color);
text-align: center;
margin-bottom: 10px;
}
#image-preview .image-controls {
text-align: center;
}
#image-preview .image-controls button {
margin: 0 5px;
}