glam/frontend/src/pages/InstitutionBrowserPage.css
kempersc 505c12601a Add test script for PiCo extraction from Arabic waqf documents
- Implemented a new script `test_pico_arabic_waqf.py` to test the GLM annotator's ability to extract person observations from Arabic historical documents.
- The script includes environment variable handling for API token, structured prompts for the GLM API, and validation of extraction results.
- Added comprehensive logging for API responses, extraction results, and validation errors.
- Included a sample Arabic waqf text for testing purposes, following the PiCo ontology pattern.
2025-12-12 17:50:17 +01:00

996 lines
18 KiB
CSS

/**
* Institution Browser Page Styles
* Following Netwerk Digitaal Erfgoed (NDE) house style
*/
/* Page Layout */
.institution-browser-page {
min-height: calc(100vh - 60px);
background: #f5f7fa;
}
/* Header */
.browser-header {
background: linear-gradient(135deg, #0a3dfa 0%, #1e50ff 100%);
color: white;
padding: 2rem;
box-shadow: 0 2px 8px rgba(10, 61, 250, 0.2);
}
.browser-header .header-content h1 {
margin: 0 0 0.5rem 0;
font-size: 2rem;
font-weight: 700;
letter-spacing: -0.02em;
color: white;
}
.browser-header .header-content p {
margin: 0;
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.9);
}
.header-stats {
display: flex;
gap: 1rem;
margin-top: 1rem;
}
.stat-badge {
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 12px;
padding: 1rem 1.5rem;
text-align: center;
backdrop-filter: blur(4px);
}
.stat-value {
display: block;
font-size: 1.5rem;
font-weight: 700;
color: white;
}
.stat-label {
display: block;
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.8);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 0.25rem;
}
/* Main Content Area */
.browser-content {
max-width: 1400px;
margin: 0 auto;
padding: 1.5rem;
}
/* Search and Filters */
.search-filters-bar {
display: flex;
gap: 1rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
background: white;
padding: 1rem;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.search-box {
flex: 1;
min-width: 300px;
position: relative;
}
.search-input {
width: 100%;
padding: 0.75rem 1rem;
padding-right: 2.5rem;
background: #f5f7fa;
border: 1px solid #e5e7eb;
border-radius: 8px;
color: #172a59;
font-size: 1rem;
font-family: 'Roboto', sans-serif;
transition: all 0.2s;
}
.search-input:focus {
outline: none;
border-color: #0a3dfa;
background: white;
box-shadow: 0 0 0 3px rgba(10, 61, 250, 0.1);
}
.search-input::placeholder {
color: #9ca3af;
}
.clear-search-btn {
position: absolute;
right: 0.75rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #9ca3af;
font-size: 1.25rem;
cursor: pointer;
padding: 0.25rem;
line-height: 1;
}
.clear-search-btn:hover {
color: #172a59;
}
.filter-group {
display: flex;
gap: 0.75rem;
align-items: center;
}
.filter-select {
padding: 0.75rem 1rem;
background: #f5f7fa;
border: 1px solid #e5e7eb;
border-radius: 8px;
color: #172a59;
font-size: 0.875rem;
font-family: 'Roboto', sans-serif;
cursor: pointer;
min-width: 150px;
transition: all 0.2s;
}
.filter-select:focus {
outline: none;
border-color: #0a3dfa;
box-shadow: 0 0 0 3px rgba(10, 61, 250, 0.1);
}
.filter-select option {
background: white;
color: #172a59;
}
.clear-filters-btn {
padding: 0.75rem 1rem;
background: white;
border: 1px solid #e5e7eb;
border-radius: 8px;
color: #6b7280;
font-size: 0.875rem;
font-family: 'Poppins', sans-serif;
cursor: pointer;
transition: all 0.2s;
}
.clear-filters-btn:hover {
background: #fef2f2;
border-color: #fecaca;
color: #dc2626;
}
/* Results Info */
.results-info {
margin-bottom: 1rem;
color: #6b7280;
font-size: 0.875rem;
}
.loading-text {
color: #0a3dfa;
}
.filter-badge {
color: #fa5200;
font-weight: 500;
}
/* Results Grid */
.results-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.error-message {
grid-column: 1 / -1;
padding: 2rem;
text-align: center;
color: #dc2626;
background: #fef2f2;
border: 1px solid #fecaca;
border-radius: 12px;
}
.no-results {
grid-column: 1 / -1;
padding: 3rem;
text-align: center;
color: #6b7280;
font-size: 1.125rem;
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
/* Institution Card */
.institution-card {
background: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 1.25rem;
transition: all 0.2s ease;
border-left: 4px solid var(--type-color, #6b7280);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.institution-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
border-color: #d1d5db;
}
.card-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.75rem;
}
.type-icon {
font-size: 1.25rem;
}
.card-logo {
width: 28px;
height: 28px;
border-radius: 4px;
object-fit: contain;
background: #f5f7fa;
flex-shrink: 0;
}
.type-badge {
font-size: 0.7rem;
font-weight: 600;
padding: 0.2rem 0.5rem;
border-radius: 4px;
color: white;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.country-badge {
margin-left: auto;
font-size: 0.7rem;
font-weight: 600;
padding: 0.2rem 0.4rem;
background: #f3f4f6;
border-radius: 4px;
color: #6b7280;
}
.card-title {
font-size: 1rem;
font-weight: 600;
margin: 0 0 0.5rem 0;
color: #172a59;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
font-family: 'Poppins', sans-serif;
}
.card-meta {
display: flex;
gap: 1rem;
font-size: 0.8rem;
color: #6b7280;
margin-bottom: 1rem;
}
.card-meta .city {
display: flex;
align-items: center;
gap: 0.25rem;
}
.card-meta .rating {
color: #f59e0b;
}
.card-actions {
display: flex;
gap: 0.5rem;
}
.action-btn {
flex: 1;
padding: 0.5rem;
border-radius: 6px;
font-size: 0.8rem;
font-weight: 500;
font-family: 'Poppins', sans-serif;
cursor: pointer;
transition: all 0.2s;
border: none;
}
.action-btn.details {
background: rgba(10, 61, 250, 0.08);
color: #0a3dfa;
border: 1px solid rgba(10, 61, 250, 0.2);
}
.action-btn.details:hover {
background: rgba(10, 61, 250, 0.15);
}
.action-btn.map {
background: rgba(16, 185, 129, 0.08);
color: #059669;
border: 1px solid rgba(16, 185, 129, 0.2);
}
.action-btn.map:hover {
background: rgba(16, 185, 129, 0.15);
}
.action-btn.network {
flex: 0 0 auto;
width: 36px;
padding: 0.5rem;
background: rgba(147, 51, 234, 0.08);
color: #7c3aed;
border: 1px solid rgba(147, 51, 234, 0.2);
}
.action-btn.network:hover {
background: rgba(147, 51, 234, 0.15);
}
/* Pagination */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem;
padding: 1rem 0;
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.page-btn {
padding: 0.5rem 1rem;
background: #f5f7fa;
border: 1px solid #e5e7eb;
border-radius: 6px;
color: #172a59;
font-size: 0.875rem;
font-family: 'Poppins', sans-serif;
cursor: pointer;
transition: all 0.2s;
}
.page-btn:hover:not(:disabled) {
background: #0a3dfa;
border-color: #0a3dfa;
color: white;
}
.page-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.page-info {
padding: 0 1rem;
color: #6b7280;
font-size: 0.875rem;
}
/* Modal */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(23, 42, 89, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 2rem;
backdrop-filter: blur(4px);
}
.modal-content {
background: white;
border: 1px solid #e5e7eb;
border-radius: 16px;
max-width: 600px;
width: 100%;
max-height: 80vh;
overflow-y: auto;
position: relative;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-close {
position: absolute;
top: 1rem;
right: 1rem;
background: #f3f4f6;
border: none;
color: #6b7280;
width: 32px;
height: 32px;
border-radius: 50%;
font-size: 1.25rem;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.modal-close:hover {
background: #e5e7eb;
color: #172a59;
}
.modal-header {
display: flex;
gap: 1rem;
padding: 1.5rem;
border-bottom: 1px solid #e5e7eb;
background: #f9fafb;
border-radius: 16px 16px 0 0;
}
.modal-type-icon {
font-size: 2.5rem;
}
.modal-logo {
width: 56px;
height: 56px;
border-radius: 8px;
object-fit: contain;
background: #f5f7fa;
flex-shrink: 0;
}
.modal-header h2 {
font-size: 1.25rem;
font-weight: 600;
margin: 0 0 0.5rem 0;
color: #172a59;
font-family: 'Poppins', sans-serif;
}
.modal-type-badge {
display: inline-block;
font-size: 0.7rem;
font-weight: 600;
padding: 0.25rem 0.5rem;
border-radius: 4px;
color: white;
text-transform: uppercase;
}
.modal-body {
padding: 1.5rem;
}
.detail-section {
margin-bottom: 1.5rem;
}
.detail-section:last-child {
margin-bottom: 0;
}
.detail-section h4 {
font-size: 0.75rem;
font-weight: 600;
color: #6b7280;
margin: 0 0 0.5rem 0;
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: 'Poppins', sans-serif;
}
.detail-section p {
margin: 0;
color: #172a59;
}
.detail-section .coordinates {
font-size: 0.8rem;
color: #6b7280;
font-family: 'Courier New', monospace;
margin-top: 0.25rem;
}
.detail-section a {
color: #0a3dfa;
text-decoration: none;
word-break: break-all;
}
.detail-section a:hover {
text-decoration: underline;
}
.detail-section.identifiers .identifier {
display: flex;
gap: 0.5rem;
margin-bottom: 0.5rem;
align-items: center;
}
.detail-section .id-label {
font-size: 0.8rem;
color: #6b7280;
min-width: 70px;
}
.detail-section code {
background: #f3f4f6;
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-size: 0.85rem;
font-family: 'Courier New', monospace;
color: #172a59;
}
.modal-footer {
display: flex;
gap: 1rem;
padding: 1.5rem;
border-top: 1px solid #e5e7eb;
justify-content: flex-end;
background: #f9fafb;
border-radius: 0 0 16px 16px;
}
.modal-btn {
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 500;
font-family: 'Poppins', sans-serif;
cursor: pointer;
transition: all 0.2s;
border: none;
}
.modal-btn.secondary {
background: white;
color: #172a59;
border: 1px solid #e5e7eb;
}
.modal-btn.secondary:hover {
background: #f3f4f6;
}
.modal-btn.primary {
background: #0a3dfa;
color: white;
}
.modal-btn.primary:hover {
background: #172a59;
}
/* Responsive */
@media (max-width: 768px) {
.browser-header {
padding: 1.5rem 1rem;
}
.browser-header .header-content h1 {
font-size: 1.5rem;
}
.browser-header .header-content p {
font-size: 0.95rem;
}
.header-stats {
flex-wrap: wrap;
}
.stat-badge {
flex: 1;
min-width: 100px;
padding: 0.75rem 1rem;
}
.stat-value {
font-size: 1.25rem;
}
.browser-content {
padding: 1rem;
}
.search-filters-bar {
flex-direction: column;
padding: 0.75rem;
}
.search-box {
min-width: 100%;
}
.filter-group {
flex-wrap: wrap;
}
.filter-select {
flex: 1;
min-width: 120px;
}
.results-grid {
grid-template-columns: 1fr;
}
.modal-content {
max-height: 90vh;
margin: 1rem;
}
.modal-header {
padding: 1rem;
}
.modal-body {
padding: 1rem;
}
.modal-footer {
padding: 1rem;
flex-direction: column;
}
.modal-btn {
width: 100%;
text-align: center;
}
}
@media (max-width: 480px) {
.browser-header {
padding: 1.25rem 0.75rem;
}
.browser-header .header-content h1 {
font-size: 1.25rem;
}
.stat-badge {
padding: 0.5rem 0.75rem;
}
.stat-value {
font-size: 1.1rem;
}
.stat-label {
font-size: 0.65rem;
}
.browser-content {
padding: 0.75rem;
}
.pagination {
flex-wrap: wrap;
}
}
/* ============================================
DARK MODE STYLES
============================================ */
[data-theme="dark"] .institution-browser-page {
background: #1a1a2e;
}
/* Header */
[data-theme="dark"] .browser-header {
background: linear-gradient(135deg, #1e3a6e 0%, #2a4d8e 100%);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Search and Filters */
[data-theme="dark"] .search-filters-bar {
background: #252542;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .search-input {
background: #1e1e32;
border-color: #3d3d5c;
color: #e0e0e0;
}
[data-theme="dark"] .search-input:focus {
border-color: #4a7dff;
background: #252542;
box-shadow: 0 0 0 3px rgba(74, 125, 255, 0.2);
}
[data-theme="dark"] .search-input::placeholder {
color: #6b7280;
}
[data-theme="dark"] .clear-search-btn {
color: #6b7280;
}
[data-theme="dark"] .clear-search-btn:hover {
color: #e0e0e0;
}
[data-theme="dark"] .filter-select {
background: #1e1e32;
border-color: #3d3d5c;
color: #e0e0e0;
}
[data-theme="dark"] .filter-select:focus {
border-color: #4a7dff;
box-shadow: 0 0 0 3px rgba(74, 125, 255, 0.2);
}
[data-theme="dark"] .filter-select option {
background: #252542;
color: #e0e0e0;
}
[data-theme="dark"] .clear-filters-btn {
background: #1e1e32;
border-color: #3d3d5c;
color: #a0a0b0;
}
[data-theme="dark"] .clear-filters-btn:hover {
background: #3d1c1c;
border-color: #ef4444;
color: #ef4444;
}
/* Results Info */
[data-theme="dark"] .results-info {
color: #a0a0b0;
}
[data-theme="dark"] .loading-text {
color: #6b9aff;
}
[data-theme="dark"] .filter-badge {
color: #ff8c4d;
}
/* Error and No Results */
[data-theme="dark"] .error-message {
background: #3d1c1c;
border-color: #ef4444;
color: #ff6b7a;
}
[data-theme="dark"] .no-results {
background: #252542;
color: #a0a0b0;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
/* Institution Card */
[data-theme="dark"] .institution-card {
background: #252542;
border-color: #3d3d5c;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .institution-card:hover {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
border-color: #4d4d6c;
}
[data-theme="dark"] .country-badge {
background: #1e1e32;
color: #a0a0b0;
}
[data-theme="dark"] .card-logo {
background: #1e1e32;
}
[data-theme="dark"] .card-title {
color: #e0e0e0;
}
[data-theme="dark"] .card-meta {
color: #a0a0b0;
}
[data-theme="dark"] .action-btn.details {
background: rgba(74, 125, 255, 0.1);
color: #6b9aff;
border-color: rgba(74, 125, 255, 0.3);
}
[data-theme="dark"] .action-btn.details:hover {
background: rgba(74, 125, 255, 0.2);
}
[data-theme="dark"] .action-btn.map {
background: rgba(16, 185, 129, 0.1);
color: #10b981;
border-color: rgba(16, 185, 129, 0.3);
}
[data-theme="dark"] .action-btn.map:hover {
background: rgba(16, 185, 129, 0.2);
}
/* Pagination */
[data-theme="dark"] .pagination {
background: #252542;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .page-btn {
background: #1e1e32;
border-color: #3d3d5c;
color: #e0e0e0;
}
[data-theme="dark"] .page-btn:hover:not(:disabled) {
background: #4a7dff;
border-color: #4a7dff;
color: white;
}
[data-theme="dark"] .page-info {
color: #a0a0b0;
}
/* Modal */
[data-theme="dark"] .modal-overlay {
background: rgba(10, 10, 20, 0.8);
}
[data-theme="dark"] .modal-content {
background: #252542;
border-color: #3d3d5c;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .modal-close {
background: #1e1e32;
color: #a0a0b0;
}
[data-theme="dark"] .modal-close:hover {
background: #3d3d5c;
color: #e0e0e0;
}
[data-theme="dark"] .modal-header {
border-bottom-color: #3d3d5c;
background: #1e1e32;
}
[data-theme="dark"] .modal-header h2 {
color: #e0e0e0;
}
[data-theme="dark"] .modal-logo {
background: #1e1e32;
}
[data-theme="dark"] .detail-section h4 {
color: #a0a0b0;
}
[data-theme="dark"] .detail-section p {
color: #e0e0e0;
}
[data-theme="dark"] .detail-section .coordinates {
color: #6b7280;
}
[data-theme="dark"] .detail-section a {
color: #6b9aff;
}
[data-theme="dark"] .detail-section code {
background: #1e1e32;
color: #e0e0e0;
}
[data-theme="dark"] .modal-footer {
border-top-color: #3d3d5c;
background: #1e1e32;
}
[data-theme="dark"] .modal-btn.secondary {
background: #252542;
color: #e0e0e0;
border-color: #3d3d5c;
}
[data-theme="dark"] .modal-btn.secondary:hover {
background: #3d3d5c;
}
[data-theme="dark"] .modal-btn.primary {
background: #4a7dff;
}
[data-theme="dark"] .modal-btn.primary:hover {
background: #2a5ddf;
}
/* Animations */
.institution-card {
animation: fadeInUp 0.3s ease-out;
animation-fill-mode: both;
}
.results-grid .institution-card:nth-child(1) { animation-delay: 0.02s; }
.results-grid .institution-card:nth-child(2) { animation-delay: 0.04s; }
.results-grid .institution-card:nth-child(3) { animation-delay: 0.06s; }
.results-grid .institution-card:nth-child(4) { animation-delay: 0.08s; }
.results-grid .institution-card:nth-child(5) { animation-delay: 0.10s; }
.results-grid .institution-card:nth-child(6) { animation-delay: 0.12s; }
.results-grid .institution-card:nth-child(7) { animation-delay: 0.14s; }
.results-grid .institution-card:nth-child(8) { animation-delay: 0.16s; }
.results-grid .institution-card:nth-child(9) { animation-delay: 0.18s; }
.results-grid .institution-card:nth-child(10) { animation-delay: 0.20s; }
.results-grid .institution-card:nth-child(11) { animation-delay: 0.22s; }
.results-grid .institution-card:nth-child(12) { animation-delay: 0.24s; }
.results-grid .institution-card:nth-child(13) { animation-delay: 0.26s; }
.results-grid .institution-card:nth-child(14) { animation-delay: 0.28s; }
.results-grid .institution-card:nth-child(15) { animation-delay: 0.30s; }
.results-grid .institution-card:nth-child(16) { animation-delay: 0.32s; }
.results-grid .institution-card:nth-child(17) { animation-delay: 0.34s; }
.results-grid .institution-card:nth-child(18) { animation-delay: 0.36s; }
.results-grid .institution-card:nth-child(19) { animation-delay: 0.38s; }
.results-grid .institution-card:nth-child(20) { animation-delay: 0.40s; }
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(15px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
.institution-card {
animation: none;
}
}