refactor: Update user profile routing from @[handle] to [handle], add an explore page, and introduce a user API route.

This commit is contained in:
Christopher
2026-01-22 04:03:09 -08:00
parent 72a3562b50
commit 76bc648028
6 changed files with 586 additions and 7 deletions
+181
View File
@@ -1128,3 +1128,184 @@ a.btn-primary:visited {
padding-bottom: 80px;
}
}
/* Explore Page */
.explore-page {
max-width: 700px;
margin: 0 auto;
min-height: 100vh;
}
.explore-header {
padding: 20px 16px;
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
background: var(--background);
z-index: 10;
backdrop-filter: blur(12px);
}
.explore-header h1 {
font-size: 22px;
font-weight: 600;
margin-bottom: 16px;
}
.explore-search {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: var(--background-secondary);
border: 1px solid var(--border);
border-radius: var(--radius-full);
transition: border-color 0.15s ease;
}
.explore-search:focus-within {
border-color: var(--accent);
}
.explore-search input {
flex: 1;
background: transparent;
border: none;
color: var(--foreground);
font-size: 15px;
}
.explore-search input:focus {
outline: none;
}
.explore-search input::placeholder {
color: var(--foreground-tertiary);
}
.explore-tabs {
display: flex;
border-bottom: 1px solid var(--border);
}
.explore-tab {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px 16px;
background: none;
border: none;
border-bottom: 2px solid transparent;
color: var(--foreground-tertiary);
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease;
}
.explore-tab:hover {
color: var(--foreground-secondary);
}
.explore-tab.active {
color: var(--foreground);
border-bottom-color: var(--accent);
}
.explore-content {
min-height: 300px;
}
.explore-loading,
.explore-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 48px 24px;
color: var(--foreground-tertiary);
text-align: center;
}
.explore-empty svg {
width: 48px;
height: 48px;
opacity: 0.5;
}
.explore-posts,
.explore-users {
display: flex;
flex-direction: column;
}
.search-section {
padding: 16px;
border-bottom: 1px solid var(--border);
}
.search-section h2 {
font-size: 14px;
font-weight: 600;
color: var(--foreground-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 12px;
}
.search-section .explore-posts,
.search-section .explore-users {
background: var(--background-secondary);
border-radius: var(--radius-md);
border: 1px solid var(--border);
overflow: hidden;
}
/* User Card */
.user-card {
display: flex;
align-items: center;
gap: 12px;
padding: 16px;
border-bottom: 1px solid var(--border);
color: var(--foreground);
transition: background 0.15s ease;
}
.user-card:hover {
background: var(--background-secondary);
}
.user-card:last-child {
border-bottom: none;
}
.user-card-info {
min-width: 0;
flex: 1;
}
.user-card-name {
font-weight: 600;
margin-bottom: 2px;
}
.user-card-handle {
font-size: 13px;
color: var(--foreground-tertiary);
}
.user-card-bio {
font-size: 13px;
color: var(--foreground-secondary);
margin-top: 6px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}