Skip to content

Commit bec7157

Browse files
Add 'power-up' animation for discovery documentation
1 parent c3b0606 commit bec7157

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

resources/views/livewire/discover-documentation.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class="text-[{{ $selectedFramework->color() }}]">{{ $secondsUntilAvailable }}</s
6060
DISCOVERED DOCUMENTATION
6161
</h2>
6262

63-
<div
64-
class="transition-all duration-300 border-4 border-[{{ $selectedFramework->color() }}] bg-[#16213e] p-7 mb-9 flex flex-col items-center justify-center [clip-path:polygon(0_10px,10px_0,calc(100%_-_10px)_0,100%_10px,100%_calc(100%_-_10px),calc(100%_-_10px)_100%,10px_100%,0_calc(100%_-_10px))]">
63+
<div class="transition-all duration-300 border-4 border-[{{ $selectedFramework->color() }}] bg-[#16213e] p-7 mb-9 flex flex-col items-center justify-center [clip-path:polygon(0_10px,10px_0,calc(100%_-_10px)_0,100%_10px,100%_calc(100%_-_10px),calc(100%_-_10px)_100%,10px_100%,0_calc(100%_-_10px))] animate-power-up"
64+
wire:key="discovery-{{ $link?->id }}">
6565
<div class="p-4 w-full flex flex-col items-center relative">
6666
<div class="absolute top-0 right-0 flex items-center">
6767
<x-heroicon-s-eye class="h-4 w-4 text-muted" />

tailwind.config.cjs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,38 @@ module.exports = {
1010
'border-[#ff2d20]', 'text-[#ff2d20]', 'bg-[#ff2d20]', 'from-[#ff2d20]', 'to-[#ff2d20]', 'hover:bg-[#ff2d20]', 'hover:text-[#ff2d20]',
1111
'border-[#f47316]', 'text-[#f47316]', 'bg-[#f47316]', 'from-[#f47316]', 'to-[#f47316]', 'hover:bg-[#f47316]', 'hover:text-[#f47316]',
1212
'border-[#fb70a9]', 'text-[#fb70a9]', 'bg-[#fb70a9]', 'from-[#fb70a9]', 'to-[#fb70a9]', 'hover:bg-[#fb70a9]', 'hover:text-[#fb70a9]',
13-
// Blue color for "All Frameworks" option
1413
'border-[#3b82f6]', 'text-[#3b82f6]', 'bg-[#3b82f6]', 'from-[#3b82f6]', 'to-[#3b82f6]', 'hover:bg-[#3b82f6]', 'hover:text-[#3b82f6]',
1514
],
1615
theme: {
1716
extend: {
1817
animation: {
1918
'float': 'float 3s ease-in-out infinite',
19+
'power-up': 'power-up 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards',
2020
},
2121
keyframes: {
2222
float: {
2323
'0%, 100%': { transform: 'translateY(0px)' },
2424
'50%': { transform: 'translateY(-10px)' },
25+
},
26+
'power-up': {
27+
'0%': {
28+
opacity: '0',
29+
transform: 'scale(0.3) translateY(100px)',
30+
filter: 'brightness(2)',
31+
},
32+
'50%': {
33+
opacity: '1',
34+
transform: 'scale(1.2) translateY(-20px)',
35+
filter: 'brightness(1.5)',
36+
},
37+
'75%': {
38+
transform: 'scale(0.9) translateY(10px)',
39+
filter: 'brightness(1.2)',
40+
},
41+
'100%': {
42+
transform: 'scale(1) translateY(0)',
43+
filter: 'brightness(1)',
44+
}
2545
}
2646
},
2747
colors: {

0 commit comments

Comments
 (0)