mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
Fold email handling into \social
This commit is contained in:
parent
03b8a43521
commit
8badf2b0dc
14 changed files with 7 additions and 31 deletions
14
moderncv.cls
14
moderncv.cls
|
|
@ -233,10 +233,6 @@
|
|||
% usage: \born{date, place}
|
||||
\newcommand*{\born}[1]{\def\@born{#1}}
|
||||
|
||||
% defines one's email (optional)
|
||||
% usage: \email{<email address>}
|
||||
\newcommand*{\email}[1]{\def\@email{#1}}
|
||||
|
||||
% defines one's home page (optional)
|
||||
% usage: \homepage[<optional protocol>]{<url>}
|
||||
% where <optional protocol> should be either "https" (default) or "http"
|
||||
|
|
@ -257,6 +253,7 @@
|
|||
\def\SplitMyMacro#1/#2{#2}
|
||||
|
||||
% Define links for different social networks
|
||||
\newcommand{\emaillink}[2]{\protect\href{mailto:#2}{#1}}
|
||||
\newcommand{\linkedinlink}[2]{\protect\httpslink[#1]{www.linkedin.com/in/#2}}
|
||||
\newcommand{\xinglink}[2]{\protect\httpslink[#1]{www.xing.com/profile/#2}}
|
||||
\newcommand{\twitterlink}[2]{\protect\httpslink[#1]{twitter.com/#2}}
|
||||
|
|
@ -351,7 +348,7 @@
|
|||
\newcommand*{\mobilephonesymbol} {}
|
||||
\newcommand*{\fixedphonesymbol} {}
|
||||
\newcommand*{\faxphonesymbol} {}
|
||||
\newcommand*{\emailsymbol} {}
|
||||
\newcommand*{\emailsocialsymbol} {}
|
||||
\newcommand*{\homepagesymbol} {}
|
||||
\newcommand*{\linkedinsocialsymbol} {}
|
||||
\newcommand*{\xingsocialsymbol} {}
|
||||
|
|
@ -610,13 +607,6 @@
|
|||
{\href{https://#2}{#2}}%
|
||||
{\href{https://#2}{#1}}}}
|
||||
|
||||
% makes an email hyperlink
|
||||
% usage: \emaillink[optional text]{link}
|
||||
\newcommand*{\emaillink}[2][]{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{mailto:#2}{#2}}%
|
||||
{\href{mailto:#2}{#1}}}
|
||||
|
||||
% makes a tel hyperlink
|
||||
% usage: \tellink[optional text]{link}
|
||||
\newcommand*{\tellink}[2][]{%
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\addtofoot{\bornsymbol\@born}\flushfoot\@firstfootelementtrue\\}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
@ -121,7 +120,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\addtofoot{\bornsymbol\@born}\flushfoot\@firstfootelementtrue\\}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@
|
|||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol\@born}%
|
||||
\phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
|
||||
|
|
@ -177,7 +176,6 @@
|
|||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\addtomakeheaddetails{\bornsymbol\@born}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\addtomakeheaddetails{\bornsymbol\@born}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
@ -156,7 +155,6 @@
|
|||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\makenewline\hbox to 1.0em{\bornsymbol}~\@born}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
@ -161,7 +160,6 @@
|
|||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol~\@born}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\makenewline\csname\collectionloopkey phonesymbol\endcsname~\collectionloopitem}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol~\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
@ -157,7 +156,6 @@
|
|||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@
|
|||
\ifthenelse{\isundefined{\@born}}{}{\addtomakeheaddetails{\bornsymbol\@born}}%
|
||||
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
|
||||
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
|
||||
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol%
|
||||
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
|
||||
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@
|
|||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol\@born}%
|
||||
\phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
|
||||
\socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
|
||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
|
||||
|
|
@ -198,7 +197,6 @@
|
|||
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
|
||||
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
|
||||
\phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
|
||||
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
|
||||
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
|
||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
|
||||
\end{tabular}%
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
%\newcommand*{\mobilephonesymbol} {}
|
||||
%\newcommand*{\fixedphonesymbol} {}
|
||||
%\newcommand*{\faxphonesymbol} {}
|
||||
%\newcommand*{\emailsymbol} {}
|
||||
%\newcommand*{\emailsocialsymbol} {}
|
||||
%\newcommand*{\homepagesymbol} {}
|
||||
%\newcommand*{\linkedinsocialsymbol} {}
|
||||
%\newcommand*{\xingsocialsymbol} {}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
\renewcommand*{\mobilephonesymbol} {{\color{mobilephone}\small\faMobile*}~} % alternative: \faMobile (solid style)
|
||||
\renewcommand*{\fixedphonesymbol} {{\color{fixedphone}\small\faPhone*}~} % alternative: \faPhone (reversed)
|
||||
\renewcommand*{\faxphonesymbol} {{\color{faxphone}\small\faFax}~} % alternative: \faPrint
|
||||
\renewcommand*{\emailsymbol} {{\color{email}\small\faEnvelope[regular]}~} % alternative: \faInbox, \faEnvelope (solid style)
|
||||
\renewcommand*{\emailsocialsymbol} {{\color{email}\small\faEnvelope[regular]}~} % alternative: \faInbox, \faEnvelope (solid style)
|
||||
\renewcommand*{\homepagesymbol} {{\color{homepage}\small\faGlobeAmericas}~} % alternative: \faHome, \faGlobe, \faGlobeEurope, \faGlobeAfrica, \faGlobeAsia
|
||||
\renewcommand*{\linkedinsocialsymbol} {{\color{linkedin}\small\faLinkedinIn}~} % alternative: \faLinkedin
|
||||
\renewcommand*{\xingsocialsymbol} {{\color{xing}\small\faXing}~} % alternative: \faXingSquare
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
\renewcommand*{\mobilephonesymbol} {\textbf{M}~}
|
||||
\renewcommand*{\fixedphonesymbol} {\textbf{T}~}
|
||||
\renewcommand*{\faxphonesymbol} {\textbf{F}~}
|
||||
\renewcommand*{\emailsymbol} {\textbf{E}~}
|
||||
\renewcommand*{\emailsocialsymbol} {\textbf{E}~}
|
||||
\renewcommand*{\homepagesymbol} {\textbf{W}~}
|
||||
\renewcommand*{\linkedinsocialsymbol} {\textbf{in}~}
|
||||
\renewcommand*{\xingsocialsymbol} {\textbf{xi}~}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
\renewcommand*{\mobilephonesymbol} {\marvosymbol{72}~}
|
||||
\renewcommand*{\fixedphonesymbol} {\marvosymbol{84}~}
|
||||
\renewcommand*{\faxphonesymbol} {\marvosymbol{117}~}
|
||||
\renewcommand*{\emailsymbol} {\marvosymbol{66}~}
|
||||
\renewcommand*{\emailsocialsymbol} {\marvosymbol{66}~}
|
||||
\renewcommand*{\homepagesymbol} {{\Large\marvosymbol{205}}~}
|
||||
|
||||
\endinput
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
\phone[mobile]{+1~(234)~567~890} % optional, remove / comment the line if not wanted; the optional "type" of the phone can be "mobile" (default), "fixed" or "fax"
|
||||
\phone[fixed]{+2~(345)~678~901}
|
||||
\phone[fax]{+3~(456)~789~012}
|
||||
\email{john@doe.org} % optional, remove / comment the line if not wanted
|
||||
\social[email]{john@doe.org} % optional, remove / comment the line if not wanted
|
||||
\homepage{www.johndoe.com} % optional, remove / comment the line if not wanted
|
||||
|
||||
% Social icons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue