Skip to content

Commit

Permalink
Fix animation styles (made blog bad)
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Dec 21, 2024
1 parent 89574e5 commit 1196f08
Showing 1 changed file with 128 additions and 44 deletions.
172 changes: 128 additions & 44 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -376,21 +376,113 @@ footer {
height: 80px;
margin-bottom: 1.5rem;
color: var(--accent);
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
transform: scale(1.25) translateY(-8px);
color: var(--accent-light);
filter: drop-shadow(0 8px 8px rgba(8, 108, 129, 0.2));
.post-content {
padding: 1rem;
flex: 1;
}

.feature-card h2 {
.featured .post-content {
padding: 1.5rem;
}

.post-content h3 {
font-size: 1.5rem;
margin: 0 0 0.5rem;
color: var(--text);
}

.post-content h4 {
font-size: 1rem;
margin: 0 0 0.25rem;
color: var(--text);
}

.post-date {
font-size: 0.85rem;
opacity: 0.7;
margin: 0;
}

.post-excerpt {
opacity: 0.8;
line-height: 1.4;
margin-top: 0.5rem;
}

.blog-posts-secondary {
display: grid;
gap: 0.75rem;
}

.featured {
grid-row: span 2;
}

@media (max-width: 768px) {
.blog-grid {
grid-template-columns: 1fr;
}

.featured {
grid-row: auto;
}

.blog-post {
flex-direction: column;
}

.post-image {
height: 150px;
min-width: 100%;
}
}

.blog-cta {
text-align: center;
margin-top: 3rem;
}

.blog-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
font-size: 1.1rem;
font-weight: 500;
color: var(--text);
background: transparent;
border: 1px solid var(--border);
border-radius: 8px;
text-decoration: none;
transition: all 0.3s ease;
}

.blog-button:hover {
background: var(--background);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border-color: var(--accent);
color: var(--accent);
}

.blog-button .arrow {
transition: transform 0.3s ease;
}

.feature-card:hover h2 {
transform: scale(1.05);
.blog-button:hover .arrow {
transform: translateX(4px);
}

.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
padding: 4rem 2rem;
max-width: 1200px;
margin: 0 auto;
}

.feature-card {
Expand All @@ -399,9 +491,9 @@ footer {
background: var(--background);
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
transform-style: preserve-3d;
z-index: 1;
}

.feature-card::before,
Expand All @@ -410,37 +502,44 @@ footer {
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(135deg, var(--accent-light), var(--accent));
border-radius: 12px;
background: var(--background);
top: 0;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: -1;
left: 0;
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
top: 0;
opacity: 0;
z-index: -1;
border: 1px solid var(--accent);
}

.feature-card::before {
transform: translateY(10px) scale(0.9) rotate(-2deg);
background: color-mix(in srgb, var(--accent) 5%, var(--background));
.feature-card:hover {
transform: translateY(-8px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-card::after {
transform: translateY(20px) scale(0.8) rotate(2deg);
background: color-mix(in srgb, var(--accent) 10%, var(--background));
.feature-card:hover::before {
opacity: 0.15;
transform: translateY(16px) scale(0.95) rotate(-2deg);
filter: brightness(1.2);
}

.feature-card:hover {
transform: translateY(-8px) scale(1.05);
.feature-card:hover::after {
opacity: 0.1;
transform: translateY(32px) scale(0.9) rotate(2deg);
filter: brightness(1.4);
}

.feature-card:hover::before {
opacity: 0.7;
transform: translateY(16px) scale(0.95) rotate(-4deg);
.feature-card h2 {
transition: transform 0.3s ease;
}

.feature-card:hover::after {
opacity: 0.5;
transform: translateY(32px) scale(0.9) rotate(4deg);
.feature-card:hover h2 {
transform: skew(-3deg) translateX(-2px);
}

.feature-card:hover .feature-icon {
transform: rotate(-10deg) scale(1.1);
color: var(--accent-light);
}

.feature-card h2 {
Expand All @@ -455,21 +554,6 @@ footer {
line-height: 1.6;
}

.features {
display: grid;
grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
gap: 2rem;
padding: 4rem 2rem;
max-width: 1200px;
margin: 0 auto;
}

@media (max-width: 992px) {
.features {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
}

.blog-section {
padding: 4rem 2rem;
background: var(--background);
Expand Down Expand Up @@ -579,4 +663,4 @@ footer {
opacity: 1;
transform: translateY(0);
}
}
}

0 comments on commit 1196f08

Please sign in to comment.