Files
peptide-news-plugin/public/css/public-style.css
github-actions[bot] dd36c7fe6e Deploy 8b14e9e from main
2026-04-07 07:22:55 +00:00

382 lines
8.5 KiB
CSS

/**
* Peptide News Feed — Public Styles
*
* Clean, modern news feed layout without thumbnails.
* Focuses on readability and content hierarchy.
*
* @since 2.0.0
*/
/* ── Feed container ────────────────────────────────────────────── */
.pn-news-feed {
max-width: 760px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
color: #1a1a2e;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
/* ── Articles list ─────────────────────────────────────────────── */
.pn-articles-list {
display: flex;
flex-direction: column;
gap: 0;
}
/* ── Individual article ────────────────────────────────────────── */
.pn-article {
padding: 1.5rem 0;
border-bottom: 1px solid #e8eaed;
transition: background-color 0.15s ease;
}
.pn-article:first-child {
padding-top: 0;
}
.pn-article:last-child {
border-bottom: none;
}
/* ── Meta line (source · date) ─────────────────────────────────── */
.pn-article-meta {
display: flex;
align-items: center;
gap: 0.4rem;
margin-bottom: 0.375rem;
font-size: 0.8125rem;
color: #6b7280;
line-height: 1.4;
}
.pn-source {
font-weight: 600;
color: #4b5563;
text-transform: uppercase;
letter-spacing: 0.03em;
font-size: 0.75rem;
}
.pn-separator {
color: #d1d5db;
}
.pn-date {
color: #9ca3af;
}
/* ── Title ─────────────────────────────────────────────────────── */
.pn-article-title {
font-size: 1.125rem;
font-weight: 600;
line-height: 1.4;
margin: 0 0 0.5rem;
color: #111827;
}
.pn-article-title a {
color: inherit;
text-decoration: none;
transition: color 0.15s ease;
}
.pn-article-title a:hover {
color: #2563eb;
}
.pn-article-title a:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 2px;
border-radius: 2px;
}
/* ── Excerpt / AI summary ──────────────────────────────────────── */
.pn-article-excerpt {
font-size: 0.9375rem;
line-height: 1.65;
color: #4b5563;
margin: 0 0 0.625rem;
}
/* ── Author ────────────────────────────────────────────────────── */
.pn-author {
display: inline-block;
font-size: 0.8125rem;
color: #9ca3af;
margin-bottom: 0.375rem;
}
.pn-author::before {
content: "By ";
font-style: italic;
}
/* ── Tags ──────────────────────────────────────────────────────── */
.pn-tags {
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
margin-top: 0.375rem;
}
.pn-tag {
display: inline-block;
font-size: 0.6875rem;
background: #eff6ff;
color: #1d4ed8;
padding: 0.1875rem 0.625rem;
border-radius: 100px;
line-height: 1.5;
font-weight: 500;
letter-spacing: 0.01em;
}
/* ── Loading skeleton ──────────────────────────────────────────── */
.pn-loading {
display: flex;
flex-direction: column;
gap: 0;
}
.pn-skeleton-card {
padding: 1.5rem 0;
border-bottom: 1px solid #e8eaed;
}
.pn-skeleton-card:first-child {
padding-top: 0;
}
.pn-skeleton-line {
background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
background-size: 200% 100%;
animation: pn-shimmer 1.5s ease-in-out infinite;
border-radius: 4px;
margin-bottom: 0.5rem;
}
.pn-skeleton-meta {
width: 140px;
height: 14px;
}
.pn-skeleton-title {
width: 85%;
height: 20px;
}
.pn-skeleton-excerpt {
width: 100%;
height: 14px;
}
.pn-skeleton-excerpt-short {
width: 60%;
height: 14px;
}
.pn-skeleton-tags {
display: flex;
gap: 0.375rem;
margin-top: 0.5rem;
}
.pn-skeleton-tag {
width: 64px;
height: 22px;
border-radius: 100px;
background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
background-size: 200% 100%;
animation: pn-shimmer 1.5s ease-in-out infinite;
}
@keyframes pn-shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* ── Error state ───────────────────────────────────────────────── */
.pn-error {
text-align: center;
padding: 2.5rem 1rem;
color: #6b7280;
}
.pn-error p {
font-size: 0.9375rem;
margin: 0 0 1rem;
}
.pn-retry-btn {
display: inline-block;
padding: 0.5rem 1.25rem;
font-size: 0.875rem;
font-weight: 500;
color: #2563eb;
background: #eff6ff;
border: 1px solid #bfdbfe;
border-radius: 6px;
cursor: pointer;
transition: all 0.15s ease;
}
.pn-retry-btn:hover {
background: #dbeafe;
border-color: #93c5fd;
}
.pn-retry-btn:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 2px;
}
/* ── Empty state ───────────────────────────────────────────────── */
.pn-empty {
text-align: center;
padding: 2.5rem 1rem;
}
.pn-empty p {
font-size: 0.9375rem;
color: #6b7280;
margin: 0;
}
/* ── Pagination ────────────────────────────────────────────────── */
.pn-pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
padding: 1.5rem 0 0.5rem;
margin-top: 0.5rem;
border-top: 1px solid #e8eaed;
}
.pn-page-btn {
display: inline-flex;
align-items: center;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 500;
color: #374151;
background: #fff;
border: 1px solid #d1d5db;
border-radius: 6px;
cursor: pointer;
transition: all 0.15s ease;
line-height: 1;
}
.pn-page-btn:hover:not(:disabled) {
background: #f9fafb;
border-color: #9ca3af;
}
.pn-page-btn:disabled {
color: #d1d5db;
border-color: #e5e7eb;
cursor: not-allowed;
}
.pn-page-btn:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 2px;
}
.pn-page-info {
font-size: 0.8125rem;
color: #6b7280;
min-width: 100px;
text-align: center;
}
/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
.pn-article-title {
font-size: 1rem;
}
.pn-article-excerpt {
font-size: 0.875rem;
}
.pn-pagination {
gap: 0.5rem;
}
.pn-page-btn {
padding: 0.375rem 0.75rem;
font-size: 0.8125rem;
}
}
/* ── Dark mode support via prefers-color-scheme ────────────────── */
@media (prefers-color-scheme: dark) {
.pn-news-feed {
color: #e5e7eb;
}
.pn-article {
border-bottom-color: #374151;
}
.pn-article-title {
color: #f3f4f6;
}
.pn-article-title a:hover {
color: #60a5fa;
}
.pn-source {
color: #9ca3af;
}
.pn-article-excerpt {
color: #9ca3af;
}
.pn-tag {
background: #1e3a5f;
color: #93c5fd;
}
.pn-skeleton-line,
.pn-skeleton-tag {
background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
background-size: 200% 100%;
}
.pn-page-btn {
color: #e5e7eb;
background: #1f2937;
border-color: #4b5563;
}
.pn-page-btn:hover:not(:disabled) {
background: #374151;
}
.pn-page-btn:disabled {
color: #4b5563;
border-color: #374151;
}
.pn-retry-btn {
color: #60a5fa;
background: #1e3a5f;
border-color: #1d4ed8;
}
.pn-pagination {
border-top-color: #374151;
}
.pn-skeleton-card {
border-bottom-color: #374151;
}
}