Skip to content

Commit

Permalink
updated features
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuraghavb committed Feb 7, 2021
1 parent 42d628c commit 355134a
Show file tree
Hide file tree
Showing 44 changed files with 379 additions and 1,004 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Digital Business Card Generator is a free and open-source front-end web applicat
- ~~Product showcase~~
- Custom font support
- Analytics support
- Themes

## License

Expand Down
9 changes: 3 additions & 6 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,22 @@
background-color: #38a169;
border-color: #38a169;
}
/* .checkbox:checked + img {
filter: invert(1);
} */

.device-curve {
border-radius: 2rem;
}
.max-hd {
/* max-height: 60vh; */
scrollbar-width: none;
-ms-overflow-style: none;
}
.max-hd::-webkit-scrollbar {
display: none;
}
.device-viewport {
.theme-one {
scrollbar-width: none;
-ms-overflow-style: none;
}
.device-viewport::-webkit-scrollbar {
.theme-one::-webkit-scrollbar {
display: none;
}
@media (min-width: 640px) {
Expand Down
49 changes: 20 additions & 29 deletions assets/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
let sC = document.getElementById('shareContainer'),
cBtn = document.getElementById('closeBtn'),
cURL = document.getElementById('copyURL'),
cSURL = document.getElementById('copyShareURL'),
dQR = document.getElementById('displayQRCode'),
qrc = document.getElementById('qrcode'),
let m = document.getElementById('modal'),
c = document.getElementById('close'),
ki = document.getElementById('keyInfo'),
cv = document.getElementById('copyView'),
curl = document.getElementById('copyURL'),
qrv = document.getElementById('qrView'),
qr = document.getElementById('qr'),
s = document.getElementById('share'),
sQRC = document.getElementById('showQRCode'),
pKI = document.getElementById('pubKeyInfo'),
sPK = document.getElementById('showPubKey')
sqr = document.getElementById('showQR'),
sk = document.getElementById('showKey')

function tC(e) {
'2rem' == e.style.top
Expand All @@ -24,8 +24,8 @@ function dN(value) {
value.style.display = 'none'
}
window.addEventListener('load', () => {
;(document.querySelector('#actions').style.display = 'flex'),
(qrc.innerHTML = new QRCode({
;(document.querySelector('#topActions').style.display = 'flex'),
(qr.innerHTML = new QRCode({
content: window.location.href,
container: 'svg-viewbox',
join: !0,
Expand All @@ -42,31 +42,22 @@ navigator.canShare
})
})
: s.addEventListener('click', () => {
tC(sC),
(cURL.style.display = 'flex'),
dN(dQR),
pKI ? dN(pKI) : null
tC(m), (cv.style.display = 'flex'), dN(qrv), ki ? dN(ki) : null
})

sQRC.addEventListener('click', () => {
tC(sC),
(dQR.style.display = 'block'),
dN(cURL),
pKI ? dN(pKI) : null
sqr.addEventListener('click', () => {
tC(m), (qrv.style.display = 'block'), dN(cv), ki ? dN(ki) : null
})

if (sPK) {
sPK.addEventListener('click', () => {
tC(sC),
pKI ? (pKI.style.display = 'flex') : null,
dN(cURL),
dN(dQR)
if (sk) {
sk.addEventListener('click', () => {
tC(m), ki ? (ki.style.display = 'flex') : null, dN(cv), dN(qrv)
})
}

cBtn.addEventListener('click', () => tC(sC)),
cSURL.addEventListener('click', async () => {
let action = cSURL.querySelectorAll('.action')[1]
c.addEventListener('click', () => tC(m)),
curl.addEventListener('click', async () => {
let action = curl.querySelectorAll('.action')[1]
await navigator.clipboard.writeText(window.location.href).then((e) => {
action.innerText = 'Copied'
setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/media.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let pC = document.querySelectorAll('.playerControl'),
let pC = document.querySelectorAll('.pCtrl'),
pP = document.querySelectorAll('.playPause'),
srcs = document.querySelectorAll('.source')
srcs.forEach((e) => {
Expand Down
1 change: 1 addition & 0 deletions assets/styles/T1.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 355134a

Please sign in to comment.