mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo-client.git
synced 2026-09-21 16:52:02 -07:00
Merge pull request #2 from Permissionless-Software-Foundation/unstable
Update social feed and navbar styling
This commit is contained in:
+941
-155
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,11 @@ function RecentPosts () {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const memoDb = new MemoDb()
|
const memoDb = new MemoDb()
|
||||||
const data = await memoDb.getRecentPosts({ limit: PAGE_SIZE, offset })
|
const data = await memoDb.getRecentPosts({
|
||||||
|
limit: PAGE_SIZE,
|
||||||
|
offset
|
||||||
|
})
|
||||||
|
|
||||||
const loadedPosts = data.posts || []
|
const loadedPosts = data.posts || []
|
||||||
const addrs = collectPostAddrs(loadedPosts)
|
const addrs = collectPostAddrs(loadedPosts)
|
||||||
const profileMap = await loadThreadProfiles(addrs, memoDb)
|
const profileMap = await loadThreadProfiles(addrs, memoDb)
|
||||||
@@ -80,31 +84,47 @@ function RecentPosts () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container className='recent-posts-page'>
|
||||||
<Row>
|
<Row className='justify-content-center'>
|
||||||
<Col>
|
<Col lg={8} md={10} xs={12}>
|
||||||
<h1 className='mt-4'>Recent Posts</h1>
|
<header className='recent-posts-heading'>
|
||||||
{pagination && posts.length > 0 && (
|
<h1>BCH Memo Posts</h1>
|
||||||
<p className='text-muted'>
|
<p>
|
||||||
Showing {pagination.offset + 1}–{pagination.offset + posts.length} of {pagination.total} posts
|
Recent messages published through the Memo protocol on Bitcoin Cash.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{pagination && posts.length > 0 && (
|
||||||
|
<span className='recent-posts-count'>
|
||||||
|
Showing {pagination.offset + 1}–
|
||||||
|
{pagination.offset + posts.length} of {pagination.total}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{pagination && posts.length === 0 && (
|
||||||
|
<span className='recent-posts-count'>
|
||||||
|
No posts on this page.
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{error && (
|
||||||
|
<p className='recent-posts-error'>
|
||||||
|
{error}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
{pagination && posts.length === 0 && (
|
|
||||||
<p className='text-muted'>No posts on this page.</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{error && <p className='text-danger'>{error}</p>}
|
|
||||||
|
|
||||||
{loading && (
|
{loading && (
|
||||||
<div className='text-center my-5'>
|
<div className='text-center my-5'>
|
||||||
<Spinner animation='border' role='status' variant='primary'>
|
<Spinner animation='border' role='status'>
|
||||||
<span className='visually-hidden'>Loading...</span>
|
<span className='visually-hidden'>
|
||||||
|
Loading...
|
||||||
|
</span>
|
||||||
</Spinner>
|
</Spinner>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!loading && !error && posts.length > 0 && (
|
{!loading && !error && posts.length > 0 && (
|
||||||
<div className='posts-feed mt-3'>
|
<div className='posts-feed'>
|
||||||
{posts.map((post) => (
|
{posts.map((post) => (
|
||||||
<PostFeedItem
|
<PostFeedItem
|
||||||
key={post.txid}
|
key={post.txid}
|
||||||
@@ -118,16 +138,17 @@ function RecentPosts () {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{!loading && !error && (pagination || offset > 0) && (
|
{!loading && !error && (pagination || offset > 0) && (
|
||||||
<div className='d-flex justify-content-between mt-3 mb-4'>
|
<div className='recent-posts-pagination'>
|
||||||
<Button
|
<Button
|
||||||
variant='outline-primary'
|
variant='outline-dark'
|
||||||
onClick={handlePrevious}
|
onClick={handlePrevious}
|
||||||
disabled={!canGoBack}
|
disabled={!canGoBack}
|
||||||
>
|
>
|
||||||
Previous
|
Previous
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant='outline-primary'
|
variant='outline-dark'
|
||||||
onClick={handleNext}
|
onClick={handleNext}
|
||||||
disabled={!canGoNext}
|
disabled={!canGoNext}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Single post row for feed and thread views.
|
Instagram-style post card for feed and thread views.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
@@ -30,32 +30,92 @@ function PostFeedItem ({
|
|||||||
if (!post) return null
|
if (!post) return null
|
||||||
|
|
||||||
const displayName = getDisplayName(post.addr, profiles)
|
const displayName = getDisplayName(post.addr, profiles)
|
||||||
const hasCustomName = Boolean(profile.name ?? profiles?.[post.addr]?.name)
|
|
||||||
|
const hasCustomName = Boolean(
|
||||||
|
profile.name ?? profiles?.[post.addr]?.name
|
||||||
|
)
|
||||||
|
|
||||||
|
const profilePicUrl =
|
||||||
|
profile.profilePicUrl ??
|
||||||
|
profiles?.[post.addr]?.profilePicUrl
|
||||||
|
|
||||||
const Wrapper = embedded ? 'div' : 'article'
|
const Wrapper = embedded ? 'div' : 'article'
|
||||||
|
|
||||||
|
const copyTxid = () => {
|
||||||
|
if (!post.txid) return
|
||||||
|
appUtil.copyToClipboard(post.txid)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper className={`posts-feed-item${embedded ? ' posts-feed-item-embedded' : ''}`}>
|
<Wrapper
|
||||||
<div className='posts-feed-item-header'>
|
className={[
|
||||||
<PostThreadAvatar
|
'posts-feed-item',
|
||||||
addr={post.addr}
|
embedded ? 'posts-feed-item-embedded' : ''
|
||||||
profilePicUrl={profile.profilePicUrl ?? profiles?.[post.addr]?.profilePicUrl}
|
].filter(Boolean).join(' ')}
|
||||||
/>
|
>
|
||||||
|
<header className='posts-feed-item-header'>
|
||||||
|
<Link
|
||||||
|
to={`/profile/${encodeURIComponent(post.addr)}`}
|
||||||
|
className='posts-feed-item-avatar-link'
|
||||||
|
aria-label={`View ${displayName}'s profile`}
|
||||||
|
>
|
||||||
|
<PostThreadAvatar
|
||||||
|
addr={post.addr}
|
||||||
|
profilePicUrl={profilePicUrl}
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<div className='posts-feed-item-meta'>
|
<div className='posts-feed-item-meta'>
|
||||||
|
<div className='posts-feed-item-author-row'>
|
||||||
|
<Link
|
||||||
|
to={`/profile/${encodeURIComponent(post.addr)}`}
|
||||||
|
className={[
|
||||||
|
'posts-feed-item-author',
|
||||||
|
hasCustomName
|
||||||
|
? ''
|
||||||
|
: 'posts-feed-item-author-address'
|
||||||
|
].filter(Boolean).join(' ')}
|
||||||
|
title={post.addr}
|
||||||
|
>
|
||||||
|
{displayName}
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{showRepliedLabel && (
|
||||||
|
<span className='posts-feed-item-replied'>
|
||||||
|
replied
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span className='posts-feed-item-seen'>
|
||||||
|
{formatRelativeSeen(post.seen)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type='button'
|
||||||
|
className='posts-feed-item-menu'
|
||||||
|
aria-label='Post options'
|
||||||
|
title='Post options'
|
||||||
|
>
|
||||||
|
<span aria-hidden='true'>•••</span>
|
||||||
|
</button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div className='posts-feed-item-content'>
|
||||||
|
<p className='posts-feed-item-text'>
|
||||||
<Link
|
<Link
|
||||||
to={`/profile/${encodeURIComponent(post.addr)}`}
|
to={`/profile/${encodeURIComponent(post.addr)}`}
|
||||||
className={`posts-feed-item-author${hasCustomName ? '' : ' posts-feed-item-author-address'}`}
|
className='posts-feed-item-inline-author'
|
||||||
title={post.addr}
|
|
||||||
>
|
>
|
||||||
{displayName}
|
{displayName}
|
||||||
</Link>
|
</Link>
|
||||||
{showRepliedLabel && (
|
|
||||||
<span className='posts-feed-item-replied'>replied</span>
|
|
||||||
)}
|
|
||||||
<span className='posts-feed-item-seen'>{formatRelativeSeen(post.seen)}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='posts-feed-item-text'>{post.text}</div>
|
{' '}
|
||||||
|
|
||||||
|
{post.text}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{showReplyCount && (
|
{showReplyCount && (
|
||||||
<div className='posts-feed-item-actions'>
|
<div className='posts-feed-item-actions'>
|
||||||
@@ -67,28 +127,28 @@ function PostFeedItem ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{showFooterMeta && (
|
{showFooterMeta && (
|
||||||
<div className='posts-feed-item-footer'>
|
<footer className='posts-feed-item-footer'>
|
||||||
<span>Block {post.blockHeight}</span>
|
<span>Block {post.blockHeight}</span>
|
||||||
<span className='posts-feed-item-footer-separator'>·</span>
|
|
||||||
<span
|
<span
|
||||||
|
className='posts-feed-item-footer-separator'
|
||||||
|
aria-hidden='true'
|
||||||
|
>
|
||||||
|
·
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type='button'
|
||||||
className='posts-feed-item-txid'
|
className='posts-feed-item-txid'
|
||||||
title={post.txid}
|
title={post.txid}
|
||||||
onClick={() => appUtil.copyToClipboard(post.txid)}
|
onClick={copyTxid}
|
||||||
role='button'
|
|
||||||
tabIndex={0}
|
|
||||||
onKeyDown={(event) => {
|
|
||||||
if (event.key === 'Enter' || event.key === ' ') {
|
|
||||||
event.preventDefault()
|
|
||||||
appUtil.copyToClipboard(post.txid)
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{truncateTxid(post.txid, 20)}
|
{truncateTxid(post.txid, 20)}
|
||||||
</span>
|
</button>
|
||||||
</div>
|
</footer>
|
||||||
)}
|
)}
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default PostFeedItem
|
export default PostFeedItem
|
||||||
@@ -1,109 +1,605 @@
|
|||||||
.posts-feed {
|
|
||||||
max-width: 720px;
|
/*
|
||||||
background: #f5f5f5;
|
Instagram-inspired post feed
|
||||||
border: 1px solid #e8e8e8;
|
*/
|
||||||
border-radius: 4px;
|
|
||||||
|
:root {
|
||||||
|
--ig-background: #fafafa;
|
||||||
|
--ig-surface: #ffffff;
|
||||||
|
--ig-border: #dbdbdb;
|
||||||
|
--ig-border-soft: #efefef;
|
||||||
|
|
||||||
|
--ig-text: #262626;
|
||||||
|
--ig-text-secondary: #737373;
|
||||||
|
--ig-text-muted: #a8a8a8;
|
||||||
|
|
||||||
|
--ig-link: #00376b;
|
||||||
|
--ig-blue: #0095f6;
|
||||||
|
--ig-blue-hover: #1877f2;
|
||||||
|
|
||||||
|
--ig-danger: #ed4956;
|
||||||
|
|
||||||
|
--ig-radius: 8px;
|
||||||
|
--ig-feed-width: 630px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Feed wrapper */
|
||||||
|
|
||||||
|
.posts-feed,
|
||||||
|
.posts-feed-list,
|
||||||
|
.posts-feed-container {
|
||||||
|
width: min(100%, var(--ig-feed-width));
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 24px 12px 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Main post card */
|
||||||
|
|
||||||
|
.posts-feed-item {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 0 20px;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
color: var(--ig-text);
|
||||||
|
background: var(--ig-surface);
|
||||||
|
|
||||||
|
border: 1px solid var(--ig-border);
|
||||||
|
border-radius: var(--ig-radius);
|
||||||
|
|
||||||
|
box-shadow: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item {
|
/* Remove the previous green accent */
|
||||||
background: #fff;
|
.posts-feed-item::before {
|
||||||
padding: 0.85rem 1rem;
|
display: none;
|
||||||
border-bottom: 1px solid #e8e8e8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item:last-child {
|
/* No floating card animation */
|
||||||
border-bottom: none;
|
.posts-feed-item:hover {
|
||||||
|
transform: none;
|
||||||
|
border-color: var(--ig-border);
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item-embedded {
|
/* Post header */
|
||||||
background: transparent;
|
|
||||||
padding: 0;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-bottom: 0.75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.posts-feed-item-embedded:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.posts-feed-item-header {
|
.posts-feed-item-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 12px;
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
|
min-height: 60px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 12px 16px;
|
||||||
|
|
||||||
|
border-bottom: 1px solid var(--ig-border-soft);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Metadata */
|
||||||
|
|
||||||
.posts-feed-item-meta {
|
.posts-feed-item-meta {
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: 0.35rem;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: #6c757d;
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 4px 7px;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Author name */
|
||||||
|
|
||||||
.posts-feed-item-author {
|
.posts-feed-item-author {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
|
color: var(--ig-text);
|
||||||
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #212529;
|
line-height: 18px;
|
||||||
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
transition: opacity 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item-author:hover {
|
.posts-feed-item-author:hover {
|
||||||
text-decoration: underline;
|
color: var(--ig-text);
|
||||||
color: #28a745;
|
text-decoration: none;
|
||||||
|
opacity: 0.65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Address-based usernames */
|
||||||
|
|
||||||
.posts-feed-item-author-address {
|
.posts-feed-item-author-address {
|
||||||
font-family: monospace;
|
max-width: 300px;
|
||||||
font-size: 0.8rem;
|
|
||||||
font-weight: 500;
|
color: var(--ig-text);
|
||||||
|
font-family:
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
sans-serif;
|
||||||
|
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Replied badge */
|
||||||
|
|
||||||
.posts-feed-item-replied {
|
.posts-feed-item-replied {
|
||||||
font-style: italic;
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
color: var(--ig-text-secondary);
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Timestamp */
|
||||||
|
|
||||||
.posts-feed-item-seen {
|
.posts-feed-item-seen {
|
||||||
white-space: nowrap;
|
color: var(--ig-text-secondary);
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-seen::before {
|
||||||
|
content: "•";
|
||||||
|
margin-right: 7px;
|
||||||
|
color: var(--ig-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Post body */
|
||||||
|
|
||||||
.posts-feed-item-text {
|
.posts-feed-item-text {
|
||||||
|
margin: 0;
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
color: var(--ig-text);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
font-size: 0.95rem;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Links inside posts */
|
||||||
|
|
||||||
|
.posts-feed-item-text a {
|
||||||
|
color: var(--ig-link);
|
||||||
|
font-weight: 500;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-text a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
|
||||||
.posts-feed-item-actions {
|
.posts-feed-item-actions {
|
||||||
margin-top: 0.25rem;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
min-height: 46px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px 16px;
|
||||||
|
|
||||||
|
border-top: 1px solid var(--ig-border-soft);
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item-actions .post-reply-count {
|
/* Reply-count buttons and links */
|
||||||
margin-top: 0.35rem;
|
|
||||||
|
.posts-feed-item-actions button,
|
||||||
|
.posts-feed-item-actions a,
|
||||||
|
.posts-feed-item-actions [role="button"] {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 6px;
|
||||||
|
|
||||||
|
min-height: 32px;
|
||||||
|
padding: 4px 0;
|
||||||
|
|
||||||
|
color: var(--ig-text);
|
||||||
|
background: transparent;
|
||||||
|
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 18px;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
transition:
|
||||||
|
opacity 0.15s ease,
|
||||||
|
color 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-actions button:hover,
|
||||||
|
.posts-feed-item-actions a:hover,
|
||||||
|
.posts-feed-item-actions [role="button"]:hover {
|
||||||
|
color: var(--ig-text);
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
|
||||||
|
box-shadow: none;
|
||||||
|
transform: none;
|
||||||
|
opacity: 0.55;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer metadata */
|
||||||
|
|
||||||
.posts-feed-item-footer {
|
.posts-feed-item-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.35rem;
|
flex-wrap: wrap;
|
||||||
margin-top: 0.5rem;
|
gap: 4px;
|
||||||
font-size: 0.75rem;
|
|
||||||
color: #adb5bd;
|
margin: 0;
|
||||||
|
padding: 0 16px 14px;
|
||||||
|
|
||||||
|
color: var(--ig-text-secondary);
|
||||||
|
|
||||||
|
border-top: 0;
|
||||||
|
|
||||||
|
font-family:
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
sans-serif;
|
||||||
|
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 16px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item-footer-separator {
|
.posts-feed-item-footer-separator {
|
||||||
color: #ced4da;
|
color: var(--ig-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Transaction ID */
|
||||||
|
|
||||||
|
.posts-feed-item-txid {
|
||||||
|
color: var(--ig-text-secondary);
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
border: 0;
|
||||||
|
text-transform: none;
|
||||||
|
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-txid:hover {
|
||||||
|
color: var(--ig-text);
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-txid:focus-visible {
|
||||||
|
outline: 2px solid var(--ig-blue);
|
||||||
|
outline-offset: 3px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Embedded replies */
|
||||||
|
|
||||||
|
.posts-feed-item-embedded {
|
||||||
|
margin: 12px 0 0 44px;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
background: var(--ig-surface);
|
||||||
|
border: 1px solid var(--ig-border-soft);
|
||||||
|
border-radius: var(--ig-radius);
|
||||||
|
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-embedded .posts-feed-item-header {
|
||||||
|
min-height: 52px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-embedded .posts-feed-item-text {
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-embedded .posts-feed-item-actions {
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-embedded .posts-feed-item-footer {
|
||||||
|
padding: 0 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Alternate posts should remain consistent */
|
||||||
|
.posts-feed-item:nth-child(even) {
|
||||||
|
background: var(--ig-surface);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Common avatar overrides */
|
||||||
|
|
||||||
|
.posts-feed-item-header img,
|
||||||
|
.posts-feed-item-header .avatar,
|
||||||
|
.posts-feed-item-header [class*="avatar"] {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
flex: 0 0 36px;
|
||||||
|
|
||||||
|
object-fit: cover;
|
||||||
|
|
||||||
|
background: #efefef;
|
||||||
|
border: 1px solid var(--ig-border);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Optional Instagram-style profile ring */
|
||||||
|
|
||||||
|
.posts-feed-item-header img,
|
||||||
|
.posts-feed-item-header [class*="avatar"] img {
|
||||||
|
padding: 2px;
|
||||||
|
background:
|
||||||
|
linear-gradient(#ffffff, #ffffff) padding-box,
|
||||||
|
linear-gradient(
|
||||||
|
135deg,
|
||||||
|
#f9ce34,
|
||||||
|
#ee2a7b,
|
||||||
|
#6228d7
|
||||||
|
) border-box;
|
||||||
|
|
||||||
|
border: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile */
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.posts-feed,
|
||||||
|
.posts-feed-list,
|
||||||
|
.posts-feed-container {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-header {
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-text {
|
||||||
|
padding: 14px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-actions {
|
||||||
|
padding: 7px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-footer {
|
||||||
|
padding: 0 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-author-address {
|
||||||
|
max-width: 190px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-embedded {
|
||||||
|
margin-left: 24px;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
|
border-left: 1px solid var(--ig-border-soft);
|
||||||
|
border-right: 1px solid var(--ig-border-soft);
|
||||||
|
border-radius: var(--ig-radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Accessibility */
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.posts-feed-item-author,
|
||||||
|
.posts-feed-item-actions button,
|
||||||
|
.posts-feed-item-actions a,
|
||||||
|
.posts-feed-item-actions [role="button"],
|
||||||
|
.posts-feed-item-txid {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-avatar-link {
|
||||||
|
display: inline-flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
border-radius: 50%;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-meta {
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-author-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-menu {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
color: #262626;
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
font-size: 15px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-menu:hover {
|
||||||
|
color: #737373;
|
||||||
|
background: #f2f2f2;
|
||||||
|
border: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-content {
|
||||||
|
padding: 14px 16px 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-text {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
color: #262626;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-inline-author {
|
||||||
|
color: #262626;
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.posts-feed-item-inline-author:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item-txid {
|
.posts-feed-item-txid {
|
||||||
font-family: monospace;
|
padding: 0;
|
||||||
|
color: #737373;
|
||||||
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
|
font-size: inherit;
|
||||||
|
font-weight: inherit;
|
||||||
|
text-transform: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts-feed-item-txid:hover {
|
.posts-feed-item-txid:hover {
|
||||||
color: #6c757d;
|
color: #262626;
|
||||||
text-decoration: underline;
|
background: transparent;
|
||||||
|
border: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.recent-posts-page {
|
||||||
|
padding-top: 2.5rem;
|
||||||
|
padding-bottom: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-heading {
|
||||||
|
margin-bottom: 1.75rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-heading h1 {
|
||||||
|
margin: 0;
|
||||||
|
color: #262626;
|
||||||
|
font-size: clamp(2rem, 5vw, 2.8rem);
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.04em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-heading p {
|
||||||
|
max-width: 560px;
|
||||||
|
margin: 0.6rem auto 0;
|
||||||
|
color: #737373;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-count {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 0.85rem;
|
||||||
|
color: #8e8e8e;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-error {
|
||||||
|
padding: 0.85rem 1rem;
|
||||||
|
color: #c62828;
|
||||||
|
background: #fff1f1;
|
||||||
|
border: 1px solid #ffd2d2;
|
||||||
|
border-radius: 8px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-pagination .btn {
|
||||||
|
min-width: 110px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.recent-posts-page {
|
||||||
|
padding-top: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-heading {
|
||||||
|
padding: 0 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-heading h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-heading p {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recent-posts-pagination {
|
||||||
|
padding: 0 0.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user