Files
container-census/web/analytics/styles.css
2025-10-27 23:45:55 -04:00

905 lines
15 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
header {
text-align: center;
color: white;
margin-bottom: 40px;
}
.header-content {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
}
header h1 {
font-size: 3em;
margin-bottom: 10px;
}
.subtitle {
font-size: 1.2em;
opacity: 0.9;
}
.version-badge {
background-color: rgba(255, 255, 255, 0.2);
padding: 8px 16px;
border-radius: 20px;
font-size: 0.9rem;
font-weight: 500;
backdrop-filter: blur(10px);
white-space: nowrap;
}
.summary-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes countUp {
from {
opacity: 0;
transform: scale(0.5);
}
to {
opacity: 1;
transform: scale(1);
}
}
.card {
background: white;
border-radius: 12px;
padding: 30px;
text-align: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
animation: fadeInUp 0.6s ease-out;
position: relative;
overflow: hidden;
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
transform: scaleX(0);
transition: transform 0.3s ease;
}
.card:hover::before {
transform: scaleX(1);
}
.card:hover {
transform: translateY(-8px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
.card-value {
font-size: 2.5em;
font-weight: bold;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 10px;
animation: countUp 0.8s ease-out;
}
.card-label {
font-size: 0.95em;
color: #666;
font-weight: 500;
}
.filters {
background: white;
border-radius: 12px;
padding: 20px;
margin-bottom: 30px;
display: flex;
align-items: center;
gap: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.filters label {
font-weight: 500;
color: #333;
}
.filters select {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 1em;
margin-left: 10px;
}
.filters button {
padding: 10px 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 8px;
font-size: 1em;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.filters button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}
.filters button:active {
transform: translateY(0);
}
.chart-container {
background: white;
border-radius: 12px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
animation: fadeInUp 0.8s ease-out;
}
.chart-container:hover {
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.chart-container h2 {
margin-bottom: 25px;
color: #333;
font-size: 1.5em;
font-weight: 600;
position: relative;
padding-bottom: 10px;
}
.chart-container h2::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 60px;
height: 3px;
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
border-radius: 2px;
}
.chart-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.chart-container.half-width {
margin-bottom: 0;
}
canvas {
max-height: 400px;
}
#topImagesChart {
max-height: 700px !important;
height: 700px;
}
footer {
text-align: center;
color: white;
margin-top: 40px;
padding: 20px;
opacity: 0.9;
}
footer p {
margin: 5px 0;
}
@media (max-width: 768px) {
header h1 {
font-size: 2em;
}
.summary-cards {
grid-template-columns: 1fr;
}
.filters {
flex-direction: column;
align-items: stretch;
}
.filters select {
margin-left: 0;
margin-top: 5px;
}
.chart-row {
grid-template-columns: 1fr;
}
.card-value {
font-size: 2em;
}
}
/* Live Submission Indicator */
.header-right {
display: flex;
align-items: center;
gap: 15px;
}
.live-indicator {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: rgba(255, 255, 255, 0.1);
border-radius: 20px;
font-size: 13px;
}
.pulse-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: #666;
position: relative;
}
.pulse-dot.new {
background: #4CAF50;
animation: pulse-new 1s ease-in-out;
}
.pulse-dot.update {
background: #2196F3;
animation: pulse-update 1s ease-in-out;
}
@keyframes pulse-new {
0%, 100% {
box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
}
50% {
box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
}
}
@keyframes pulse-update {
0%, 100% {
box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
}
50% {
box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
}
}
#liveStatus {
color: #ddd;
font-weight: 500;
}
#liveStatus.new {
color: #4CAF50;
}
#liveStatus.update {
color: #2196F3;
}
/* Event Counter Badge */
.event-counter {
background: #667eea;
color: white;
font-size: 11px;
font-weight: 600;
padding: 2px 6px;
border-radius: 10px;
margin-left: 8px;
min-width: 18px;
text-align: center;
transition: all 0.3s ease;
}
.event-counter.highlight {
background: #4CAF50;
transform: scale(1.1);
}
.live-indicator.has-events {
background: rgba(76, 175, 80, 0.1);
}
/* Tab Navigation */
.tabs {
display: flex;
gap: 10px;
margin: 20px 0;
border-bottom: 3px solid #ddd;
background: white;
border-radius: 8px 8px 0 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.tab-button {
padding: 14px 28px;
background: #f5f5f5;
border: none;
border-bottom: 4px solid transparent;
color: #333;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
border-radius: 8px 8px 0 0;
}
.tab-button:hover {
color: #667eea;
background: #e8e8ff;
}
.tab-button.active {
color: white;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-bottom-color: transparent;
box-shadow: 0 -2px 8px rgba(102, 126, 234, 0.3);
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* Table Container */
.table-container {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-top: 20px;
}
.table-controls {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
gap: 15px;
flex-wrap: wrap;
}
#imageSearch {
flex: 1;
min-width: 250px;
padding: 12px 16px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 14px;
transition: all 0.3s ease;
}
#imageSearch:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.results-info {
color: #666;
font-size: 14px;
white-space: nowrap;
}
/* Table Styles */
.table-wrapper {
overflow-x: auto;
margin-bottom: 20px;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.data-table thead {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.data-table th {
padding: 14px 16px;
text-align: left;
font-weight: 600;
white-space: nowrap;
}
.data-table th.text-right {
text-align: right;
}
.data-table th.sortable {
cursor: pointer;
user-select: none;
transition: background 0.2s ease;
}
.data-table th.sortable:hover {
background: rgba(255, 255, 255, 0.1);
}
.sort-indicator {
display: inline-block;
margin-left: 6px;
color: rgba(255, 255, 255, 0.8);
font-size: 12px;
}
.data-table tbody tr {
border-bottom: 1px solid #e0e0e0;
transition: background 0.2s ease;
}
.data-table tbody tr:hover {
background: rgba(102, 126, 234, 0.05);
}
.data-table tbody tr:nth-child(even) {
background: #f9f9f9;
}
.data-table tbody tr:nth-child(even):hover {
background: rgba(102, 126, 234, 0.08);
}
.data-table td {
padding: 12px 16px;
}
.data-table td.image-name {
font-family: 'Monaco', 'Courier New', monospace;
color: #333;
font-weight: 500;
}
.data-table td.number {
text-align: right;
font-variant-numeric: tabular-nums;
}
.data-table td.loading-cell,
.data-table td.error-cell,
.data-table td.empty-cell {
text-align: center;
padding: 40px;
color: #999;
font-style: italic;
}
.data-table td.error-cell {
color: #f44336;
}
/* Registry Badges */
.registry-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.registry-badge.docker-hub {
background: #0db7ed;
color: white;
}
.registry-badge.ghcr {
background: #2088ff;
color: white;
}
.registry-badge.quay {
background: #40b4e5;
color: white;
}
.registry-badge.gcr {
background: #4285f4;
color: white;
}
.registry-badge.mcr {
background: #00a4ef;
color: white;
}
.registry-badge.other {
background: #757575;
color: white;
}
/* Pagination */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
margin-top: 20px;
}
.pagination button {
padding: 10px 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.pagination button:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.pagination button:disabled {
background: #e0e0e0;
color: #999;
cursor: not-allowed;
transform: none;
}
#pageInfo {
font-size: 14px;
color: #666;
min-width: 100px;
text-align: center;
}
/* Responsive Design */
@media (max-width: 768px) {
.tabs {
flex-direction: column;
}
.tab-button {
width: 100%;
text-align: left;
border-bottom: none;
border-left: 3px solid transparent;
}
.tab-button.active {
border-left-color: #667eea;
border-bottom-color: transparent;
}
.table-controls {
flex-direction: column;
align-items: stretch;
}
#imageSearch {
width: 100%;
}
.results-info {
text-align: center;
}
.data-table {
font-size: 12px;
}
.data-table th,
.data-table td {
padding: 10px 8px;
}
.pagination {
flex-wrap: wrap;
}
.pagination button {
flex: 1;
min-width: 100px;
}
}
/* ========== Database Viewer Styles ========== */
.database-viewer {
background: white;
border-radius: 12px;
padding: 30px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.db-controls {
display: flex;
flex-direction: column;
gap: 15px;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 2px solid #f0f0f0;
}
.control-group {
display: flex;
flex-wrap: wrap;
gap: 15px;
align-items: center;
}
.control-group label {
display: flex;
flex-direction: column;
gap: 5px;
font-weight: 500;
color: #333;
}
.control-group select,
.control-group input[type="text"] {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 14px;
min-width: 200px;
transition: border-color 0.2s;
}
.control-group select:focus,
.control-group input[type="text"]:focus {
outline: none;
border-color: #667eea;
}
.control-group button {
padding: 8px 16px;
background: #667eea;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
}
.control-group button:hover {
background: #5568d3;
transform: translateY(-1px);
}
.auto-refresh-control {
display: flex;
align-items: center;
}
.auto-refresh-control label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-weight: 500;
color: #666;
}
.auto-refresh-control input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
}
.db-info {
margin-bottom: 15px;
padding: 10px;
background: #f8f9fa;
border-radius: 6px;
font-size: 14px;
color: #666;
}
.db-table-wrapper {
min-height: 400px;
max-height: 800px;
overflow-y: auto;
margin-bottom: 20px;
border: 1px solid #e0e0e0;
border-radius: 8px;
}
.database-content {
padding: 15px;
}
.db-record {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
margin-bottom: 12px;
overflow: hidden;
transition: all 0.2s;
}
.db-record:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.db-record.event-new {
border-left: 4px solid #52b788;
}
.db-record.event-update {
border-left: 4px solid #4ECDC4;
}
.db-record-header {
padding: 15px;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
background: #f8f9fa;
transition: background 0.2s;
}
.db-record-header:hover {
background: #f0f2f5;
}
.db-record-summary {
display: flex;
flex-wrap: wrap;
gap: 15px;
flex: 1;
font-size: 14px;
}
.db-field {
display: inline-block;
}
.db-field strong {
color: #666;
margin-right: 5px;
}
.event-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
.event-badge.event-new {
background: #52b788;
color: white;
}
.event-badge.event-update {
background: #4ECDC4;
color: white;
}
.expand-icon {
color: #667eea;
font-size: 18px;
transition: transform 0.2s;
min-width: 24px;
text-align: center;
}
.db-record-details {
border-top: 1px solid #e0e0e0;
padding: 15px;
background: #fafbfc;
}
.json-view {
font-family: 'Courier New', Courier, monospace;
font-size: 12px;
background: #2d3748;
color: #e2e8f0;
padding: 15px;
border-radius: 6px;
overflow-x: auto;
white-space: pre;
margin: 0;
line-height: 1.5;
}
.loading-message,
.empty-message,
.error-message {
text-align: center;
padding: 40px;
color: #666;
font-size: 16px;
}
.error-message {
color: #e74c3c;
}
/* Responsive design for database viewer */
@media (max-width: 768px) {
.control-group {
flex-direction: column;
align-items: stretch;
}
.control-group select,
.control-group input[type="text"],
.control-group button {
width: 100%;
}
.db-record-summary {
flex-direction: column;
gap: 8px;
}
.json-view {
font-size: 10px;
}
}