Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- Place the following CSS in your <head> or stylesheet --> <style> /* This is an optional body style to provide a background for the page */ body { background-color: #f3f4f6; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; } /* Container for the feed */ .activity-feed-container { background-color: #ffffff; max-width: 640px; margin: 2rem auto; /* Centers the list */ border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.06); } .activity-feed-list { list-style-type: none; margin: 0; padding: 0; } .activity-feed-list li:not(:last-child) { border-bottom: 1px solid #e5e7eb; } /* === User Activity Feed Card Styles === */ .uaf-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem; } .uaf-card-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; } .uaf-card-main { flex-grow: 1; } .uaf-card-text { font-size: 1rem; line-height: 1.5; margin: 0 0 0.25rem 0; color: #374151; } .uaf-card-text strong { font-weight: 600; color: #111827; } .uaf-card-text a { font-weight: 500; color: #4f46e5; text-decoration: none; } .uaf-card-text a:hover { text-decoration: underline; } .uaf-card-time { font-size: 0.875rem; color: #6b7280; } .uaf-card-context { flex-shrink: 0; } .uaf-card-context-thumbnail { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; } </style> <!-- Place the following HTML in your <body> --> <div class="activity-feed-container"> <ul class="activity-feed-list"> <li> <!-- Activity: Following a user --> <article class="uaf-card"> <img src="https://placehold.co/80x80/6366f1/ffffff/png?text=L" alt="Avatar of Lena" class="uaf-card-avatar"> <div class="uaf-card-main"> <p class="uaf-card-text"><strong>Lena Ray</strong> started following <strong>Nora Ives</strong>.</p> <time class="uaf-card-time" datetime="2023-10-27T14:15:00">15 minutes ago</time> </div> </article> </li> <li> <!-- Activity: Uploaded photos --> <article class="uaf-card"> <img src="https://placehold.co/80x80/f59e0b/ffffff/png?text=F" alt="Avatar of Felix" class="uaf-card-avatar"> <div class="uaf-card-main"> <p class="uaf-card-text"><strong>Felix Quinn</strong> uploaded a new photo to the <a href="#">"Urban Exploration"</a> gallery.</p> <time class="uaf-card-time" datetime="2023-10-27T13:45:00">45 minutes ago</time> </div> <div class="uaf-card-context"> <a href="#"> <!-- Image by picsum.photos. Replace with your own. --> <img src="https://picsum.photos/id/111/112/112" alt="Thumbnail of uploaded city photo" class="uaf-card-context-thumbnail"> </a> </div> </article> </li> <li> <!-- Activity: Commented on a post --> <article class="uaf-card"> <img src="https://placehold.co/80x80/1d4ed8/ffffff/png?text=N" alt="Avatar of Nora" class="uaf-card-avatar"> <div class="uaf-card-main"> <p class="uaf-card-text"><strong>Nora Ives</strong> commented on your post: <a href="#">"Designing for Accessibility: A Practical Guide"</a></p> <time class="uaf-card-time" datetime="2023-10-27T12:05:00">2 hours ago</time> </div> </article> </li> </ul> </div>