Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

feat: replace particle scatter with stroke outline notification overlay

Luis Ortizaf014839a91b
diff --git a/src/core/capture/start-notification.ts b/src/core/capture/start-notification.ts
index 2809780..21f7095 100644
--- a/src/core/capture/start-notification.ts
+++ b/src/core/capture/start-notification.ts
@@ -11,66 +11,58 @@ const STYLES = `
.wrap {
position: absolute;
inset: 0;
+ background: rgba(0, 0, 0, 0.65);
+ display: flex;
+ align-items: center;
+ justify-content: center;
animation: show ${ANIMATION_DURATION_MS}ms ease forwards;
}
@keyframes show {
- 0% { opacity: 1; }
- 85% { opacity: 1; }
+ 0% { opacity: 0; }
+ 8% { opacity: 1; }
+ 75% { opacity: 1; }
100% { opacity: 0; }
}
- .particle {
- position: absolute;
- width: 4px;
- height: 4px;
- border-radius: 50%;
- background: #FBBF24;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%) scale(0);
+ .txt {
+ font-family: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
+ font-size: clamp(40px, 10vw, 90px);
+ letter-spacing: clamp(2px, 0.8vw, 6px);
+ -webkit-text-stroke: 2px #F59E0B;
+ color: transparent;
+ position: relative;
+ text-transform: uppercase;
+ opacity: 0;
+ animation: txtIn 0.01s ease forwards;
+ }
+
+ @keyframes txtIn {
+ to { opacity: 1; }
}
- .particle:nth-child(1) { animation: p1 1.2s cubic-bezier(0.16,1,0.3,1) forwards; }
- .particle:nth-child(2) { animation: p2 1.2s cubic-bezier(0.16,1,0.3,1) 0.05s forwards; }
- .particle:nth-child(3) { animation: p3 1.2s cubic-bezier(0.16,1,0.3,1) 0.1s forwards; }
- .particle:nth-child(4) { animation: p4 1.2s cubic-bezier(0.16,1,0.3,1) 0.03s forwards; }
- .particle:nth-child(5) { animation: p5 1.2s cubic-bezier(0.16,1,0.3,1) 0.08s forwards; }
- .particle:nth-child(6) { animation: p6 1.2s cubic-bezier(0.16,1,0.3,1) 0.12s forwards; }
- .particle:nth-child(7) { animation: p7 1.2s cubic-bezier(0.16,1,0.3,1) 0.02s forwards; }
- .particle:nth-child(8) { animation: p8 1.2s cubic-bezier(0.16,1,0.3,1) 0.07s forwards; }
- .particle:nth-child(9) { animation: p9 1.2s cubic-bezier(0.16,1,0.3,1) 0.06s forwards; }
- .particle:nth-child(10) { animation: p10 1.2s cubic-bezier(0.16,1,0.3,1) 0.09s forwards; }
-
- @keyframes p1 { 30% { transform: translate(80px, -60px) scale(1.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p2 { 30% { transform: translate(-70px, -80px) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p3 { 30% { transform: translate(100px, 40px) scale(1.8); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p4 { 30% { transform: translate(-90px, 50px) scale(1.3); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p5 { 30% { transform: translate(50px, -90px) scale(1.6); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p6 { 30% { transform: translate(-40px, 80px) scale(1.1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p7 { 30% { transform: translate(70px, 70px) scale(1.4); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p8 { 30% { transform: translate(-60px, -30px) scale(1.7); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p9 { 30% { transform: translate(-100px, -10px) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
- @keyframes p10 { 30% { transform: translate(30px, 90px) scale(1.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; } }
-
- .text {
+ .fill {
position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%) scale(0.8);
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
- font-weight: 600;
- font-size: 16px;
+ inset: 0;
color: #FBBF24;
- white-space: nowrap;
- opacity: 0;
- text-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
- animation: textIn 0.4s cubic-bezier(0.16,1,0.3,1) 0.5s forwards,
- textOut 0.3s ease 2.3s forwards;
+ -webkit-text-stroke: 0;
+ clip-path: inset(0 100% 0 0);
+ animation: fillRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards,
+ fadeOut 0.4s ease 2.4s forwards;
}
- @keyframes textIn { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
- @keyframes textOut { to { opacity: 0; transform: translate(-50%, -50%) scale(0.95); } }
+ @keyframes fillRight {
+ to { clip-path: inset(0 0 0 0); }
+ }
+
+ @keyframes fadeOut {
+ to { opacity: 0; }
+ }
+
+ .txt {
+ animation: txtIn 0.01s ease forwards,
+ fadeOut 0.4s ease 2.4s forwards;
+ }
`;
export function showStartNotification(): Promise<void> {
@@ -86,17 +78,16 @@ export function showStartNotification(): Promise<void> {
const wrap = document.createElement('div');
wrap.className = 'wrap';
- for (let i = 0; i < 10; i++) {
- const particle = document.createElement('div');
- particle.className = 'particle';
- wrap.appendChild(particle);
- }
+ const txt = document.createElement('div');
+ txt.className = 'txt';
+ txt.textContent = 'RECORDING';
- const text = document.createElement('div');
- text.className = 'text';
- text.textContent = 'Recording started';
- wrap.appendChild(text);
+ const fill = document.createElement('div');
+ fill.className = 'fill';
+ fill.textContent = 'RECORDING';
+ txt.appendChild(fill);
+ wrap.appendChild(txt);
shadow.appendChild(wrap);
document.documentElement.appendChild(host);