diff --git a/Makefile b/Makefile index 6fced68..914d4d9 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +color = F44336 build = $(CURDIR)/build src = $(CURDIR)/tex target = $(src)/main.tex @@ -5,15 +6,24 @@ output = $(build)/main.pdf outputen = $(build)/voronind_en.pdf outputru = $(build)/voronind_ru.pdf +export RESUME_COLOR := $(color) + + .PHONY: all -all: clean en ru view +all: clean image en ru view .PHONY: clean clean: @rm -rf $(build) +.PHONY: image +image: + @mkdir -p $(build)/image;\ + cd image/icon;\ + for file in *; do convert "$$file" -fill "#$$RESUME_COLOR" -colorize 100 $(build)/image/"$$file"; done + .PHONY: en -en: +en: image @mkdir -p $(build);\ cd $(src);\ export RESUME_LANG=en;\ @@ -21,7 +31,7 @@ en: mv $(output) $(outputen) .PHONY: ru -ru: +ru: image @mkdir -p $(build);\ cd $(src);\ export RESUME_LANG=ru;\ diff --git a/README.md b/README.md index 7f4cf81..be881de 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ view | View built resumes in default PDF viewer. ## Requirements. This project is built using TeX (LuaLaTeX) on GNU/Linux. +Also ImageMagick is required to color the icons. ### Texlive setup. ```text @@ -31,4 +32,4 @@ When trying to build the project, lualatex may throw missing dependency errors. To install them use `$ tlmgr install $dependency`. ## TODO. -- Change icon color programmatically. +[x] Change icon color programmatically. diff --git a/image/cake.png b/image/icon/ic_cake.png similarity index 53% rename from image/cake.png rename to image/icon/ic_cake.png index 789d859..812b81a 100644 Binary files a/image/cake.png and b/image/icon/ic_cake.png differ diff --git a/image/call.png b/image/icon/ic_call.png similarity index 57% rename from image/call.png rename to image/icon/ic_call.png index 4096bdf..73c3117 100644 Binary files a/image/call.png and b/image/icon/ic_call.png differ diff --git a/image/email.png b/image/icon/ic_email.png similarity index 62% rename from image/email.png rename to image/icon/ic_email.png index 9075af1..7466bfc 100644 Binary files a/image/email.png and b/image/icon/ic_email.png differ diff --git a/image/link.png b/image/icon/ic_link.png similarity index 60% rename from image/link.png rename to image/icon/ic_link.png index fc4cf29..1f5a38d 100644 Binary files a/image/link.png and b/image/icon/ic_link.png differ diff --git a/image/location.png b/image/icon/ic_location.png similarity index 56% rename from image/location.png rename to image/icon/ic_location.png index cae94ef..ae14e2e 100644 Binary files a/image/location.png and b/image/icon/ic_location.png differ diff --git a/image/icon/ic_radio_checked.png b/image/icon/ic_radio_checked.png new file mode 100644 index 0000000..5c89692 Binary files /dev/null and b/image/icon/ic_radio_checked.png differ diff --git a/image/radio_unchecked.png b/image/icon/ic_radio_unchecked.png similarity index 54% rename from image/radio_unchecked.png rename to image/icon/ic_radio_unchecked.png index ea87708..d0dc651 100644 Binary files a/image/radio_unchecked.png and b/image/icon/ic_radio_unchecked.png differ diff --git a/image/radio_checked.png b/image/radio_checked.png deleted file mode 100644 index e92d3bc..0000000 Binary files a/image/radio_checked.png and /dev/null differ diff --git a/tex/main.tex b/tex/main.tex index 5f4492a..db5e70a 100644 --- a/tex/main.tex +++ b/tex/main.tex @@ -36,7 +36,8 @@ linktoc = all } -\graphicspath{ {../image} } % specify where images are stored. +% specify where images are stored. +\graphicspath{ {../image}{../build/image} } \babelprovide[import]{russian} % add russian support. \babelfont{rm}{montserrat} % use custom serif font for english. diff --git a/tex/page/title.tex b/tex/page/title.tex index c6013b5..23fc7b3 100644 --- a/tex/page/title.tex +++ b/tex/page/title.tex @@ -11,18 +11,18 @@ \vspace{4mm} \newline % location. - \sicon{location} + \sicon{ic_location} \stext{\location} \vspace{2mm} \newline % birthday, email & phone number. - \sicon{cake} + \sicon{ic_cake} \stext{\birthday} \hspace{2mm} - \sicon{email} + \sicon{ic_email} \stext{\href{mailto:\email}{\ \email}} \hspace{2mm} - \sicon{call} + \sicon{ic_call} \stext{\href{tel:\phone}{\phone}} \end{minipage} diff --git a/tex/style.tex b/tex/style.tex index 286fb95..12606f2 100644 --- a/tex/style.tex +++ b/tex/style.tex @@ -1,8 +1,9 @@ % colors. +\getenv[\colormain]{RESUME_COLOR} \definecolor{black}{RGB}{0,0,0} \definecolor{white}{RGB}{255,255,255} % default white. \definecolor{link} {RGB}{46,116,181} % web link. -\definecolor{main} {RGB}{244,67,54} % main. +\definecolor{main} {HTML}{\colormain} % main. \definecolor{gray} {RGB}{127,127,127} % gray. \definecolor{lgray}{RGB}{229,229,229} % light gray. \definecolor{ref} {RGB}{53,82,105} % reference color. @@ -53,7 +54,7 @@ \newcommand{\sccomment} [1]{\textcolor{code_comment}{#1}} % color code comment. \newcommand{\sjposition}[1]{\stext{#1}} % job position. -\newcommand{\sjlink} [1]{\sicon{link}\ \href{https://#1}{\sitallic{#1}}} % job webpage. +\newcommand{\sjlink} [1]{\sicon{ic_link}\ \href{https://#1}{\sitallic{#1}}} % job webpage. \newcommand{\sjplace}[2]{\sreset{\ssemibold{#1}}\sreset\hfill\fontsize% {10}{10}\selectfont\textcolor{gray}{(#2)}} % job place. diff --git a/tex/view/radio.tex b/tex/view/radio.tex index 8ede7e0..686fecf 100644 --- a/tex/view/radio.tex +++ b/tex/view/radio.tex @@ -1,7 +1,7 @@ \newcommand{\radio}[1]{% - \ifnum#1>0{\sicon{radio_checked}}\else{\sicon{radio_unchecked}}\fi - \ifnum#1>1{\sicon{radio_checked}}\else{\sicon{radio_unchecked}}\fi - \ifnum#1>2{\sicon{radio_checked}}\else{\sicon{radio_unchecked}}\fi - \ifnum#1>3{\sicon{radio_checked}}\else{\sicon{radio_unchecked}}\fi - \ifnum#1>4{\sicon{radio_checked}}\else{\sicon{radio_unchecked}}\fi + \ifnum#1>0{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi + \ifnum#1>1{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi + \ifnum#1>2{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi + \ifnum#1>3{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi + \ifnum#1>4{\sicon{ic_radio_checked}}\else{\sicon{ic_radio_unchecked}}\fi }