This repository has been archived on 2026-08-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
onlypets/frontend/app/globals.css
T
admin 6ebbd5d457 feat(ui): global redesign, unified layout and personalized feed
- introduce global design system via CSS variables
- modern green-based color palette with improved readability
- unify Feed, Explore and Profile visual language
- add discovery posts visual highlight via border (no text shift)
- improve card depth, shadows and container consistency
- stabilize personalized feed logic (subscriptions + discovery)
- prepare UI for future theming without TSX changes
2025-12-24 15:52:34 +01:00

283 lines
5.3 KiB
CSS

@import "tailwindcss";
* {
box-sizing: border-box;
}
:root {
/* ===== COLORS ===== */
--color-primary: #2e7d32;
--color-primary-soft: #e6efe9;
--color-bg: #f6faf7;
--color-surface: #ffffff;
--color-text-main: #1f2d24;
--color-text-secondary: #5f6f66;
--color-text-muted: #8a9b92;
--color-border: rgba(0, 0, 0, 0.06);
/* ===== SHADOWS ===== */
--shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
--shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
/* ===== RADIUS ===== */
--radius-sm: 10px;
--radius-md: 14px;
--radius-lg: 18px;
/* ===== SPACING ===== */
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
}
html, body {
background: var(--color-bg);
color: var(--color-text-main);
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}
/* Navigation */
.navbar {
display: flex;
align-items: center;
gap: 1.5rem;
}
.navbar a {
color: white;
text-decoration: none;
padding: 0.3rem 0.6rem;
border-radius: 6px;
transition: background-color 0.2s ease;
}
.navbar a:hover {
background-color: rgba(255, 255, 255, 0.2);
}
.navbar a.active {
background-color: rgba(255, 255, 255, 0.35);
}
/* Hide horizontal scrollbar but keep scroll */
.hide-scrollbar {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE / Edge */
}
.hide-scrollbar::-webkit-scrollbar {
display: none; /* Chrome / Safari */
}
@keyframes skeleton {
0% { background-position: 100% 0; }
100% { background-position: 0 0; }
}
@keyframes heart-pop {
0% {
transform: scale(1);
}
40% {
transform: scale(1.25);
}
70% {
transform: scale(0.95);
}
100% {
transform: scale(1);
}
}
@keyframes comment-wiggle {
0% {
transform: translateX(0);
}
30% {
transform: translateX(-2px);
}
60% {
transform: translateX(2px);
}
100% {
transform: translateX(0);
}
}
@keyframes slideUp {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
.postcard {
background: var(--color-surface);
border-radius: var(--radius-lg);
border: 1px solid var(--color-border);
box-shadow: var(--shadow-sm);
padding: var(--space-md);
display: flex;
flex-direction: column;
gap: var(--space-sm);
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.postcard:hover {
box-shadow: var(--shadow-md);
transform: translateY(-1px);
}
.postcard {
background: var(--color-surface);
border-radius: var(--radius-lg);
border: 1px solid var(--color-border);
box-shadow: var(--shadow-sm);
padding: var(--space-md);
display: flex;
flex-direction: column;
gap: var(--space-sm);
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.postcard:hover {
box-shadow: var(--shadow-md);
transform: translateY(-1px);
}
.postcard-content {
font-size: 0.95rem;
color: var(--color-text-secondary);
}
.postcard-actions {
display: flex;
gap: var(--space-md);
align-items: center;
font-size: 0.85rem;
color: var(--color-text-muted);
}
.postcard-action {
display: flex;
align-items: center;
gap: 0.3rem;
cursor: pointer;
user-select: none;
}
.postcard-action:hover {
color: var(--color-text-main);
}
.postcard--discovery {
border: 1px solid var(--color-primary);
box-shadow:
0 0 0 1px rgba(46, 125, 50, 0.15),
var(--shadow-sm);
}
.feed-header,
.explore-header {
padding: var(--space-lg) var(--space-md) var(--space-md);
}
.feed-header p,
.explore-header p {
color: var(--color-text-secondary);
margin: 0.25rem 0 0;
}
.post-list {
display: flex;
flex-direction: column;
gap: var(--space-md);
padding: 0 var(--space-md) var(--space-xl);
}
.fresh-scroll,
.trending-scroll {
display: flex;
gap: var(--space-sm);
overflow-x: auto;
padding: var(--space-sm) var(--space-md);
}
.hide-scrollbar {
scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
.fresh-item,
.trending-item {
background: var(--color-surface);
border-radius: var(--radius-md);
padding: var(--space-sm);
min-width: 80px;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.3rem;
box-shadow: var(--shadow-sm);
border: 1px solid var(--color-border);
}
.profile-header {
display: flex;
gap: var(--space-lg);
padding: var(--space-lg);
background: var(--color-surface);
border-radius: var(--radius-lg);
border: 1px solid var(--color-border);
box-shadow: var(--shadow-sm);
margin: var(--space-md);
}
.profile-stats {
display: flex;
gap: var(--space-lg);
margin-top: var(--space-sm);
}
.profile-stats div {
text-align: center;
}
.profile-stats strong {
font-size: 1.1rem;
}
.profile-stats span {
font-size: 0.8rem;
color: var(--color-text-muted);
}
.post-preview-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.35);
display: flex;
justify-content: center;
align-items: flex-end;
z-index: 50;
}
.post-preview-modal {
background: var(--color-surface);
width: 100%;
max-width: 600px;
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
padding: var(--space-lg);
box-shadow: var(--shadow-lg);
}