Put color definitions in a standalone file #136; add color settings for social icons

This commit is contained in:
WEN Hao 2022-10-01 12:19:58 +08:00 committed by Mark E Fuller
commit 57d6bcf32c
4 changed files with 108 additions and 35 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@
*.log *.log
*.out *.out
*.synctex.gz *.synctex.gz
*.xdv
# template.tex output # template.tex output
# move to *.pdf once manual is done # move to *.pdf once manual is done

35
commons/colors.tex Normal file
View file

@ -0,0 +1,35 @@
%-------------------------------------------------------------------------------
% built-in colors
%-------------------------------------------------------------------------------
\definecolor{black}{RGB}{0, 0, 0}
\definecolor{red}{rgb}{0.95, 0.20, 0.20}
\definecolor{darkgrey}{rgb}{0.45, 0.45, 0.45}
\definecolor{orange}{rgb}{0.95, 0.55, 0.15}
\definecolor{burgundy}{rgb}{0.596078, 0, 0}% 139/255 (0.545098) or 152/255 (0.596078)
\definecolor{purple}{rgb}{0.50, 0.33, 0.80}
\definecolor{lightblue}{rgb}{0.22, 0.45, 0.70}
\definecolor{green}{rgb}{0.35, 0.70, 0.30}
%-------------------------------------------------------------------------------
% default colors
%-------------------------------------------------------------------------------
\colorlet{default-socialicon-color}{darkgrey}
%-------------------------------------------------------------------------------
% colors for social icons
%-------------------------------------------------------------------------------
% \definecolor{weixin}{rgb}{.184, .533, .098}
% \definecolor{linkedin}{HTML}{0a66c2}
% \definecolor{orcid}{HTML}{a6ce39}
% \definecolor{twitter}{RGB}{29, 155, 240}
% \definecolor{facebook}{HTML}{1b74e4}
% TODO: add more colors
%-------------------------------------------------------------------------------
% custom colors
%-------------------------------------------------------------------------------
% \definecolor{tsinghua}{HTML}{791CB5}

View file

@ -18,11 +18,17 @@
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Package for academic icons % Package for academic icons
\RequirePackage{academicons} \RequirePackage{academicons}
\RequirePackage{xcolor}
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% colors % set colors
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
\definecolor{orcid}{HTML}{a6ce39} \input{commons/colors}
\providecolor{orcid}{named}{default-socialicon-color}
\providecolor{researchgate}{named}{default-socialicon-color}
\providecolor{researcherid}{named}{default-socialicon-color}
\providecolor{googlescholar}{named}{default-socialicon-color}
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% all symbols described in moderncv.cls % all symbols described in moderncv.cls
@ -44,9 +50,9 @@
%\newcommand*{\bitbucketsocialsymbol} {} %\newcommand*{\bitbucketsocialsymbol} {}
%\newcommand*{\skypesocialsymbol} {} %\newcommand*{\skypesocialsymbol} {}
\renewcommand*{\orcidsocialsymbol} {{\color{orcid}\small\aiOrcid}~} \renewcommand*{\orcidsocialsymbol} {{\color{orcid}\small\aiOrcid}~}
\renewcommand*{\researchgatesocialsymbol} {{\small\aiResearchGateSquare}~} % alternative: \aiResearchGate \renewcommand*{\researchgatesocialsymbol} {{\color{researchgate}\small\aiResearchGateSquare}~} % alternative: \aiResearchGate
\renewcommand*{\researcheridsocialsymbol} {{\small\aiResearcherIDSquare}~} % alternative: \aiResearcherID \renewcommand*{\researcheridsocialsymbol} {{\color{researcherid}\small\aiResearcherIDSquare}~} % alternative: \aiResearcherID
\renewcommand*{\googlescholarsocialsymbol}{{\small\aiGoogleScholar}~} \renewcommand*{\googlescholarsocialsymbol}{{\color{googlescholar}\raisebox{-1pt}{\large\aiGoogleScholar}}~}
%\newcommand*{\telegramsocialsymbol} {} %\newcommand*{\telegramsocialsymbol} {}
%\newcommand*{\whatsappsocialsymbol} {} %\newcommand*{\whatsappsocialsymbol} {}
%\newcommand*{\matrixsocialsymbol} {} %\newcommand*{\matrixsocialsymbol} {}

View file

