From 93b9bc7722d85f58b35b7caf3aebc7b3b253ee43 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 4 Mar 2026 10:35:54 -0800 Subject: [PATCH] fix: migrate campaign and social feed CSS to theme variables Replaced remaining hardcoded dark colors in campaign page CSS and rsocials social feed CSS with theme custom properties so they respond to light/dark mode toggle. Co-Authored-By: Claude Opus 4.6 --- modules/rsocials/mod.ts | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/modules/rsocials/mod.ts b/modules/rsocials/mod.ts index 9503405..dcd8d5e 100644 --- a/modules/rsocials/mod.ts +++ b/modules/rsocials/mod.ts @@ -558,17 +558,17 @@ function renderCampaignPage(space: string): string { const CAMPAIGN_CSS = ` .campaign-page { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; } -.campaign-page__header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #334155; } +.campaign-page__header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rs-input-border); } .campaign-page__icon { font-size: 3rem; } -.campaign-page__title { margin: 0; font-size: 1.5rem; color: #f1f5f9; } -.campaign-page__desc { margin: 0.25rem 0 0.5rem; color: #94a3b8; font-size: 0.9rem; line-height: 1.5; } -.campaign-page__stats { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: #64748b; } +.campaign-page__title { margin: 0; font-size: 1.5rem; color: var(--rs-text-primary); } +.campaign-page__desc { margin: 0.25rem 0 0.5rem; color: var(--rs-text-secondary); font-size: 0.9rem; line-height: 1.5; } +.campaign-page__stats { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: var(--rs-text-muted); } .campaign-phase { margin-bottom: 2rem; } -.campaign-phase__title { font-size: 1.15rem; color: #e2e8f0; margin: 0 0 1rem; display: flex; align-items: center; gap: 0.5rem; } -.campaign-phase__days { font-size: 0.8rem; color: #64748b; font-weight: 400; } +.campaign-phase__title { font-size: 1.15rem; color: var(--rs-text-primary); margin: 0 0 1rem; display: flex; align-items: center; gap: 0.5rem; } +.campaign-phase__days { font-size: 0.8rem; color: var(--rs-text-muted); font-weight: 400; } .campaign-phase__posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; } .campaign-post { - background: #1e293b; border: 1px solid #334155; border-radius: 0.75rem; padding: 1rem; + background: var(--rs-bg-surface); border: 1px solid var(--rs-input-border); border-radius: 0.75rem; padding: 1rem; transition: border-color 0.15s; } .campaign-post:hover { border-color: #6366f1; } @@ -578,13 +578,13 @@ const CAMPAIGN_CSS = ` color: white; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; } .campaign-post__meta { flex: 1; min-width: 0; } -.campaign-post__meta strong { display: block; font-size: 0.8rem; color: #e2e8f0; text-transform: capitalize; } -.campaign-post__date { font-size: 0.7rem; color: #64748b; } +.campaign-post__meta strong { display: block; font-size: 0.8rem; color: var(--rs-text-primary); text-transform: capitalize; } +.campaign-post__date { font-size: 0.7rem; color: var(--rs-text-muted); } .campaign-post__step { font-size: 0.65rem; color: #6366f1; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; } .campaign-status { font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; white-space: nowrap; } .campaign-status--scheduled { background: rgba(16,185,129,0.15); color: #34d399; } .campaign-status--draft { background: rgba(251,191,36,0.15); color: #fbbf24; } -.campaign-post__content { font-size: 0.8rem; color: #94a3b8; line-height: 1.5; margin: 0 0 0.5rem; } +.campaign-post__content { font-size: 0.8rem; color: var(--rs-text-secondary); line-height: 1.5; margin: 0 0 0.5rem; } .campaign-post__tags { display: flex; flex-wrap: wrap; gap: 0.25rem; } .campaign-tag { font-size: 0.65rem; color: #7dd3fc; } .campaign-page__actions { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; } @@ -594,7 +594,7 @@ const CAMPAIGN_CSS = ` } .campaign-action-btn--primary { background: #6366f1; color: white; border: none; } .campaign-action-btn--primary:hover { background: #818cf8; } -.campaign-action-btn--outline { background: transparent; color: #94a3b8; border: 1px solid #334155; } +.campaign-action-btn--outline { background: transparent; color: var(--rs-text-secondary); border: 1px solid var(--rs-input-border); } .campaign-action-btn--outline:hover { border-color: #6366f1; color: #c4b5fd; } .campaign-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; @@ -602,26 +602,26 @@ const CAMPAIGN_CSS = ` } .campaign-modal-overlay[hidden] { display: none; } .campaign-modal { - background: #1e293b; border: 1px solid #334155; border-radius: 0.75rem; + background: var(--rs-bg-surface); border: 1px solid var(--rs-input-border); border-radius: 0.75rem; padding: 1.5rem; width: 90%; max-width: 540px; display: flex; flex-direction: column; gap: 1rem; } .campaign-modal__header { display: flex; align-items: center; justify-content: space-between; } -.campaign-modal__header h3 { margin: 0; font-size: 1.1rem; color: #f1f5f9; } +.campaign-modal__header h3 { margin: 0; font-size: 1.1rem; color: var(--rs-text-primary); } .campaign-modal__close { - background: none; border: none; color: #64748b; font-size: 1.5rem; cursor: pointer; + background: none; border: none; color: var(--rs-text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0; } -.campaign-modal__close:hover { color: #e2e8f0; } +.campaign-modal__close:hover { color: var(--rs-text-primary); } .campaign-modal__textarea { - width: 100%; min-height: 200px; background: #0f172a; color: #e2e8f0; border: 1px solid #334155; + width: 100%; min-height: 200px; background: var(--rs-input-bg); color: var(--rs-input-text); border: 1px solid var(--rs-input-border); border-radius: 8px; padding: 0.75rem; font-family: inherit; font-size: 0.85rem; resize: vertical; line-height: 1.5; box-sizing: border-box; } .campaign-modal__textarea:focus { outline: none; border-color: #6366f1; } -.campaign-modal__textarea::placeholder { color: #475569; } +.campaign-modal__textarea::placeholder { color: var(--rs-text-muted); } .campaign-modal__row { display: flex; gap: 0.75rem; align-items: center; } .campaign-modal__select { - flex: 1; background: #0f172a; color: #e2e8f0; border: 1px solid #334155; + flex: 1; background: var(--rs-input-bg); color: var(--rs-input-text); border: 1px solid var(--rs-input-border); border-radius: 8px; padding: 0.5rem 0.75rem; font-size: 0.85rem; } .campaign-modal__select:focus { outline: none; border-color: #6366f1; } @@ -644,7 +644,7 @@ routes.get("/campaign", (c) => { const THREAD_CSS = ` .thread-page { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; min-height: 80vh; } .thread-page__header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; } -.thread-page__header h1 { margin: 0; font-size: 1.5rem; color: #f1f5f9; background: linear-gradient(135deg, #7dd3fc, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } +.thread-page__header h1 { margin: 0; font-size: 1.5rem; color: var(--rs-text-primary); background: linear-gradient(135deg, #7dd3fc, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .thread-page__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; } .thread-btn { padding: 0.5rem 1rem; border-radius: 8px; border: none; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s; } .thread-btn--primary { background: #6366f1; color: white; } @@ -1727,20 +1727,20 @@ routes.get("/", (c) => { padding: 2px 8px; border-radius: 4px; text-transform: uppercase; line-height: 1.6; } -.rsocials-subtitle { color: #64748b; font-size: 0.85rem; margin: 0; } +.rsocials-subtitle { color: var(--rs-text-muted); font-size: 0.85rem; margin: 0; } .rsocials-feed { display: flex; flex-direction: column; gap: 1px; } -.rsocials-loading { color: #64748b; padding: 2rem 0; text-align: center; } -.rsocials-empty { color: #64748b; padding: 2rem 0; text-align: center; } +.rsocials-loading { color: var(--rs-text-muted); padding: 2rem 0; text-align: center; } +.rsocials-empty { color: var(--rs-text-muted); padding: 2rem 0; text-align: center; } .rsocials-item { padding: 1rem; border-radius: 8px; - background: #1e293b; border: 1px solid rgba(255,255,255,0.06); + background: var(--rs-bg-surface); border: 1px solid var(--rs-border-subtle); margin-bottom: 0.5rem; transition: border-color 0.2s; } .rsocials-item:hover { border-color: rgba(99,102,241,0.3); } .rsocials-item-header { display: flex; align-items: center; gap: 0.75rem; - font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.5rem; + font-size: 0.85rem; color: var(--rs-text-secondary); margin-bottom: 0.5rem; } .rsocials-avatar { width: 36px; height: 36px; border-radius: 50%; @@ -1751,23 +1751,23 @@ routes.get("/", (c) => { .rsocials-meta { display: flex; flex-direction: column; gap: 1px; } -.rsocials-meta strong { color: #e2e8f0; font-size: 0.9rem; } -.rsocials-meta time { font-size: 0.75rem; color: #64748b; } -.rsocials-item-header strong { color: #e2e8f0; } +.rsocials-meta strong { color: var(--rs-text-primary); font-size: 0.9rem; } +.rsocials-meta time { font-size: 0.75rem; color: var(--rs-text-muted); } +.rsocials-item-header strong { color: var(--rs-text-primary); } .rsocials-item-header time { margin-left: auto; font-size: 0.75rem; } .rsocials-source { font-size: 0.65rem; padding: 1px 6px; border-radius: 4px; background: rgba(124,58,237,0.15); color: #c4b5fd; text-transform: uppercase; letter-spacing: 0.05em; } -.rsocials-item-content { margin: 0 0 0.75rem; color: #cbd5e1; line-height: 1.6; font-size: 0.9rem; } +.rsocials-item-content { margin: 0 0 0.75rem; color: var(--rs-text-primary); line-height: 1.6; font-size: 0.9rem; } .rsocials-item-link { display: block; font-size: 0.8rem; color: #7dd3fc; text-decoration: none; margin-bottom: 0.5rem; word-break: break-all; } .rsocials-item-link:hover { text-decoration: underline; } .rsocials-item-actions { - display: flex; gap: 1rem; font-size: 0.8rem; color: #64748b; + display: flex; gap: 1rem; font-size: 0.8rem; color: var(--rs-text-muted); } .rsocials-action { display: flex; align-items: center; gap: 0.35rem; @@ -1775,8 +1775,8 @@ routes.get("/", (c) => { } .rsocials-action svg { opacity: 0.7; } .rsocials-demo-notice { - text-align: center; font-size: 0.75rem; color: #475569; - padding: 1rem 0; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 0.5rem; + text-align: center; font-size: 0.75rem; color: var(--rs-text-muted); + padding: 1rem 0; border-top: 1px solid var(--rs-border-subtle); margin-top: 0.5rem; } `, }),