Subscribe for notification
Software Tools

Online Business Card Maker

 

 

NathTech’s Tools ,

Online Business Card Maker ,

This tool provides an interface for an Online Business Card Making with input fields for name, position, email, phone number, and image/logo upload sections. Users can generate their business card by clicking the “Generate Business Card” button. The background color of the business card is randomized, and the Snap.svg library is used to generate and display the business card.

 







// Random background color const randomColor = () => '#' + Math.floor(Math.random() * 16777215).toString(16);

// Generate SVG for business card const svg = Snap('#background'); const width = svg.node.offsetWidth; const height = svg.node.offsetHeight; const backgroundColor = randomColor(); svg.rect(0, 0, width, height).attr({ fill: backgroundColor });

// Add text elements svg.text(width / 2, height / 4, name).attr({ fill: 'white', 'font-size': 20, 'text-anchor': 'middle' }); svg.text(width / 2, height / 2, position).attr({ fill: 'white', 'font-size': 16, 'text-anchor': 'middle' }); svg.text(width / 2, height * 3 / 4, `${email} | ${phone}`).attr({ fill: 'white', 'font-size': 14, 'text-anchor': 'middle' });

// Add image and logo const reader = new FileReader(); reader.onload = () => { svg.image(reader.result, width / 4, height / 6, width / 2, height / 3); }; if (imageFile) reader.readAsDataURL(imageFile);

if (logoFile) { const reader2 = new FileReader(); reader2.onload = () => { svg.image(reader2.result, width * 3 / 4 - 30, height * 5 / 6 - 30, 60, 60); }; reader2.readAsDataURL(logoFile); } };

document.getElementById('generateBtn').addEventListener('click', generateBusinessCard);

shmbhnthjh8

Music composer, blogger,website creator,freelancer

Recent Posts

Toncoin: Everything You Need to Know About the Future of this Unique Cryptocurrency

NathTech Guid,   Introduction to Toncoin (TON) Toncoin (TON) is the native cryptocurrency of The…

2 months ago

How to Get Naturally Glowing Skin: A Complete Guide for All Skin Types

NathTech Guide , Introduction: glowing skin is a reflection of overall health and self-care. While…

3 months ago

How to Get Glowing Skin: Essential Tips, Skin Care Components, and Protection Against Environmental Factors

NathTech Guid Introduction: Achieving glowing skin is a goal that many people aspire to, but…

3 months ago

Essential Components of Fitness: A Comprehensive Guide for All Ages

Nathtech Guideline , Introduction Maintaining fitness is crucial for a healthy and fulfilling life, regardless…

5 months ago

Maintaining Fitness Naturally: A Comprehensive Guide for All Ages

Nathtech Guideline ,   Introduction ; In today's fast-paced world, maintaining fitness is more than…

5 months ago

Unlocking Natural Fitness: Essential Tips for Every Age

Nathtech's Guideline ,     Introduction , In a world that is increasingly focused on…

5 months ago