@ -17,13 +17,44 @@
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Font Awesome font % Font Awesome font
\RequirePackage{fontawesome5} \RequirePackage{fontawesome5}
\RequirePackage{xcolor}
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% colors % set colors
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
\definecolor{linkedin}{HTML}{0a66c2} \input{commons/colors}
\definecolor{orcid}{HTML}{a6ce39}
\definecolor{twitter}{RGB}{29, 155, 240} \providecolor{address}{named}{default-socialicon-color}
\providecolor{mobilephone}{named}{default-socialicon-color}
\providecolor{fixedphone}{named}{default-socialicon-color}
\providecolor{faxphone}{named}{default-socialicon-color}
\providecolor{email}{named}{default-socialicon-color}
\providecolor{homepage}{named}{default-socialicon-color}
\providecolor{googlescholar}{named}{default-socialicon-color}
\providecolor{linkedin}{named}{default-socialicon-color}
\providecolor{xing}{named}{default-socialicon-color}
\providecolor{twitter}{named}{default-socialicon-color}
\providecolor{mastodon}{named}{default-socialicon-color}
\providecolor{github}{named}{default-socialicon-color}
\providecolor{gitlab}{named}{default-socialicon-color}
\providecolor{stackoverflow}{named}{default-socialicon-color}
\providecolor{bitbucket}{named}{default-socialicon-color}
\providecolor{skype}{named}{default-socialicon-color}
\providecolor{orcid}{named}{default-socialicon-color}
\providecolor{researchgate}{named}{default-socialicon-color}
\providecolor{telegram}{named}{default-socialicon-color}
\providecolor{whatsapp}{named}{default-socialicon-color}
\providecolor{discord}{named}{default-socialicon-color}
\providecolor{twitch}{named}{default-socialicon-color}
\providecolor{youtube}{named}{default-socialicon-color}
\providecolor{tiktok}{named}{default-socialicon-color}
\providecolor{instagram}{named}{default-socialicon-color}
\providecolor{soundcloud}{named}{default-socialicon-color}
\providecolor{steam}{named}{default-socialicon-color}
\providecolor{xbox}{named}{default-socialicon-color}
\providecolor{playstation}{named}{default-socialicon-color}
\providecolor{battlenet}{named}{default-socialicon-color}
\providecolor{born}{named}{default-socialicon-color}
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% all symbols described in moderncv.cls % all symbols described in moderncv.cls
@ -35,39 +66,39 @@
%\renewcommand*{\addresssymbol} {} %\renewcommand*{\addresssymbol} {}
\renewcommand*{\mobilephonesymbol} {{\small\faMobile*}~} % alternative: \faMobile (solid style) \renewcommand*{\mobilephonesymbol} {{\color{mobilephone}\small\faMobile*}~} % alternative: \faMobile (solid style)
\renewcommand*{\fixedphonesymbol} {{\small\faPhone*}~} % alternative: \faPhone (reversed) \renewcommand*{\fixedphonesymbol} {{\color{fixedphone}\small\faPhone*}~} % alternative: \faPhone (reversed)
\renewcommand*{\faxphonesymbol} {{\small\faFax}~} % alternative: \faPrint \renewcommand*{\faxphonesymbol} {{\color{faxphone}\small\faFax}~} % alternative: \faPrint
\renewcommand*{\emailsymbol} {{\small\faEnvelope[regular]}~} % alternative: \faInbox, \faEnvelope (solid style) \renewcommand*{\emailsymbol} {{\color{email}\small\faEnvelope[regular]}~} % alternative: \faInbox, \faEnvelope (solid style)
\renewcommand*{\homepagesymbol} {{\small\faGlobeAmericas}~} % alternative: \faHome, \faGlobe, \faGlobeEurope, \faGlobeAfrica, \faGlobeAsia \renewcommand*{\homepagesymbol} {{\color{homepage}\small\faGlobeAmericas}~} % alternative: \faHome, \faGlobe, \faGlobeEurope, \faGlobeAfrica, \faGlobeAsia
\renewcommand*{\linkedinsocialsymbol} {{\color{linkedin}\small\faLinkedinIn}~} % alternative: \faLinkedin \renewcommand*{\linkedinsocialsymbol} {{\color{linkedin}\small\faLinkedinIn}~} % alternative: \faLinkedin
\renewcommand*{\xingsocialsymbol} {{\small\faXing}~} % alternative: \faXingSquare \renewcommand*{\xingsocialsymbol} {{\color{xing}\small\faXing}~} % alternative: \faXingSquare
\renewcommand*{\twittersocialsymbol} {{\color{twitter}\small\faTwitter}~} % alternative: \faTwitterSquare \renewcommand*{\twittersocialsymbol} {{\color{twitter}\small\faTwitter}~} % alternative: \faTwitterSquare
\renewcommand*{\mastodonsocialsymbol} {{\small\faMastodon}~} \renewcommand*{\mastodonsocialsymbol} {{\color{mastodon}\small\faMastodon}~}
\renewcommand*{\githubsocialsymbol} {{\small\faGithub}~} % alternative: \faGithubSquare, \faGithub* \renewcommand*{\githubsocialsymbol} {{\color{github}\small\faGithub}~} % alternative: \faGithubSquare, \faGithub*
\renewcommand*{\gitlabsocialsymbol} {{\small\faGitlab}~} \renewcommand*{\gitlabsocialsymbol} {{\color{gitlab}\small\faGitlab}~}
\renewcommand*{\stackoverflowsocialsymbol}{{\small\faStackOverflow}~} \renewcommand*{\stackoverflowsocialsymbol}{{\color{stackoverflow}\small\faStackOverflow}~}
\renewcommand*{\bitbucketsocialsymbol} {{\small\faBitbucket}~} \renewcommand*{\bitbucketsocialsymbol} {{\color{bitbucket}\small\faBitbucket}~}
\renewcommand*{\skypesocialsymbol} {{\small\faSkype}~} \renewcommand*{\skypesocialsymbol} {{\color{skype}\small\faSkype}~}
\renewcommand*{\orcidsocialsymbol} {{\color{orcid}\small\faOrcid}~} \renewcommand*{\orcidsocialsymbol} {{\color{orcid}\small\faOrcid}~}
\renewcommand*{\researchgatesocialsymbol} {{\small\faResearchgate}~} \renewcommand*{\researchgatesocialsymbol} {{\color{researchgate}\small\faResearchgate}~}
%\renewcommand*{\researcheridsocialsymbol} {} %\renewcommand*{\researcheridsocialsymbol} {}
%\renewcommand*{\googlescholarsocialsymbol}{} %\renewcommand*{\googlescholarsocialsymbol}{}
\renewcommand*{\telegramsocialsymbol} {{\small\faTelegram}~} \renewcommand*{\telegramsocialsymbol} {{\color{telegram}\small\faTelegram}~}
\renewcommand*{\whatsappsocialsymbol} {{\small\faWhatsapp}~} \renewcommand*{\whatsappsocialsymbol} {{\color{whatsapp}\small\faWhatsapp}~}
\renewcommand*{\discordsocialsymbol} {{\small\faDiscord}~} \renewcommand*{\discordsocialsymbol} {{\color{discord}\small\faDiscord}~}
\renewcommand*{\twitchsocialsymbol} {{\small\faTwitch}~} \renewcommand*{\twitchsocialsymbol} {{\color{twitch}\small\faTwitch}~}
\renewcommand*{\youtubesocialsymbol} {{\small\faYoutube}~} \renewcommand*{\youtubesocialsymbol} {{\color{youtube}\small\faYoutube}~}
\renewcommand*{\tiktoksocialsymbol} {{\small\faTiktok}~} \renewcommand*{\tiktoksocialsymbol} {{\color{tiktok}\small\faTiktok}~}
\renewcommand*{\instagramsocialsymbol} {{\small\faInstagram}~} \renewcommand*{\instagramsocialsymbol} {{\color{instagram}\small\faInstagram}~}
\renewcommand*{\soundcloudsocialsymbol} {{\small\faSoundcloud}~} \renewcommand*{\soundcloudsocialsymbol} {{\color{soundcloud}\small\faSoundcloud}~}
\renewcommand*{\steamsocialsymbol} {{\small\faSteam}~} \renewcommand*{\steamsocialsymbol} {{\color{steam}\small\faSteam}~}
\renewcommand*{\xboxsocialsymbol} {{\small\faXbox}~} \renewcommand*{\xboxsocialsymbol} {{\color{xbox}\small\faXbox}~}
\renewcommand*{\playstationsocialsymbol} {{\small\faPlaystation}~} \renewcommand*{\playstationsocialsymbol} {{\color{playstation}\small\faPlaystation}~}
\renewcommand*{\battlenetsocialsymbol} {{\small\faBattleNet}~} \renewcommand*{\battlenetsocialsymbol} {{\color{battlenet}\small\faBattleNet}~}
%\renewcommand*{\signalsocialsymbol} {} %\renewcommand*{\signalsocialsymbol} {}
%\renewcommand*{\matrixsocialsymbol} {} %\renewcommand*{\matrixsocialsymbol} {}
\renewcommand*{\bornsymbol} {{\small\faAsterisk}~} % alternative: \faBabyCarriage \renewcommand*{\bornsymbol} {{\color{born}\small\faAsterisk}~} % alternative: \faBabyCarriage
\endinput \endinput