Initial commit: Beep WordPress plugin

- Custom post type with likes, replies, moderation, shortcodes
- Beep icon and logo assets
- CSS and JS for frontend
This commit is contained in:
Krystie
2026-05-18 02:22:57 -07:00
commit ccead50116
17 changed files with 2181 additions and 0 deletions
+760
View File
@@ -0,0 +1,760 @@
/* ============================================================
Beep — Twitter-style microblog for WordPress
All rules are scoped under .beep-feed so they don't leak
into the host theme.
============================================================ */
.beep-feed,
.beep-feed * {
box-sizing: border-box;
}
.beep-feed {
--beep-bg: #ffffff;
--beep-text: #0F1419;
--beep-text-secondary: #536471;
--beep-border: #EFF3F4;
--beep-hover: #F7F9F9;
--beep-accent: #1D9BF0;
--beep-accent-hover: #1A8CD8;
--beep-like: #F91880;
--beep-repost: #00BA7C;
--beep-page-bg: #E6ECF0;
max-width: 600px;
margin: 24px auto;
background: var(--beep-bg);
border: 1px solid var(--beep-border);
border-radius: 16px;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
color: var(--beep-text);
font-size: 15px;
line-height: 1.4;
-webkit-font-smoothing: antialiased;
}
/* ---------- Header ---------- */
.beep-feed-header {
padding: 14px 20px;
border-bottom: 1px solid var(--beep-border);
font-size: 20px;
font-weight: 800;
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(12px);
display: flex;
align-items: center;
gap: 10px;
position: sticky;
top: 0;
z-index: 10;
}
.beep-feed-header-text {
font-size: 20px;
font-weight: 800;
color: var(--beep-text);
white-space: nowrap;
}
.beep-feed-header .beep-logo {
height: 36px;
width: auto;
max-width: 100%;
flex-shrink: 0;
object-fit: contain;
display: block;
}
/* ---------- Notices ---------- */
.beep-notice {
padding: 24px 20px;
border-bottom: 1px solid var(--beep-border);
text-align: center;
}
.beep-notice p {
margin: 0 0 12px;
font-size: 16px;
}
.beep-notice-banned {
color: var(--beep-text-secondary);
font-style: italic;
}
/* ---------- Avatars ---------- */
.beep-feed .beep-avatar {
width: 48px !important;
height: 48px !important;
min-width: 48px !important;
max-width: 48px !important;
border-radius: 50% !important;
flex-shrink: 0;
background: #ccd6dd;
object-fit: cover !important;
aspect-ratio: 1 / 1 !important;
display: block !important;
}
.beep-feed .beep-avatar-sm {
width: 36px !important;
height: 36px !important;
min-width: 36px !important;
max-width: 36px !important;
}
/* ---------- Compose ---------- */
.beep-compose {
display: flex;
gap: 12px;
padding: 16px;
border-bottom: 1px solid var(--beep-border);
}
.beep-compose-body {
flex: 1;
min-width: 0;
}
.beep-feed .beep-input {
width: 100% !important;
border: 0 !important;
outline: 0 !important;
resize: none !important;
background: #ffffff !important;
font-family: inherit !important;
font-size: 18px !important;
line-height: 1.4 !important;
color: var(--beep-text) !important;
padding: 8px 0 !important;
min-height: 32px;
overflow: hidden;
box-shadow: none !important;
}
.beep-feed .beep-input::placeholder {
color: var(--beep-text-secondary) !important;
opacity: 1 !important;
}
.beep-compose-footer,
.beep-reply-footer {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 12px;
border-top: 1px solid var(--beep-border);
padding-top: 10px;
margin-top: 4px;
}
/* ---------- Char counter ---------- */
.beep-char-counter {
font-size: 13px;
color: var(--beep-text-secondary);
font-variant-numeric: tabular-nums;
}
.beep-counter-warn { color: #FFD400; }
.beep-counter-bad { color: #F4212E; font-weight: 700; }
/* ---------- Buttons ---------- */
.beep-button {
display: inline-block;
background: var(--beep-accent);
color: #fff;
border: 0;
border-radius: 9999px;
padding: 8px 18px;
font-weight: 700;
font-size: 15px;
cursor: pointer;
text-decoration: none;
font-family: inherit;
transition: background-color 0.15s ease, opacity 0.15s ease;
}
.beep-button:hover { background: var(--beep-accent-hover); color: #fff; }
.beep-button:disabled { opacity: 0.5; cursor: default; }
.beep-button:disabled:hover { background: var(--beep-accent); }
.beep-button-secondary {
background: transparent;
color: var(--beep-accent);
border: 1px solid var(--beep-accent);
margin-left: 8px;
}
.beep-button-secondary:hover {
background: rgba(29, 155, 240, 0.1);
color: var(--beep-accent);
}
/* ---------- Post ---------- */
.beep-list {
background: var(--beep-bg);
}
.beep-empty {
padding: 40px 20px;
text-align: center;
color: var(--beep-text-secondary);
}
.beep-post {
display: flex;
gap: 12px;
padding: 12px 16px;
border-bottom: 1px solid var(--beep-border);
transition: background-color 0.15s ease;
}
.beep-post:hover { background: var(--beep-hover); }
.beep-post:last-child { border-bottom: 0; }
.beep-post-body {
flex: 1;
min-width: 0;
}
/* ---------- Meta line ---------- */
.beep-meta {
display: flex;
align-items: center;
gap: 4px;
font-size: 15px;
line-height: 1.2;
margin-bottom: 2px;
flex-wrap: wrap;
}
.beep-name {
font-weight: 700;
color: var(--beep-text);
}
.beep-handle,
.beep-dot,
.beep-time {
color: var(--beep-text-secondary);
font-weight: 400;
}
.beep-time { text-decoration: none; }
.beep-spacer { flex: 1; }
.beep-menu-trigger {
background: transparent;
border: 0;
color: var(--beep-text-secondary);
cursor: pointer;
font-size: 18px;
line-height: 1;
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
transition: background-color 0.15s ease, color 0.15s ease;
}
.beep-menu-trigger:hover {
background: rgba(244, 33, 46, 0.1);
color: #F4212E;
}
/* ---------- Text ---------- */
.beep-text {
font-size: 15px;
line-height: 1.4;
color: var(--beep-text);
word-wrap: break-word;
overflow-wrap: anywhere;
margin: 2px 0 12px;
}
.beep-tag,
.beep-mention,
.beep-link {
color: var(--beep-accent);
text-decoration: none;
}
.beep-tag:hover,
.beep-mention:hover,
.beep-link:hover {
text-decoration: underline;
}
.beep-mention-stale {
color: var(--beep-accent);
opacity: 0.85;
}
/* ---------- Action row ---------- */
.beep-actions {
display: flex;
justify-content: space-between;
max-width: 425px;
margin-top: 4px;
}
.beep-action {
display: flex;
align-items: center;
gap: 6px;
background: transparent;
border: 0;
color: var(--beep-text-secondary);
font-size: 13px;
font-family: inherit;
cursor: pointer;
padding: 6px 8px;
margin: -6px -8px;
border-radius: 9999px;
transition: color 0.15s ease, background-color 0.15s ease;
}
.beep-action svg {
width: 18px;
height: 18px;
fill: currentColor;
display: block;
}
.beep-action .beep-count {
font-variant-numeric: tabular-nums;
}
.beep-action-reply:hover { color: var(--beep-accent); background: rgba(29,155,240,0.10); }
.beep-action-like:hover { color: var(--beep-like); background: rgba(249, 24,128,0.10); }
.beep-action-share:hover { color: var(--beep-accent); background: rgba(29,155,240,0.10); }
/* Like state */
.beep-action-like .beep-icon-filled { display: none; }
.beep-action-like .beep-icon-outline { display: inline-flex; }
.beep-action-like.is-liked {
color: var(--beep-like);
}
.beep-action-like.is-liked .beep-icon-outline { display: none; }
.beep-action-like.is-liked .beep-icon-filled { display: inline-flex; }
/* Heart "pop" animation when newly liked */
.beep-action-like.beep-just-liked .beep-icon-filled {
animation: beep-heart-pop 0.55s ease;
}
@keyframes beep-heart-pop {
0% { transform: scale(0.5); }
35% { transform: scale(1.35); }
60% { transform: scale(0.85); }
100% { transform: scale(1); }
}
/* ---------- Reply form ---------- */
.beep-reply-form {
margin-top: 8px;
padding: 10px 0 4px;
border-top: 1px solid var(--beep-border);
}
.beep-reply-form .beep-input {
font-size: 16px;
}
.beep-reply-form[hidden] { display: none; }
.beep-pending {
padding: 12px;
background: var(--beep-hover);
color: var(--beep-text-secondary);
border-radius: 8px;
font-size: 14px;
text-align: center;
}
/* ---------- Replies ---------- */
.beep-replies {
margin-top: 8px;
padding-left: 24px;
border-left: 2px solid var(--beep-border);
}
.beep-reply {
display: flex;
gap: 10px;
padding: 10px 0;
border-bottom: 1px solid var(--beep-border);
}
.beep-reply:last-child { border-bottom: 0; }
.beep-reply-body {
flex: 1;
min-width: 0;
}
.beep-reply .beep-text {
font-size: 14px;
margin-bottom: 0;
}
/* ---------- New-post entry animation ---------- */
.beep-new {
animation: beep-slide-in 0.4s ease;
}
@keyframes beep-slide-in {
from { opacity: 0; transform: translateY(-6px); }
to { opacity: 1; transform: translateY(0); }
}
/* ---------- Mobile ---------- */
@media (max-width: 640px) {
.beep-feed {
margin: 0 auto;
border-radius: 0;
border-left: 0;
border-right: 0;
}
.beep-actions { max-width: none; }
}
/* ---------- Tip popover (for "Copied" etc) ---------- */
.beep-tip {
position: absolute;
margin-left: 8px;
padding: 2px 8px;
background: var(--beep-text);
color: #fff;
border-radius: 4px;
font-size: 12px;
white-space: nowrap;
animation: beep-tip-fade 1.5s ease forwards;
}
@keyframes beep-tip-fade {
0% { opacity: 0; }
20% { opacity: 1; }
80% { opacity: 1; }
100% { opacity: 0; }
}
/* ============================================================
v1.4 — sort tabs, nested replies, Twitter polish
============================================================ */
/* ---------- Sort tabs (Latest / Top) ---------- */
.beep-feed .beep-tabs {
display: flex;
border-bottom: 1px solid var(--beep-border);
background: var(--beep-bg);
}
.beep-feed .beep-tab {
flex: 1;
background: transparent;
border: 0;
padding: 14px 0;
font-family: inherit;
font-size: 15px;
font-weight: 700;
color: var(--beep-text-secondary);
cursor: pointer;
position: relative;
transition: background-color 0.15s ease, color 0.15s ease;
}
.beep-feed .beep-tab:hover {
background: var(--beep-hover);
color: var(--beep-text);
}
.beep-feed .beep-tab.is-active {
color: var(--beep-text);
}
.beep-feed .beep-tab.is-active::after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 56px;
height: 4px;
border-radius: 9999px;
background: var(--beep-accent);
}
/* ---------- Loading state on feed list ---------- */
.beep-feed .beep-list.beep-loading {
opacity: 0.5;
pointer-events: none;
transition: opacity 0.15s ease;
}
/* ---------- Action row variant for replies (smaller, no share) ---------- */
.beep-feed .beep-actions-reply {
max-width: 240px;
gap: 24px;
margin-top: 2px;
}
/* ---------- Nested replies: visual indent, capped at depth 2 ---------- */
.beep-feed .beep-replies-nested {
margin-top: 8px;
margin-left: 12px;
padding-left: 14px;
border-left: 2px solid var(--beep-border);
}
/* Anything deeper than depth 2 stops indenting more */
.beep-feed .beep-depth-2 .beep-replies-nested,
.beep-feed .beep-depth-3 .beep-replies-nested,
.beep-feed .beep-depth-4 .beep-replies-nested {
margin-left: 0;
padding-left: 8px;
}
/* ---------- Focus rings on text inputs ---------- */
.beep-feed .beep-input:focus,
.beep-feed .beep-input:focus-visible {
outline: 0 !important;
box-shadow: none !important;
}
.beep-feed .beep-compose:focus-within,
.beep-feed .beep-reply-form:focus-within {
background: linear-gradient(to bottom, transparent, rgba(29, 155, 240, 0.04));
transition: background-color 0.15s ease;
}
/* ---------- Buttons: refine to match Twitter's "Post" button ---------- */
.beep-feed .beep-post-button,
.beep-feed .beep-reply-submit {
font-size: 14px;
padding: 7px 18px;
font-weight: 700;
letter-spacing: -0.1px;
}
/* ---------- Tighter post hover ---------- */
.beep-feed .beep-post {
transition: background-color 0.15s ease;
}
/* ---------- Refine action icons size ---------- */
.beep-feed .beep-action {
padding: 4px 6px;
font-size: 13px;
}
.beep-feed .beep-action svg {
width: 17px;
height: 17px;
}
/* ---------- Reply rows: tighten spacing ---------- */
.beep-feed .beep-reply {
padding: 10px 0 8px;
}
/* Make sure reply meta + actions feel cohesive */
.beep-feed .beep-reply .beep-text {
margin-bottom: 4px;
}
/* ---------- Per-post Beep badge (top-right of each post/reply) ---------- */
.beep-feed .beep-post-badge {
width: 20px;
height: 20px;
flex-shrink: 0;
display: block;
opacity: 0.75;
margin-left: 4px;
transition: opacity 0.15s ease;
}
.beep-feed .beep-post-badge:hover {
opacity: 1;
}
.beep-feed .beep-post-badge-sm {
width: 16px;
height: 16px;
}
/* ---------- Delete row (bottom of post/reply, admin only) ---------- */
.beep-feed .beep-delete-row {
display: flex;
justify-content: flex-end;
margin-top: 6px;
}
.beep-feed .beep-delete-link {
background: transparent;
border: 0;
color: var(--beep-text-secondary);
font-family: inherit;
font-size: 22px;
line-height: 1;
font-weight: 400;
cursor: pointer;
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
transition: color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.beep-feed .beep-delete-link:hover {
color: #F4212E;
background: rgba(244, 33, 46, 0.10);
}
.beep-feed .beep-delete-link:active {
color: #F4212E;
background: rgba(244, 33, 46, 0.25);
transform: scale(0.92);
}
/* Override earlier 20/16 badge sizes with bigger 32/24 */
.beep-feed .beep-post-badge {
width: 32px;
height: 32px;
}
.beep-feed .beep-post-badge-sm {
width: 24px;
height: 24px;
}
/* ============================================================
v1.4.1 — theme-busting overrides
Many WordPress themes style ALL <button> elements as big
blue gradient blocks. Force our icon-only buttons back to
clean transparent icons that only show color on hover.
============================================================ */
.beep-feed button.beep-action,
.beep-feed button.beep-delete-link,
.beep-feed button.beep-menu-trigger,
.beep-feed button.beep-tab,
.beep-feed button[data-beep-toggle-reply],
.beep-feed button[data-beep-like-post],
.beep-feed button[data-beep-like-reply],
.beep-feed button[data-beep-share],
.beep-feed button[data-beep-delete],
.beep-feed button[data-beep-delete-reply] {
background: transparent !important;
background-image: none !important;
background-color: transparent !important;
border: 0 !important;
border-radius: 9999px !important;
box-shadow: none !important;
text-shadow: none !important;
text-transform: none !important;
letter-spacing: 0 !important;
min-height: 0 !important;
min-width: 0 !important;
height: auto !important;
width: auto !important;
line-height: 1 !important;
font-family: inherit !important;
color: var(--beep-text-secondary) !important;
}
/* Specific sizing for action buttons */
.beep-feed button.beep-action {
padding: 6px 8px !important;
font-size: 13px !important;
font-weight: 400 !important;
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
margin: 0 !important;
}
/* Hover/active recoloring */
.beep-feed button.beep-action-reply:hover {
color: var(--beep-accent) !important;
background: rgba(29, 155, 240, 0.10) !important;
}
.beep-feed button.beep-action-like:hover,
.beep-feed button.beep-action-like.is-liked {
color: var(--beep-like) !important;
}
.beep-feed button.beep-action-like:hover {
background: rgba(249, 24, 128, 0.10) !important;
}
.beep-feed button.beep-action-share:hover {
color: var(--beep-accent) !important;
background: rgba(29, 155, 240, 0.10) !important;
}
/* Delete × button: small round icon */
.beep-feed button.beep-delete-link {
width: 28px !important;
height: 28px !important;
padding: 0 !important;
font-size: 22px !important;
font-weight: 400 !important;
border-radius: 50% !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
margin: 0 !important;
}
.beep-feed button.beep-delete-link:hover {
color: #F4212E !important;
background: rgba(244, 33, 46, 0.10) !important;
}
.beep-feed button.beep-delete-link:active {
color: #F4212E !important;
background: rgba(244, 33, 46, 0.25) !important;
transform: scale(0.92);
}
/* Tab buttons */
.beep-feed button.beep-tab {
flex: 1 !important;
padding: 14px 0 !important;
font-size: 15px !important;
font-weight: 700 !important;
border-radius: 0 !important;
color: var(--beep-text-secondary) !important;
}
.beep-feed button.beep-tab.is-active {
color: var(--beep-text) !important;
}
.beep-feed button.beep-tab:hover {
background: var(--beep-hover) !important;
}
/* The Beep/Reply submit buttons keep their solid blue pill */
.beep-feed button.beep-button {
background: var(--beep-accent) !important;
background-image: none !important;
background-color: var(--beep-accent) !important;
color: #fff !important;
border: 0 !important;
border-radius: 9999px !important;
padding: 7px 18px !important;
font-weight: 700 !important;
font-size: 14px !important;
letter-spacing: -0.1px !important;
width: auto !important;
min-height: 0 !important;
height: auto !important;
box-shadow: none !important;
}
.beep-feed button.beep-button:hover {
background: var(--beep-accent-hover) !important;
}
.beep-feed button.beep-button:disabled {
opacity: 0.5 !important;
cursor: default !important;
}