stunning screenshots in seconds https://moocup.jaydip.me
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

added github links

+53 -32
+53 -32
src/components/editor/Navbar.tsx
··· 15 15 Heart, 16 16 Twitter, 17 17 X, 18 - CheckCircle 18 + CheckCircle, 19 + Github 19 20 } from 'lucide-react'; 20 21 import { toast } from 'sonner'; 21 22 import { useMockupStore } from '@/contexts/MockupContext'; ··· 50 51 51 52 const imgElement = mockupElement.querySelector('img') as HTMLImageElement; 52 53 if (!imgElement) throw new Error('Image element not found'); 53 - 54 - // For fixed margin mode: capture the entire canvas (image + background margins) 55 - const canvas = await html2canvas(mockupElement, { 56 - scale: qualityMultiplier * 2, 57 - useCORS: true, 58 - allowTaint: true, 59 - backgroundColor: null, 60 - // Capture the entire mockup element without any cropping 61 - }); 54 + 55 + // For fixed margin mode: capture the entire canvas (image + background margins) 56 + const canvas = await html2canvas(mockupElement, { 57 + scale: qualityMultiplier * 2, 58 + useCORS: true, 59 + allowTaint: true, 60 + backgroundColor: null, 61 + // Capture the entire mockup element without any cropping 62 + }); 63 + 64 + const mimeType = `image/${format.toLowerCase()}`; 65 + const imageQuality = format === 'JPEG' ? 1 : undefined; 66 + 67 + canvas.toBlob( 68 + (blob) => { 69 + if (blob) { 70 + const url = URL.createObjectURL(blob); 71 + const a = document.createElement('a'); 72 + a.href = url; 73 + a.download = `mockup-${Date.now()}.${format.toLowerCase()}`; 74 + document.body.appendChild(a); 75 + a.click(); 76 + document.body.removeChild(a); 77 + URL.revokeObjectURL(url); 78 + } else { 79 + throw new Error('Failed to create blob'); 80 + } 81 + }, 82 + mimeType, 83 + imageQuality 84 + ); 62 85 63 - const mimeType = `image/${format.toLowerCase()}`; 64 - const imageQuality = format === 'JPEG' ? 1 : undefined; 65 86 66 - canvas.toBlob( 67 - (blob) => { 68 - if (blob) { 69 - const url = URL.createObjectURL(blob); 70 - const a = document.createElement('a'); 71 - a.href = url; 72 - a.download = `mockup-${Date.now()}.${format.toLowerCase()}`; 73 - document.body.appendChild(a); 74 - a.click(); 75 - document.body.removeChild(a); 76 - URL.revokeObjectURL(url); 77 - } else { 78 - throw new Error('Failed to create blob'); 79 - } 80 - }, 81 - mimeType, 82 - imageQuality 83 - ); 84 - 85 - 86 87 } catch (error) { 87 88 console.error('Export error:', error); 88 89 throw error; ··· 232 233 )} 233 234 </Button> 234 235 </div> 236 + 237 + <Button 238 + variant="link" 239 + className="w-full" 240 + > 241 + <a href='https://github.com/jellydeck/moocup' target="_blank" rel="noopener noreferrer" className='inline-flex gap-2 w-full grid-cols-2'> 242 + <Github /> 243 + Hey, You can also help us out at here 244 + </a> 245 + </Button> 235 246 </div> 236 247 237 248 <Card className={`border-primary/20 bg-gradient-to-br from-primary/5 to-primary/10 ${!isMobile ? 'order-1' : 'order-2'} group`}> ··· 379 390 )} 380 391 </div> 381 392 <div className="flex items-center gap-2"> 393 + <a href='https://github.com/jellydeck/moocup' target="_blank" rel="noopener noreferrer" 394 + > 395 + <Button 396 + variant="outline" 397 + className="gap-2" 398 + > 399 + <Github /> 400 + Moocup is now Open source, Send a Star! 401 + </Button> 402 + </a> 382 403 {isMobile ? ( 383 404 <Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}> 384 405 <DialogTrigger asChild>