Skip to content

Commit 0861780

Browse files
authored
Merge pull request #318 from AvarchLLC/ayush-test
Reapply "feat: implement Cookie Consent Banner with animations and us…
2 parents b770219 + b97def3 commit 0861780

31 files changed

+3129
-929
lines changed

public/ECH-gif.gif

1.34 MB
Loading

public/ESP-gif.gif

964 KB
Loading

public/EtherWorld-gif.gif

1.46 MB
Loading

public/Gitcoin-gif.gif

1020 KB
Loading

public/QR.png

-4.61 KB
Binary file not shown.

public/qr-wallet.png

2.08 KB
Loading

scripts/generate-qr.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const QRCode = require('qrcode');
2+
const fs = require('fs');
3+
const path = require('path');
4+
5+
// Your wallet address
6+
const walletAddress = '0x68B1C495096710Ab5D3aD137F5024221aAf35B7d';
7+
8+
// Use Ethereum URI format for better wallet app recognition
9+
const ethereumURI = `ethereum:${walletAddress}`;
10+
11+
// Output path
12+
const outputPath = path.join(__dirname, '..', 'public', 'qr-wallet.png');
13+
14+
// QR code options
15+
const options = {
16+
type: 'png',
17+
quality: 0.92,
18+
margin: 2,
19+
color: {
20+
dark: '#000000',
21+
light: '#FFFFFF'
22+
},
23+
width: 256
24+
};
25+
26+
// Generate QR code
27+
QRCode.toFile(outputPath, ethereumURI, options, function (err) {
28+
if (err) {
29+
console.error('Error generating QR code:', err);
30+
process.exit(1);
31+
}
32+
33+
console.log('QR code generated successfully!');
34+
console.log('File saved to:', outputPath);
35+
console.log('Wallet address:', walletAddress);
36+
console.log('Ethereum URI:', ethereumURI);
37+
});

scripts/generate-static-images.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const publicDir = path.join(__dirname, '../public');
5+
6+
const gifFiles = [
7+
'EtherWorld-gif.gif',
8+
'ESP-gif.gif',
9+
'Gitcoin-gif.gif',
10+
'ECH-gif.gif'
11+
];
12+
13+
console.log('🎨 Static Image Generation Guide');
14+
console.log('='.repeat(50));
15+
console.log('\nGIF files found in public directory:');
16+
17+
gifFiles.forEach(file => {
18+
const filePath = path.join(publicDir, file);
19+
if (fs.existsSync(filePath)) {
20+
const stats = fs.statSync(filePath);
21+
const sizeInMB = (stats.size / (1024 * 1024)).toFixed(2);
22+
console.log(`✓ ${file} (${sizeInMB} MB)`);
23+
24+
// Suggest the output name
25+
const staticName = file.replace('-gif.gif', '-static.png');
26+
console.log(` → Suggested static: ${staticName}`);
27+
} else {
28+
console.log(`✗ ${file} - NOT FOUND`);
29+
}
30+
});
31+
32+
console.log('\n📝 To generate static images, use one of these methods:');
33+
console.log('\n1. ImageMagick (recommended):');
34+
gifFiles.forEach(file => {
35+
const output = file.replace('-gif.gif', '-static.png');
36+
console.log(` convert public/${file}[0] public/${output}`);
37+
});
38+
39+
console.log('\n2. FFmpeg:');
40+
gifFiles.forEach(file => {
41+
const output = file.replace('-gif.gif', '-static.png');
42+
console.log(` ffmpeg -i public/${file} -vframes 1 public/${output}`);
43+
});
44+
45+
console.log('\n3. Online Tool: https://ezgif.com/split (extract first frame)');
46+
console.log('\n' + '='.repeat(50));

src/app/globals.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,32 @@ html {
112112
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
113113
}
114114

115+
/* Cookie banner fade-up animation */
116+
@keyframes fadeUp {
117+
0% {
118+
opacity: 0;
119+
transform: translateY(50px);
120+
}
121+
100% {
122+
opacity: 1;
123+
transform: translateY(0);
124+
}
125+
}
126+
127+
/* Shimmer animation for interactive banner */
128+
@keyframes shimmer {
129+
0% {
130+
transform: translateX(-100%);
131+
}
132+
100% {
133+
transform: translateX(100%);
134+
}
135+
}
136+
137+
.animate-shimmer {
138+
animation: shimmer 2s ease-in-out infinite;
139+
}
140+
115141
/* Improved card hover effects */
116142
.hover-lift {
117143
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import dynamic from 'next/dynamic';
88
import { Suspense } from 'react';
99
import { motion, AnimatePresence } from 'framer-motion';
1010
import { usePathname } from 'next/navigation';
11-
import CookieConsent from '@/components/CookieConsent';
11+
import CookieConsentBanner from '@/components/CookieConsentBanner';
1212
import FloatingContributionIcon from '@/components/FloatingContributionIcon';
1313
import SessionWrapper from '@/components/SessionWrapper';
1414
import { SidebarProvider } from '@/components/Sidebar/SideBarContext';
@@ -49,7 +49,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
4949
<Providers>
5050
<SidebarProvider>
5151
<ClientContent>{children}</ClientContent>
52-
<CookieConsent />
52+
<CookieConsentBanner />
5353
</SidebarProvider>
5454
</Providers>
5555
</motion.div>

0 commit comments

Comments
 (0)