Add support for WhatsApp links

See "How to use click to chat": "Create your own link"
 in WhatsApp Help Center
 <https://faq.whatsapp.com/5913398998672934#create-your-own-link>.
This commit is contained in:
Jean-Philippe Leb┼ôuf 2025-02-09 18:03:57 +01:00 committed by Jean-Philippe Lebœuf
parent 964f99d3f1
commit 22dd384b38
4 changed files with 23 additions and 0 deletions

View file

@ -272,6 +272,20 @@
\StrDel{\@teluri}{)}[\@teluri]%
}
% Defines writer's WhatsApp (optional)
% Usage: \whatsapp{<mobile number>}
\newcommand*{\whatsapp}[1]
{
\def\@whatsapp{#1}
\def\@wameuri{https://wa.me/\@whatsapp}
% Strip unwanted characters
\StrDel{\@wameuri}{ }[\@wameuri]%
\StrDel{\@wameuri}{+}[\@wameuri]%
\StrDel{\@wameuri}{-}[\@wameuri]%
\StrDel{\@wameuri}{(}[\@wameuri]%
\StrDel{\@wameuri}{)}[\@wameuri]%
}
% Defines writer's email (optional)
% Usage: \email{<email address>}
\newcommand*{\email}[1]{\def\@email{#1}}
@ -488,6 +502,12 @@
\href{\@teluri}{\faMobile\acvHeaderIconSep\@mobile}%
\setbool{isstart}{false}%
}%
\ifthenelse{\isundefined{\@whatsapp}}%
{}%
{%
\ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
\href{\@wameuri}{\faWhatsappSquare\acvHeaderIconSep\@whatsapp}%
}%
\ifthenelse{\isundefined{\@email}}%
{}%
{%

View file

@ -56,6 +56,7 @@
\address{235, World Cup buk-ro, Mapo-gu, Seoul, 03936, Republic of Korea}
\mobile{(+82) 10-9030-1843}
%\whatsapp{(+82) 10-9030-1843}
\email{posquit0.bj@gmail.com}
%\dateofbirth{January 1st, 1970}
\homepage{www.posquit0.com}

View file

@ -56,6 +56,7 @@
\address{235, World Cup buk-ro, Mapo-gu, Seoul, 03936, Republic of Korea}
\mobile{(+82) 10-9030-1843}
%\whatsapp{(+82) 10-9030-1843}
\email{posquit0.bj@gmail.com}
%\dateofbirth{January 1st, 1970}
\homepage{www.posquit0.com}

View file

@ -56,6 +56,7 @@
\address{235, World Cup buk-ro, Mapo-gu, Seoul, 03936, Republic of Korea}
\mobile{(+82) 10-9030-1843}
%\whatsapp{(+82) 10-9030-1843}
\email{posquit0.bj@gmail.com}
%\dateofbirth{January 1st, 1970}
\homepage{www.posquit0.com}