Deploy 868d31c from main

This commit is contained in:
peptiderepo
2026-04-22 10:14:27 +00:00
commit e62b51a764
28 changed files with 6032 additions and 0 deletions

387
assets/css/peptide-search.css Executable file
View File

@@ -0,0 +1,387 @@
/* ==========================================================================
Peptide Search AI — Frontend Styles
========================================================================== */
/* --- Search Form --- */
.psa-search-wrap {
max-width: 720px;
margin: 2rem auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}
.psa-search-form {
margin-bottom: 1.5rem;
}
.psa-search-input-wrap {
display: flex;
gap: 0;
border: 2px solid #2563eb;
border-radius: 8px;
overflow: hidden;
transition: border-color 0.2s;
}
.psa-search-input-wrap:focus-within {
border-color: #1d4ed8;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.psa-search-input {
flex: 1;
padding: 14px 18px;
font-size: 16px;
border: none;
outline: none;
background: #fff;
color: #1e293b;
}
.psa-search-input::placeholder {
color: #94a3b8;
}
.psa-search-input:focus {
outline: 2px solid #2563eb;
outline-offset: 2px;
}
.psa-search-btn {
padding: 14px 24px;
background: #2563eb;
color: #fff;
border: none;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
white-space: nowrap;
}
.psa-search-btn:hover {
background: #1d4ed8;
}
.psa-search-btn:focus-visible {
outline: 2px solid #fff;
outline-offset: -2px;
}
.psa-search-icon {
margin-right: 4px;
}
/* --- Search Results --- */
.psa-search-results {
margin-top: 1rem;
}
.psa-result-count {
font-size: 14px;
color: #64748b;
margin-bottom: 1rem;
}
.psa-result-item {
display: block;
padding: 16px 20px;
margin-bottom: 8px;
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 8px;
text-decoration: none;
color: inherit;
transition: border-color 0.2s, box-shadow 0.2s;
}
.psa-result-item:hover {
border-color: #2563eb;
box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.psa-result-title {
font-size: 18px;
font-weight: 600;
color: #1e293b;
margin: 0 0 6px;
}
.psa-result-meta {
font-size: 13px;
color: #64748b;
margin-bottom: 6px;
}
.psa-result-meta span {
margin-right: 16px;
}
.psa-result-excerpt {
font-size: 14px;
color: #475569;
line-height: 1.5;
margin: 0;
}
.psa-result-badge {
display: inline-block;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 2px 8px;
border-radius: 4px;
margin-left: 8px;
vertical-align: middle;
}
.psa-badge-ai {
background: #fef3c7;
color: #92400e;
}
.psa-badge-verified {
background: #d1fae5;
color: #065f46;
}
.psa-badge-manual {
background: #dbeafe;
color: #1e40af;
}
/* --- Checking / Loading State --- */
.psa-checking {
margin-top: 1.5rem;
}
.psa-checking-inner {
text-align: center;
padding: 32px 24px;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 12px;
}
.psa-checking-inner p {
margin: 12px 0 0;
font-size: 15px;
color: #64748b;
}
/* --- Spinner --- */
.psa-spinner {
display: inline-block;
width: 36px;
height: 36px;
border: 4px solid #bfdbfe;
border-top-color: #2563eb;
border-radius: 50%;
animation: psa-spin 0.8s linear infinite;
}
@keyframes psa-spin {
to { transform: rotate(360deg); }
}
/* --- Pending / Being Added Page --- */
.psa-pending {
margin-top: 1.5rem;
}
.psa-pending-inner {
text-align: center;
padding: 40px 32px;
background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
border: 1px solid #bfdbfe;
border-radius: 16px;
}
.psa-pending-icon {
font-size: 48px;
line-height: 1;
margin-bottom: 8px;
}
.psa-pending-inner h3 {
margin: 0 0 12px;
font-size: 21px;
color: #1e40af;
font-weight: 700;
}
.psa-pending-inner > p {
margin: 0 0 28px;
font-size: 15px;
color: #3b82f6;
max-width: 500px;
margin-left: auto;
margin-right: auto;
line-height: 1.6;
}
/* --- Invalid Peptide --- */
.psa-invalid {
margin-top: 1.5rem;
}
.psa-invalid-inner {
text-align: center;
padding: 32px 24px;
background: #fafafa;
border: 1px solid #e2e8f0;
border-radius: 12px;
}
.psa-invalid-inner h3 {
margin: 0 0 12px;
font-size: 20px;
color: #334155;
}
.psa-invalid-inner p {
margin: 0;
font-size: 15px;
color: #64748b;
max-width: 500px;
margin-left: auto;
margin-right: auto;
line-height: 1.6;
}
/* --- Error State --- */
.psa-error {
margin-top: 1.5rem;
padding: 16px 20px;
background: #fef2f2;
border: 1px solid #fca5a5;
border-radius: 8px;
color: #991b1b;
font-size: 14px;
}
/* --- Single Peptide Page Data --- */
.psa-peptide-data {
margin-top: 2rem;
}
.psa-quick-facts {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 10px;
padding: 20px 24px;
margin-bottom: 2rem;
}
.psa-quick-facts h3 {
margin: 0 0 12px;
font-size: 16px;
font-weight: 700;
color: #334155;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.psa-facts-table {
width: 100%;
border-collapse: collapse;
}
.psa-facts-table th {
text-align: left;
padding: 8px 16px 8px 0;
font-weight: 600;
color: #475569;
width: 180px;
vertical-align: top;
border-bottom: 1px solid #e2e8f0;
font-size: 14px;
}
.psa-facts-table td {
padding: 8px 0;
color: #1e293b;
border-bottom: 1px solid #e2e8f0;
font-size: 14px;
}
.psa-facts-table tr:last-child th,
.psa-facts-table tr:last-child td {
border-bottom: none;
}
.psa-sequence {
font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
font-size: 13px;
word-break: break-all;
background: #f1f5f9;
padding: 4px 8px;
border-radius: 4px;
}
.psa-section {
margin-bottom: 2rem;
}
.psa-section h3 {
font-size: 18px;
font-weight: 700;
color: #1e293b;
margin: 0 0 12px;
padding-bottom: 8px;
border-bottom: 2px solid #2563eb;
}
.psa-section-content {
font-size: 15px;
line-height: 1.77;
color: #334155;
}
.psa-source-badge {
margin-top: 2rem;
padding: 12px 16px;
border-radius: 8px;
font-size: 13px;
line-height: 1.5;
}
.psa-source-badge.psa-badge-ai {
background: #fffbeb;
border: 1px solid #fde68a;
color: #92400e;
}
.psa-source-badge.psa-badge-verified {
background: #ecfdf5;
border: 1px solid #6ee7b7;
color: #065f46;
}
.psa-source-badge.psa-badge-manual {
background: #eff6ff;
border: 1px solid #93c5fd;
color: #1e40af;
}
/* --- Responsive --- */
@media (max-width: 600px) {
.psa-search-input-wrap,
.psa-notify-input-wrap {
flex-direction: column;
}
.psa-search-btn,
.psa-notify-btn {
border-radius: 0;
}
.psa-facts-table th {
width: 120px;
}
.psa-pending-inner {
padding: 28px 20px;
}
}

621
assets/css/psa-directory.css Executable file
View File

@@ -0,0 +1,621 @@
/* ==========================================================================
Peptide Directory — Card Grid, Filters, and Detail Modal
Namespace: .psa-dir-* (BEM)
========================================================================== */
/* --- CSS Custom Properties for category badge colors (reusable by other plugins) --- */
:root {
--psa-cat-tissue-repair-bg: #d4edda;
--psa-cat-tissue-repair-fg: #155724;
--psa-cat-lipid-metabolism-bg: #d1ecf1;
--psa-cat-lipid-metabolism-fg: #0c5460;
--psa-cat-aging-research-bg: #e2d5f1;
--psa-cat-aging-research-fg: #432874;
--psa-cat-dermatological-bg: #fce4d6;
--psa-cat-dermatological-fg: #7c4a1a;
--psa-cat-metabolic-bg: #fff3cd;
--psa-cat-metabolic-fg: #856404;
--psa-cat-growth-hormone-bg: #cce5ff;
--psa-cat-growth-hormone-fg: #004085;
--psa-cat-immunology-bg: #f5c6cb;
--psa-cat-immunology-fg: #721c24;
--psa-cat-endocrine-bg: #c3e6cb;
--psa-cat-endocrine-fg: #1b5e20;
}
/* --- Wrapper --- */
.psa-dir-wrap {
max-width: 1200px;
margin: 0 auto;
padding: 2rem 1rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}
/* --- Header --- */
.psa-dir-header {
text-align: center;
margin-bottom: 2rem;
}
.psa-dir-title {
font-size: 2rem;
font-weight: 700;
color: #1e293b;
margin: 0 0 0.5rem;
}
.psa-dir-subtitle {
font-size: 1.05rem;
color: #64748b;
margin: 0;
}
/* --- Search --- */
.psa-dir-search-wrap {
max-width: 480px;
margin: 0 auto 1.5rem;
}
.psa-dir-search {
width: 100%;
padding: 12px 16px;
font-size: 15px;
border: 2px solid #e2e8f0;
border-radius: 8px;
outline: none;
transition: border-color 0.2s;
box-sizing: border-box;
}
.psa-dir-search:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
/* --- Tabs --- */
.psa-dir-tabs {
display: flex;
justify-content: center;
gap: 4px;
margin-bottom: 1.5rem;
}
.psa-dir-tab {
padding: 8px 20px;
font-size: 14px;
font-weight: 600;
border: 1px solid #e2e8f0;
border-radius: 6px;
background: #fff;
color: #64748b;
cursor: pointer;
transition: all 0.2s;
}
.psa-dir-tab:hover {
background: #f8fafc;
}
.psa-dir-tab--active {
background: #2563eb;
color: #fff;
border-color: #2563eb;
}
/* --- Category Filters --- */
.psa-dir-filters {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
margin-bottom: 2rem;
}
.psa-dir-filter {
padding: 6px 16px;
font-size: 13px;
font-weight: 500;
border: 1px solid #e2e8f0;
border-radius: 20px;
background: #fff;
color: #475569;
cursor: pointer;
transition: all 0.2s;
}
.psa-dir-filter:hover {
border-color: #2563eb;
color: #2563eb;
}
.psa-dir-filter--active {
background: #2563eb;
color: #fff;
border-color: #2563eb;
}
/* --- Grid --- */
.psa-dir-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
}
/* --- Card --- */
.psa-dir-card {
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 1.25rem;
display: flex;
flex-direction: column;
transition: border-color 0.2s, box-shadow 0.2s;
}
.psa-dir-card:hover {
border-color: #2563eb;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.psa-dir-card__header {
margin-bottom: 0.75rem;
}
.psa-dir-card__title {
font-size: 1.1rem;
font-weight: 700;
color: #1e293b;
margin: 0 0 0.5rem;
}
.psa-dir-card__badge {
display: inline-block;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 2px 10px;
border-radius: 12px;
}
.psa-dir-card__meta {
display: flex;
flex-direction: column;
gap: 4px;
margin-bottom: 1rem;
flex-grow: 1;
}
.psa-dir-card__meta-item {
display: flex;
justify-content: space-between;
font-size: 13px;
}
.psa-dir-card__meta-label {
color: #64748b;
font-weight: 500;
}
.psa-dir-card__meta-value {
color: #1e293b;
font-weight: 600;
}
.psa-dir-card__btn {
width: 100%;
padding: 10px;
font-size: 14px;
font-weight: 600;
background: #2563eb;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background 0.2s;
margin-top: auto;
}
.psa-dir-card__btn:hover {
background: #1d4ed8;
}
/* --- Category Badge Colors --- */
.psa-dir-badge--tissue-repair { background: var(--psa-cat-tissue-repair-bg); color: var(--psa-cat-tissue-repair-fg); }
.psa-dir-badge--lipid-metabolism { background: var(--psa-cat-lipid-metabolism-bg); color: var(--psa-cat-lipid-metabolism-fg); }
.psa-dir-badge--aging-research { background: var(--psa-cat-aging-research-bg); color: var(--psa-cat-aging-research-fg); }
.psa-dir-badge--dermatological { background: var(--psa-cat-dermatological-bg); color: var(--psa-cat-dermatological-fg); }
.psa-dir-badge--metabolic { background: var(--psa-cat-metabolic-bg); color: var(--psa-cat-metabolic-fg); }
.psa-dir-badge--growth-hormone { background: var(--psa-cat-growth-hormone-bg); color: var(--psa-cat-growth-hormone-fg); }
.psa-dir-badge--immunology { background: var(--psa-cat-immunology-bg); color: var(--psa-cat-immunology-fg); }
.psa-dir-badge--endocrine { background: var(--psa-cat-endocrine-bg); color: var(--psa-cat-endocrine-fg); }
/* --- Empty State --- */
.psa-dir-empty,
.psa-dir-coming-soon {
text-align: center;
padding: 3rem 1rem;
color: #64748b;
font-size: 1rem;
}
/* --- Loader --- */
.psa-dir-loader {
text-align: center;
padding: 3rem 1rem;
}
.psa-dir-loader p {
color: #64748b;
margin-top: 1rem;
}
/* --- Load More --- */
.psa-dir-load-more-wrap {
text-align: center;
margin-top: 2rem;
}
.psa-dir-load-more {
padding: 12px 32px;
font-size: 15px;
font-weight: 600;
background: #fff;
color: #2563eb;
border: 2px solid #2563eb;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
}
.psa-dir-load-more:hover {
background: #2563eb;
color: #fff;
}
.psa-dir-load-more:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* --- Error --- */
.psa-dir-error {
text-align: center;
color: #991b1b;
padding: 2rem;
}
/* ==========================================================================
Detail Modal
========================================================================== */
.psa-dir-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 99999;
display: flex;
align-items: center;
justify-content: center;
}
.psa-dir-modal__backdrop {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
}
.psa-dir-modal__content {
position: relative;
background: #fff;
border-radius: 16px;
padding: 2rem;
max-width: 700px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.psa-dir-modal__close {
position: absolute;
top: 12px;
right: 16px;
font-size: 28px;
background: none;
border: none;
color: #94a3b8;
cursor: pointer;
line-height: 1;
padding: 4px;
}
.psa-dir-modal__close:hover {
color: #1e293b;
}
.psa-dir-modal__title {
font-size: 1.5rem;
font-weight: 700;
color: #1e293b;
margin: 0 0 0.5rem;
padding-right: 2rem;
}
.psa-dir-modal__badges {
margin-bottom: 1rem;
}
.psa-dir-modal__desc {
font-size: 15px;
line-height: 1.65;
color: #475569;
margin-bottom: 1.5rem;
}
/* --- Sequence --- */
.psa-dir-modal__sequence-wrap {
display: flex;
align-items: flex-start;
gap: 8px;
background: #f1f5f9;
padding: 12px;
border-radius: 8px;
}
.psa-dir-modal__sequence {
font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
font-size: 13px;
word-break: break-all;
flex: 1;
color: #334155;
}
.psa-dir-modal__copy {
padding: 4px 12px;
font-size: 12px;
font-weight: 600;
background: #2563eb;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
white-space: nowrap;
}
.psa-dir-modal__copy:hover {
background: #1d4ed8;
}
/* --- Data Grid --- */
.psa-dir-modal__data-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin-bottom: 1.5rem;
padding: 1rem;
background: #f8fafc;
border-radius: 10px;
border: 1px solid #e2e8f0;
}
.psa-dir-modal__data-item {
display: flex;
flex-direction: column;
gap: 2px;
}
.psa-dir-modal__data-label {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.3px;
color: #64748b;
}
.psa-dir-modal__data-value {
font-size: 14px;
font-weight: 600;
color: #1e293b;
}
/* --- Modal Sections --- */
.psa-dir-modal__section {
margin-bottom: 1.5rem;
}
.psa-dir-modal__section h4 {
font-size: 15px;
font-weight: 700;
color: #1e293b;
margin: 0 0 0.5rem;
padding-bottom: 6px;
border-bottom: 2px solid #2563eb;
}
.psa-dir-modal__section p {
font-size: 14px;
line-height: 1.6;
color: #475569;
margin: 0 0 0.5rem;
}
/* --- PubChem Link --- */
.psa-dir-modal__pubchem {
display: inline-block;
font-size: 13px;
color: #2563eb;
text-decoration: none;
margin-bottom: 1rem;
}
.psa-dir-modal__pubchem:hover {
text-decoration: underline;
}
/* --- Full Page Link --- */
.psa-dir-modal__full-link {
display: inline-block;
padding: 10px 24px;
font-size: 14px;
font-weight: 600;
background: #f1f5f9;
color: #2563eb;
text-decoration: none;
border-radius: 8px;
transition: background 0.2s;
}
.psa-dir-modal__full-link:hover {
background: #e2e8f0;
}
/* ==========================================================================
Responsive
========================================================================== */
/* Tablet: 2 columns */
@media (max-width: 900px) {
.psa-dir-grid {
grid-template-columns: repeat(2, 1fr);
}
}
/* Mobile: 1 column */
@media (max-width: 600px) {
.psa-dir-grid {
grid-template-columns: 1fr;
}
.psa-dir-title {
font-size: 1.5rem;
}
.psa-dir-modal__content {
width: 95%;
padding: 1.25rem;
max-height: 90vh;
}
.psa-dir-modal__data-grid {
grid-template-columns: 1fr;
}
.psa-dir-filters {
gap: 6px;
}
.psa-dir-filter {
font-size: 12px;
padding: 5px 12px;
}
}
/* ==========================================================================
Dark Mode Support
Uses the theme's data-theme="dark" attribute and CSS custom properties.
========================================================================== */
[data-theme="dark"] .psa-dir-wrap {
color: #e2e8f0;
}
[data-theme="dark"] .psa-dir-title {
color: #f1f5f9;
}
[data-theme="dark"] .psa-dir-subtitle {
color: #94a3b8;
}
[data-theme="dark"] .psa-dir-search {
background: #1e293b;
border-color: #334155;
color: #f1f5f9;
}
[data-theme="dark"] .psa-dir-tab {
background: #1e293b;
border-color: #334155;
color: #94a3b8;
}
[data-theme="dark"] .psa-dir-tab--active {
background: #2563eb;
color: #fff;
}
[data-theme="dark"] .psa-dir-filter {
background: #1e293b;
border-color: #334155;
color: #94a3b8;
}
[data-theme="dark"] .psa-dir-filter--active {
background: #2563eb;
color: #fff;
}
[data-theme="dark"] .psa-dir-card {
background: #1e293b;
border-color: #334155;
}
[data-theme="dark"] .psa-dir-card__title {
color: #f1f5f9;
}
[data-theme="dark"] .psa-dir-card__meta-label {
color: #94a3b8;
}
[data-theme="dark"] .psa-dir-card__meta-value {
color: #e2e8f0;
}
[data-theme="dark"] .psa-dir-modal__content {
background: #0f172a;
color: #e2e8f0;
}
[data-theme="dark"] .psa-dir-modal__title {
color: #f1f5f9;
}
[data-theme="dark"] .psa-dir-modal__desc {
color: #94a3b8;
}
[data-theme="dark"] .psa-dir-modal__data-grid {
background: #1e293b;
border-color: #334155;
}
[data-theme="dark"] .psa-dir-modal__data-label {
color: #94a3b8;
}
[data-theme="dark"] .psa-dir-modal__data-value {
color: #e2e8f0;
}
[data-theme="dark"] .psa-dir-modal__sequence-wrap {
background: #1e293b;
}
[data-theme="dark"] .psa-dir-modal__sequence {
color: #e2e8f0;
}
[data-theme="dark"] .psa-dir-modal__close {
color: #64748b;
}
[data-theme="dark"] .psa-dir-modal__close:hover {
color: #f1f5f9;
}