From 37e504cf356df2055dd3134c2f3fa1d9a3c7252b Mon Sep 17 00:00:00 2001 From: merkrafter Date: Sun, 9 Aug 2020 10:26:13 +0200 Subject: [PATCH] Make https default protocol #7 (#9) Signed-off-by: merkrafter --- moderncv.cls | 19 +++++++++++++------ moderncvfooti.sty | 4 ++-- moderncvheadi.sty | 4 ++-- moderncvheadii.sty | 2 +- moderncvheadiii.sty | 2 +- moderncvheadiv.sty | 4 ++-- moderncvheadv.sty | 4 ++-- moderncvheadvi.sty | 2 +- 8 files changed, 24 insertions(+), 17 deletions(-) diff --git a/moderncv.cls b/moderncv.cls index f627a31..786272e 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -262,14 +262,14 @@ \NewDocumentCommand{\social}{O{}O{}m}{% \ifthenelse{\equal{#2}{}}% {% - \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httplink[#3]{www.linkedin.com/in/#3}}} {}% - \ifthenelse{\equal{#1}{xing}} {\collectionadd[xing]{socials} {\protect\httplink[#3]{www.xing.com/profile/#3}}}{}% - \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}} {}% - \ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httplink[#3]{www.github.com/#3}}} {}% - \ifthenelse{\equal{#1}{gitlab}} {\collectionadd[gitlab]{socials} {\protect\httplink[#3]{www.gitlab.com/#3}}} {}% + \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httpslink[#3]{www.linkedin.com/in/#3}}} {}% + \ifthenelse{\equal{#1}{xing}} {\collectionadd[xing]{socials} {\protect\httpslink[#3]{www.xing.com/profile/#3}}}{}% + \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httpslink[#3]{www.twitter.com/#3}}} {}% + \ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httpslink[#3]{www.github.com/#3}}} {}% + \ifthenelse{\equal{#1}{gitlab}} {\collectionadd[gitlab]{socials} {\protect\httpslink[#3]{www.gitlab.com/#3}}} {}% \ifthenelse{\equal{#1}{skype}} {\collectionadd[skype]{socials} {#3}} {}% } - {\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}} + {\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}} % defines additional personal information (optional) % usage: \extrainfo{} @@ -507,6 +507,13 @@ {\href{http://#2}{#2}}% {\href{http://#2}{#1}}} +% makes a https hyperlink +% usage: \httpslink[optional text]{link} +\newcommand*{\httpslink}[2][]{% + \ifthenelse{\equal{#1}{}}% + {\href{https://#2}{#2}}% + {\href{https://#2}{#1}}} + % makes an email hyperlink % usage: \emaillink[optional text]{link} \newcommand*{\emaillink}[2][]{% diff --git a/moderncvfooti.sty b/moderncvfooti.sty index 1a66d0f..bfc4e2b 100644 --- a/moderncvfooti.sty +++ b/moderncvfooti.sty @@ -88,7 +88,7 @@ \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\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}% @@ -119,7 +119,7 @@ \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\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}% diff --git a/moderncvheadi.sty b/moderncvheadi.sty index 8c9ab97..a3477d4 100644 --- a/moderncvheadi.sty +++ b/moderncvheadi.sty @@ -80,7 +80,7 @@ \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{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}% \end{tabular} @@ -158,7 +158,7 @@ \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\httplink{\@homepage}}% + \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi% \end{minipage}\\[1em] % recipient block diff --git a/moderncvheadii.sty b/moderncvheadii.sty index 2062e98..b6090bb 100644 --- a/moderncvheadii.sty +++ b/moderncvheadii.sty @@ -143,7 +143,7 @@ \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\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}% diff --git a/moderncvheadiii.sty b/moderncvheadiii.sty index 54f86cb..c3227aa 100644 --- a/moderncvheadiii.sty +++ b/moderncvheadiii.sty @@ -92,7 +92,7 @@ \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\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}% diff --git a/moderncvheadiv.sty b/moderncvheadiv.sty index f3ceaf7..69bb498 100644 --- a/moderncvheadiv.sty +++ b/moderncvheadiv.sty @@ -110,7 +110,7 @@ \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}~\httplink{\@homepage}}% + \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httpslink{\@homepage}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi} @@ -156,7 +156,7 @@ \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}~\httplink{\@homepage}}% + \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httpslink{\@homepage}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}}% diff --git a/moderncvheadv.sty b/moderncvheadv.sty index 7a2c15b..7064dd5 100644 --- a/moderncvheadv.sty +++ b/moderncvheadv.sty @@ -82,7 +82,7 @@ \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~\httplink{\@homepage}}% + \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~\httpslink{\@homepage}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \makenewline\csname\collectionloopkey socialsymbol\endcsname~\collectionloopitem}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}\fi}% @@ -140,7 +140,7 @@ \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\httplink{\@homepage}}% + \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi% \end{minipage}\\[1em] % recipient block diff --git a/moderncvheadvi.sty b/moderncvheadvi.sty index 83c1055..804bdaf 100644 --- a/moderncvheadvi.sty +++ b/moderncvheadvi.sty @@ -115,7 +115,7 @@ \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\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}% \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%