fix ADDR bug
This commit is contained in:
+14
-11
@@ -520,6 +520,11 @@
|
||||
\ifexists{Xfamilynames}{\Xfamilynames}%
|
||||
\ifexists{Xhonoricsuffix}{\ \Xhonoricsuffix}%
|
||||
}
|
||||
\newcommand\personalnamefn{%
|
||||
\ifexists{Xgivennames}{\Xgivennames\ }%
|
||||
\ifexists{Xadditionalnames}{\Xadditionalnames\ }%
|
||||
\ifexists{Xfamilynames}{\Xfamilynames}%
|
||||
}
|
||||
\newcommand\personalname{%
|
||||
\ifvisible{Xhonoricprefix}{\Xhonoricprefix\ }{}%
|
||||
\ifvisible{Xgivennames}{\Xgivennames\ }{}%
|
||||
@@ -751,15 +756,13 @@
|
||||
\newcommand\BCQ@vcardtel{%
|
||||
TEL;VALUE=uri;TYPE=\BCQ@vcardteltype,text:tel:\Xphone\BCQ@nl
|
||||
}
|
||||
\newcommand\BCQ@vcardaddressfull{%
|
||||
\ifcsdef{Xpobox}{\Xpobox\ }{}%
|
||||
\ifcsdef{Xextaddr}{\Xextaddr\ }{}%
|
||||
\ifcsdef{Xstreet}{\Xstreet\ }{}%
|
||||
\ifcsdef{Xzip}{\Xzip\ }{}%
|
||||
\ifcsdef{Xcity}{\Xcity\ }{}%
|
||||
\ifcsdef{Xregion}{\Xregion\ }{}%
|
||||
\ifcsdef{Xcountry}{\Xcountry}{}%
|
||||
}
|
||||
\newcommand\BCQ@vcardpobox{\ifcsdef{Xpobox}{\Xpobox}{}}
|
||||
\newcommand\BCQ@vcardextaddr{\ifcsdef{Xextaddr}{\Xextaddr}{}}
|
||||
\newcommand\BCQ@vcardstreet{\ifcsdef{Xstreet}{\Xstreet}{}}
|
||||
\newcommand\BCQ@vcardcity{\ifcsdef{Xcity}{\Xcity}{}}
|
||||
\newcommand\BCQ@vcardregion{\ifcsdef{Xregion}{\Xregion}{}}
|
||||
\newcommand\BCQ@vcardzip{\ifcsdef{Xzip}{\Xzip}{}}
|
||||
\newcommand\BCQ@vcardcountry{\ifcsdef{Xcountry}{\Xcountry}{}}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% vcard - the content of the vcard
|
||||
% newline selection: default LF (robust for qrcode). Optional CRLF if crlf option set.
|
||||
@@ -774,11 +777,11 @@
|
||||
\newcommand\vcard{BEGIN:VCARD\BCQ@nl
|
||||
VERSION:\BCQ@vcardversionline\BCQ@nl
|
||||
\ifhaspersonalnamevcard{N:\cond{Xfamilynames};\cond{Xgivennames};\cond{Xadditionalnames};\cond{Xhonoricprefix};\cond{Xhonoricsuffix}\BCQ@nl}{}
|
||||
\ifhasfullnamevcard{FN:\name\BCQ@nl}{}
|
||||
\ifhaspersonalnamevcard{FN:\personalnamefn\BCQ@nl}{\ifexists{Xcompany}{FN:\Xcompany\BCQ@nl}}
|
||||
\ifexists{Xcompany}{ORG:\Xcompany\BCQ@nl}
|
||||
\ifexists{Xtitle}{TITLE:\Xtitle\BCQ@nl}
|
||||
\ifexists{Xrole}{ROLE:\Xrole\BCQ@nl}
|
||||
\ifexists{printaddress}{\ifhasaddressvcard{ADR:;;\BCQ@vcardaddressfull;;;;\BCQ@nl}{}}
|
||||
\ifexists{printaddress}{\ifhasaddressvcard{ADR:\BCQ@vcardpobox;\BCQ@vcardextaddr;\BCQ@vcardstreet;\BCQ@vcardcity;\BCQ@vcardregion;\BCQ@vcardzip;\BCQ@vcardcountry\BCQ@nl}{}}
|
||||
\ifexists{Xphone}{\BCQ@vcardtel}
|
||||
\ifexists{Xemail}{EMAIL\BCQ@vcardtypeparam:\Xemail\BCQ@nl}
|
||||
\ifexists{Xjabber}{IMPP;TYPE=XMPP:\Xjabber\BCQ@nl}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
<div class="body">
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
--padding: 2mm;
|
||||
--paperwidth: 98mm;
|
||||
--paperheight: 62mm;
|
||||
--contentwidth: 90mm;
|
||||
--contentheight: 54mm;
|
||||
--fontsize: 8pt;
|
||||
--logoheight: 2cm;
|
||||
}
|
||||
|
||||
div {
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
.body {
|
||||
padding: 1cm;
|
||||
width: 100%;
|
||||
font-size: var(--fontsize);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.paper {
|
||||
width: var(--paperwidth);
|
||||
height: var(--paperheight);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: var(--contentwidth);
|
||||
height: var(--contentheight);
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr;
|
||||
}
|
||||
|
||||
header {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
grid-template-areas: "logo name" "logo company";
|
||||
gap: var(--padding);
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
padding-bottom: var(--padding);
|
||||
border-bottom: 1mm solid black;
|
||||
margin-bottom: var(--padding);
|
||||
}
|
||||
|
||||
header .logo {
|
||||
grid-area: logo;
|
||||
height: var(--logoheight);
|
||||
width: auto;
|
||||
}
|
||||
|
||||
header .name {
|
||||
grid-area: name;
|
||||
text-align: right;
|
||||
align-self: end;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
header .company {
|
||||
grid-area: company;
|
||||
text-align: right;
|
||||
align-self: start;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-rows: 1fr auto;
|
||||
grid-template-areas: "qrcode text" "pgpkey pgpkey";
|
||||
column-gap: var(--padding);
|
||||
row-gap: var(--padding);
|
||||
}
|
||||
|
||||
main .qrcode {
|
||||
grid-area: qrcode;
|
||||
aspect-ratio: 1 / 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
main .text {
|
||||
grid-area: text;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
grid-template-areas: "address-prefix address" "info-prefix info";
|
||||
gap: var(--padding);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main .text .address-prefix {
|
||||
grid-area: address-prefix;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
main .text .address {
|
||||
grid-area: address;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
main .text .info-prefix {
|
||||
grid-area: info-prefix;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
main .text .info {
|
||||
grid-area: info;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
main .pgpkey {
|
||||
grid-area: pgpkey;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div class="paper">
|
||||
<div class="content">
|
||||
<header>
|
||||
<div class="logo">
|
||||
<img src="marc.png" alt="Marc" />
|
||||
</div>
|
||||
<div class="name">Name</div>
|
||||
<div class="company">Company</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="qrcode">QR</div>
|
||||
<div class="text">
|
||||
<div class="address-prefix">📍</div>
|
||||
<div class="address">address line 1<br />address line 2</div>
|
||||
<div class="info-prefix">🖁 tel:<br />✉ mailto:<br />⌂ https://</div>
|
||||
<div class="info">+41 76 123 45 67<br />email@example.com<br />website.com</div>
|
||||
</div>
|
||||
<div class="pgpkey">pgp</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 766 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Reference in New Issue
Block a user