Part 1: Source code - Astro project structure and components
This commit is contained in:
205
src/styles/global.css
Normal file
205
src/styles/global.css
Normal file
@@ -0,0 +1,205 @@
|
||||
@import "tailwindcss";
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
@theme {
|
||||
/* Primary - Green */
|
||||
--color-primary-50: #ecfdf5;
|
||||
--color-primary-100: #d1fae5;
|
||||
--color-primary-200: #a7f3d0;
|
||||
--color-primary-300: #6ee7b7;
|
||||
--color-primary-400: #4ab87a;
|
||||
--color-primary-500: #3f8b6d;
|
||||
--color-primary-600: #2d6a4f;
|
||||
--color-primary-700: #1b4332;
|
||||
--color-primary-800: #081c15;
|
||||
--color-primary-900: #041a0f;
|
||||
|
||||
/* Accent - Orange */
|
||||
--color-accent-50: #fff7ed;
|
||||
--color-accent-100: #ffedd5;
|
||||
--color-accent-200: #fed7aa;
|
||||
--color-accent-300: #fdba74;
|
||||
--color-accent-400: #fb923c;
|
||||
--color-accent-500: #e35c1c;
|
||||
--color-accent-600: #c2410c;
|
||||
--color-accent-700: #9a3412;
|
||||
--color-accent-800: #7c2d12;
|
||||
--color-accent-900: #431407;
|
||||
|
||||
/* Neutrals */
|
||||
--color-neutral-50: #fafafa;
|
||||
--color-neutral-100: #f5f5f5;
|
||||
--color-neutral-200: #e5e5e5;
|
||||
--color-neutral-300: #d4d4d4;
|
||||
--color-neutral-400: #a3a3a3;
|
||||
--color-neutral-500: #737373;
|
||||
--color-neutral-600: #525252;
|
||||
--color-neutral-700: #404040;
|
||||
--color-neutral-800: #262626;
|
||||
--color-neutral-900: #171717;
|
||||
|
||||
/* Radius */
|
||||
--radius-sm: 0.25rem;
|
||||
--radius-md: 0.5rem;
|
||||
--radius-lg: 0.75rem;
|
||||
--radius-xl: 1rem;
|
||||
--radius-2xl: 1.5rem;
|
||||
--radius-full: 9999px;
|
||||
|
||||
/* Font */
|
||||
--font-sans: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply font-sans text-neutral-800 antialiased;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
@apply font-sans font-medium tracking-tight;
|
||||
}
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zoomIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes orb-drift {
|
||||
0%, 100% {
|
||||
transform: translate(0, 0) scale(1);
|
||||
opacity: 0.3;
|
||||
}
|
||||
33% {
|
||||
transform: translate(20px, -20px) scale(1.1);
|
||||
opacity: 0.4;
|
||||
}
|
||||
66% {
|
||||
transform: translate(-10px, 10px) scale(0.95);
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes orb-drift-2 {
|
||||
0%, 100% {
|
||||
transform: translate(0, 0) scale(1);
|
||||
opacity: 0.25;
|
||||
}
|
||||
33% {
|
||||
transform: translate(-25px, 15px) scale(1.05);
|
||||
opacity: 0.35;
|
||||
}
|
||||
66% {
|
||||
transform: translate(15px, -10px) scale(0.98);
|
||||
opacity: 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes orb-drift-3 {
|
||||
0%, 100% {
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
opacity: 0.15;
|
||||
}
|
||||
50% {
|
||||
transform: translate(-45%, -55%) scale(1.1);
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
|
||||
.animate-float {
|
||||
animation: float 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.animate-float-delayed-1 {
|
||||
animation: float 3s ease-in-out infinite;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
|
||||
.animate-float-delayed-2 {
|
||||
animation: float 3s ease-in-out infinite;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
|
||||
.animate-float-delayed-3 {
|
||||
animation: float 3s ease-in-out infinite;
|
||||
animation-delay: 1.5s;
|
||||
}
|
||||
|
||||
.animate-orb-1 {
|
||||
animation: orb-drift 8s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.animate-orb-2 {
|
||||
animation: orb-drift-2 10s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.animate-orb-3 {
|
||||
animation: orb-drift-3 12s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.animate-fade-in {
|
||||
animation: fadeIn 0.3s ease-out forwards;
|
||||
}
|
||||
|
||||
.animate-zoom-in {
|
||||
animation: zoomIn 0.3s ease-out forwards;
|
||||
}
|
||||
|
||||
/* Stagger animations for grids */
|
||||
.stagger-container > * {
|
||||
opacity: 0;
|
||||
animation: fadeIn 0.4s ease-out forwards;
|
||||
}
|
||||
|
||||
.stagger-container > *:nth-child(1) { animation-delay: 0ms; }
|
||||
.stagger-container > *:nth-child(2) { animation-delay: 50ms; }
|
||||
.stagger-container > *:nth-child(3) { animation-delay: 100ms; }
|
||||
.stagger-container > *:nth-child(4) { animation-delay: 150ms; }
|
||||
.stagger-container > *:nth-child(5) { animation-delay: 200ms; }
|
||||
.stagger-container > *:nth-child(6) { animation-delay: 250ms; }
|
||||
.stagger-container > *:nth-child(7) { animation-delay: 300ms; }
|
||||
.stagger-container > *:nth-child(8) { animation-delay: 350ms; }
|
||||
|
||||
/* Image hover zoom */
|
||||
.img-hover {
|
||||
@apply overflow-hidden;
|
||||
}
|
||||
|
||||
.img-hover img {
|
||||
@apply transition-transform duration-300 ease-out;
|
||||
}
|
||||
|
||||
.img-hover:hover img {
|
||||
@apply scale-105;
|
||||
}
|
||||
Reference in New Issue
Block a user