Digital Business Card Generator is a free and open-source front-end web application that lets you to quickly generate an interactive and responsive HTML-based digital business card that can be hosted with your website.
+ Please follow the instructions as per your category to get your
+ digital business card online.
+
+
+
+ Your digital business card files are in the folder you just extracted
+ from your downloaded ZIP file. This folder will be referred to as the
+ "bizcard folder" throughout this
+ guide.
+
+
+
+
+ I have a personal WordPress website
+
+
+
+ Login to your cPanel account. Locate and open the file manager.
+
+
+ In the file manager, locate the folder named "public_html" and
+ create a new folder called "vcard" ( or whatever you like ) inside
+ it.
+
+
+ Upload your bizcard folder into the new folder that you just
+ created in the previous step.
+
+
+ Now your business card should be online at the address
+ https://your-domain.com/vcard/bizcard-folder-name/ and is ready to
+ be shared.
+
+
+
+
+
+ My website is maintained by a developer
+
+
+
+ Contact your developer to host the business card for you. Just
+ send them the downloaded ZIP file.
+
+
+
+
+
+ We are a company. Our website is maintained by the IT team
+
+
+
+ Just share the details with your IT team, let them create digital
+ business cards for you using
+ EnBizCard.
+
+
+ If you got some business cards created by yourself, contact your
+ IT team to host it for you. Just send them the downloaded ZIP
+ files and share the link to this
+ Hosting Guide.
+
+
+
+
+
+ I'm the developer / administrator of a website
+
+
+
+ Create a folder called "vcard" ( or whatever you like ) in the
+ project's static folder.
+
+
Copy the bizcard folder inside the "vcard" folder.
+
Commit changes and deploy.
+
+ Now the business card should be online at the address
+ https://your-domain/vcard/bizcard-folder/ and is ready to be
+ shared.
+
+
+
+
+
I don't have a website
+
+ You can host your digital business card using several free hosting
+ services available such as
+ Surge,
+ GitHub Pages,
+ GitLab Pages, etc.
+
+
+
+ Follow the user guide of any of the services mentioned above to
+ setup a website.
+
+
+ Once done, copying your bizcard folder into a respective folder is
+ all it needed to get your digital business card online. But the
+ procedure might vary with platform.
+
+
+
+ If you got any doubt setting up your digital business card on any of
+ these platforms, You can always
+ join the telegram group
+ and ask it.
+
+
+
+
+ How do I update my business card details?
+
+
+ EnBizCard does not store any data online for you to retrieve it for
+ editing. So, every card has to be manually created from scratch.
+
+
+
+ Visit
+ EnBizCard
+ and generate a new digital business card.
+
+
+ Extract the downloaded ZIP file and copy your bizcard folder
+ containing your updated files.
+
+
+ Follow the exact same steps as per your category listed above to
+ update your digital business card.
+
+
+
+
+
+ How do I add another business card to my website?
+
+
+
+ Visit
+ EnBizCard
+ and generate a digital business card.
+
+
+ Extract the downloaded ZIP file and copy the bizcard folder.
+
+
+ Follow the exact same steps as per your category listed above to
+ add the digital business card.
+
+
+ Place the copied folder inside the same folder where you already
+ have your bizcard folders.
+
+
+
\ No newline at end of file
diff --git a/pages/index.vue b/pages/index.vue
index 1c08745..61f1f63 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -1,49 +1,114 @@
-
+ Supported media file formats: jpeg, png, mp3, mp4, webm and pdf
+
-
Embed content
-
-
-
-
-
-
-
-
Add section
+
Enable footer credit?
+
+
+
+
+
{{ footerCredit ? 'Yes, for sure!' : 'No, thanks' }}
+
+ Footer credit lets others to use this Service. Help support this
+ project by enabling the footer credit.
+
-
Product catalogue
-
-
-
-
-
-
-
-
Add section
-
-
+
Themes (coming soon)
+
+
+ T1
+
+
+ T2
+
Colour customisation
-
+
-
Enable footer credit?
-
-
Fonts
+
+ Web font embed code
+
+
+
+ Web font CSS rule
+
+
+
+ Supports web fonts from services such as Google Fonts, Adobe
+ Typekit, etc. Make sure to get the embed link for both regular and
+ bold font variants from the same font family.
+
- Footer credit is nothing but a backlink which lets others to use
- this Service. You can help getting the word out by enabling the
- footer credit.
+ You can add tracking code from service such as Matomo, Clicky,
+ Google Analytics etc.
+
+
-
+
-
-
- Preview
+
+
+ LIVE PREVIEW
-
-
-
+
+
+
@@ -400,78 +484,8 @@
-
-
Download
-
-
-
- Download Package
-
-
- Extract the package and follow the instructions in the README.txt file
-
-
-
-
-
-
+
@@ -479,18 +493,17 @@
import Modal from '@/components/Modal'
import Attachment from '@/components/Attachment'
import Action from '@/components/Action'
-import Feature from '@/components/Feature'
-import Embed from '@/components/Embed'
-import Product from '@/components/Product'
+import Featured from '@/components/Featured'
import Colour from '@/components/Colour'
import Preview from '@/components/Preview'
-import Check from '@/components/Check'
-import Donate from '@/components/Donate'
+import Download from '@/components/Download'
+import Help from '@/components/Help'
+import Footer from '@/components/Footer'
-import ReadMe from '@/components/ReadMe'
import Vcard from '@/components/Vcard'
import JSZip from 'jszip'
import { saveAs } from 'file-saver'
+// let minify = require('html-minifier').minify
import QRCode from '!!raw-loader!~/static/qrcode.min.js'
import Theme1 from '!!raw-loader!~/assets/styles/T1.min.css'
export default {
@@ -498,14 +511,12 @@ export default {
Modal,
Attachment,
Action,
- Feature,
- Embed,
- Product,
+ Featured,
Colour,
Preview,
- Check,
- Donate,
- ReadMe,
+ Download,
+ Help,
+ Footer,
Vcard,
},
@@ -518,12 +529,11 @@ export default {
checked: false,
},
{
- label:
- 'I have verified that all the links are working correctly in the Preview',
+ label: 'I have verified that all the links are working correctly',
checked: false,
},
{
- label: 'I have removed all unused and empty fields or sections',
+ label: 'I have removed all unused fields and sections',
checked: false,
},
],
@@ -542,30 +552,33 @@ export default {
},
},
colors: {
- mainBg: {
- color: `#eee`,
+ logoBg: {
+ color: `#1F2937`,
openPalette: false,
},
- logoBg: {
- color: `#000`,
+ mainBg: {
+ color: `#F9FAFB`,
openPalette: false,
},
buttonBg: {
- color: `#000`,
+ color: `#374151`,
openPalette: false,
},
cardBg: {
- color: `#ddd`,
+ color: `#E5E7EB`,
openPalette: false,
},
},
- businessInfo: {
+ genInfo: {
name: null,
- jobTitle: null,
- businessName: null,
- businessDescription: null,
- publicKey: null,
- fingerprint: null,
+ title: null,
+ biz: null,
+ desc: null,
+ key: null,
+ fp: null,
+ tracker: null,
+ fontLink: null,
+ fontCss: null,
},
primaryActions: [],
secondaryActions: [],
@@ -834,6 +847,20 @@ export default {
color: '#003087',
label: 'PayPal.me URL',
},
+ {
+ name: 'patreon',
+ placeholder: 'https://patreon.com/username',
+ value: null,
+ color: '#FF424D',
+ label: 'Patreon URL',
+ },
+ {
+ name: 'open-collective',
+ placeholder: 'https://opencollective.com/username',
+ value: null,
+ color: '#fff',
+ label: 'Open Collective URL',
+ },
],
},
featured: [
@@ -842,55 +869,36 @@ export default {
content: [],
},
],
- embedContent: [
- {
- title: 'Section title',
- content: [],
- },
- ],
- products: [
- {
- title: 'Section title',
- content: [],
- },
- ],
footerCredit: true,
PreviewMode: true,
content: null,
+ inView: false,
+ showPreview: false,
+ scrollPos: null,
+ opening: false,
}
},
computed: {
pubKeyIsValid() {
- if (this.businessInfo.publicKey) {
- if (
- !this.businessInfo.publicKey.match(
- /^(-----BEGIN PGP PUBLIC KEY BLOCK-----)/
- )
- )
+ if (this.genInfo.key) {
+ if (!this.genInfo.key.match(/^(-----BEGIN PGP PUBLIC KEY BLOCK-----)/))
return false
- if (
- !this.businessInfo.publicKey.match(
- /(-----END PGP PUBLIC KEY BLOCK-----)$/
- )
- )
+ if (!this.genInfo.key.match(/(-----END PGP PUBLIC KEY BLOCK-----)$/))
return false
return true
} else return false
},
fingerprintIsValid() {
- return (
- this.businessInfo.fingerprint &&
- this.businessInfo.fingerprint.match(/^[a-zA-Z0-9]{40}$/)
- )
+ return this.genInfo.fp && this.genInfo.fp.match(/^[a-zA-Z0-9]{40}$/)
},
downloadChecked() {
return this.downloadCheckList.filter((e) => e.checked).length == 3
},
username() {
- return this.businessInfo.name
- ? this.businessInfo.name.toLowerCase().replace(/\W+/g, '')
+ return this.genInfo.name
+ ? this.genInfo.name.toLowerCase().replace(/\W+/g, '')
: 'username'
},
vCard() {
@@ -905,19 +913,48 @@ export default {
.filter((e) => e)[0]
let randomNumber = Math.floor(100000 + Math.random() * 900000)
return {
- FN: this.businessInfo.name,
- TITLE: this.businessInfo.jobTitle,
- ORG: this.businessInfo.businessName,
+ FN: this.genInfo.name,
+ TITLE: this.genInfo.title,
+ ORG: this.genInfo.biz,
TEL1: phoneNumbers[0],
TEL2: phoneNumbers[1],
EMAIL: email,
URL: website,
- KEY: this.businessInfo.fingerprint,
- UID: `dbizcard-${randomNumber}`,
+ KEY: this.genInfo.fp,
+ UID: `enbizcard-${randomNumber}`,
}
},
},
methods: {
+ togglePreview() {
+ this.opening = true
+ let c = this.$refs.container
+ if (this.showPreview) {
+ c.classList.remove('overflow-y-hidden', 'h-screen')
+ window.scrollTo(0, this.scrollPos)
+ this.opening = false
+ } else {
+ this.scrollPos = window.scrollY
+ setTimeout(() => {
+ c.classList.add('overflow-y-hidden', 'h-screen')
+ this.opening = false
+ }, 400)
+ }
+ this.showPreview = !this.showPreview
+ },
+ checkView() {
+ let e = this.$refs.create
+ if (e) {
+ let top = e.getBoundingClientRect().top
+ this.inView = this.showPreview ? true : top < 0
+ }
+ },
+ clearContent() {
+ this.content = null
+ },
+ create() {
+ this.$refs.create.scrollIntoView({ behavior: 'smooth' })
+ },
getTitle(e) {
return e.toLowerCase().split(' ').join('_')
},
@@ -927,27 +964,6 @@ export default {
content: [],
})
},
- addEmbed() {
- this.embedContent.push({
- title: 'Section title',
- content: [''],
- })
- },
- addProduct() {
- this.products.push({
- title: 'Section title',
- content: [
- {
- image: null,
- title: null,
- description: null,
- price: null,
- label: null,
- link: null,
- },
- ],
- })
- },
hasLightBG(e) {
let hex = this.colors[e].color
hex = hex.slice(1)
@@ -980,12 +996,12 @@ export default {
saveAs(window.URL.createObjectURL(blob), `${this.username}.vcf`)
},
downloadKey() {
- let blob = new Blob([this.businessInfo.publicKey], {
+ let blob = new Blob([this.genInfo.key], {
type: 'text/plain',
})
saveAs(
window.URL.createObjectURL(blob),
- `${this.businessInfo.name}'s public key.asc`
+ `${this.genInfo.name}'s public key.asc`
)
},
async resizeImage(type, index1, index2) {
@@ -998,7 +1014,7 @@ export default {
} else if (type == 'music') {
file = await this.featured[index1].content[index2].cover
} else if (type == 'product') {
- file = await this.products[index1].content[index2].image.file
+ file = await this.featured[index1].content[index2].image.file
}
} else {
file = this.images[type].blob
@@ -1043,7 +1059,7 @@ export default {
} else if (type == 'music') {
vm.featured[index1].content[index2].cover = image
} else if (type == 'product') {
- vm.products[index1].content[index2].image.file = image
+ vm.featured[index1].content[index2].image.file = image
}
} else {
vm.images[type].resized = image
@@ -1092,19 +1108,24 @@ export default {
let vCard = new Blob([this.$refs.vCard.$refs.vCard.innerText], {
type: 'text/plain',
})
- let README = new Blob([this.$refs.readme.$refs.readme.innerText], {
- type: 'text/plain',
- })
+ let guide = new Blob(
+ [
+ '',
+ ],
+ {
+ type: 'text/html',
+ }
+ )
let qrScript = new Blob([QRCode], {
type: 'application/javascript',
})
- let name = this.businessInfo.name
+ let name = this.genInfo.name
let username = this.username
let zip = new JSZip()
zip.folder(username).file('index.html', html)
zip.folder(username).file('style.min.css', css)
zip.folder(username).file('qrcode.min.js', qrScript)
- zip.file('README.txt', README)
+ zip.file('Hosting-Guide.html', guide)
if (this.images.logo.url) {
zip.folder(username).file(
`logo.${this.images.logo.format}`,
@@ -1127,32 +1148,27 @@ export default {
if (this.featured.length && hasFeaturedContent) {
this.featured.forEach((item, index) => {
item.content.forEach((item, i) => {
- zip
- .folder(username)
- .folder('featured')
- .file(
- `${this.getTitle(item.title)}.${item.format}`,
- item.file
- )
- if (item.type.match(/music|document/gi)) {
+ if (item.contentType == 'media') {
zip
.folder(username)
- .folder('featured')
+ .folder('media')
.file(
- `${this.getTitle(item.title)}.${item.coverFormat}`,
- item.cover
+ `${this.getTitle(item.title)}.${item.format}`,
+ item.file
)
- }
- })
- })
- }
- if (this.products.length) {
- this.products.forEach((item, index) => {
- item.content.forEach((item, i) => {
- if (item.image) {
+ if (item.type.match(/music|document/gi)) {
+ zip
+ .folder(username)
+ .folder('media')
+ .file(
+ `${this.getTitle(item.title)}.${item.coverFormat}`,
+ item.cover
+ )
+ }
+ } else if (item.contentType == 'product' && item.image) {
zip
.folder(username)
- .folder('products')
+ .folder('media')
.file(
`${this.getTitle(item.image.title)}.${item.image.format}`,
item.image.file
@@ -1164,10 +1180,7 @@ export default {
if (this.pubKeyIsValid) {
zip
.folder(username)
- .file(
- `${this.businessInfo.name}'s public key.asc`,
- this.businessInfo.publicKey
- )
+ .file(`${this.genInfo.name}'s public key.asc`, this.genInfo.key)
}
zip.folder(username).file(`${username}.vcf`, vCard)
zip
@@ -1177,10 +1190,16 @@ export default {
.then(function (zip) {
saveAs(zip, `${name}'s Digital Business Card.zip`)
})
+ this.showAlert(
+ 'Your Download Has Been Started!\n\nExtract the downloaded ZIP file and follow the Hosting Guide to get your digital business card online.\n\nIf you find this service valuable to you or your business, please consider donating.\nDonate'
+ )
this.PreviewMode = true
}, 250)
}
},
},
+ mounted() {
+ window.addEventListener('scroll', this.checkView)
+ },
}
\ No newline at end of file
diff --git a/tailwind.config.js b/tailwind.config.js
index 0870ad6..54f5e86 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -11,7 +11,10 @@ module.exports = {
extend: {},
},
variants: {
- extend: {},
+ extend: {
+ backgroundColor: ['group-focus', 'checked'],
+ borderColor: ['checked'],
+ },
},
plugins: [],
}