From bddcb5971a89b9b80a48130de1aad50e22de2c0f Mon Sep 17 00:00:00 2001 From: Sina Atalay <79940989+sinaatalay@users.noreply.github.com> Date: Mon, 8 Apr 2024 00:29:17 +0000 Subject: [PATCH] engineeringresumes: finalize --- .../engineeringresumes/EducationEntry.j2.tex | 14 ++------ .../engineeringresumes/ExperienceEntry.j2.tex | 14 ++------ .../themes/engineeringresumes/Header.j2.tex | 8 ++--- .../engineeringresumes/NormalEntry.j2.tex | 12 +------ .../themes/engineeringresumes/Preamble.j2.tex | 16 +++++---- .../PublicationEntry.j2.tex | 8 ++--- .../themes/engineeringresumes/__init__.py | 33 +++++++++++++++++++ 7 files changed, 54 insertions(+), 51 deletions(-) diff --git a/rendercv/themes/engineeringresumes/EducationEntry.j2.tex b/rendercv/themes/engineeringresumes/EducationEntry.j2.tex index 12ae21c..952735a 100644 --- a/rendercv/themes/engineeringresumes/EducationEntry.j2.tex +++ b/rendercv/themes/engineeringresumes/EducationEntry.j2.tex @@ -2,14 +2,8 @@ \vspace{<>} ((* endif *)) -((* if entry.date_string == "" *)) \begin{onecolentry} -((* else *)) -\begin{twocolentry}{ - <> -} -((* endif *)) - \textbf{<>}, ((* if entry.degree *))<> in ((* endif *))<>((* if entry.location *)) -- <>((* endif *)) + \textbf{<>}, ((* if entry.degree *))<> in ((* endif *))<>((* if entry.location *)) -- <>((* endif *)) \hfill <> ((* for item in entry.highlights *)) ((* if loop.first *)) \begin{highlights} @@ -19,8 +13,4 @@ \end{highlights} ((* endif *)) ((* endfor *)) -((* if entry.date_string == "" *)) -\end{onecolentry} -((* else *)) -\end{twocolentry} -((* endif *)) \ No newline at end of file +\end{onecolentry} \ No newline at end of file diff --git a/rendercv/themes/engineeringresumes/ExperienceEntry.j2.tex b/rendercv/themes/engineeringresumes/ExperienceEntry.j2.tex index 7f2a1d0..f39e404 100644 --- a/rendercv/themes/engineeringresumes/ExperienceEntry.j2.tex +++ b/rendercv/themes/engineeringresumes/ExperienceEntry.j2.tex @@ -2,14 +2,8 @@ \vspace{<>} ((* endif *)) -((* if entry.date_string == "" *)) \begin{onecolentry} -((* else *)) -\begin{twocolentry}{ - <> -} -((* endif *)) - \textbf{<>}, <>((* if entry.location *)) -- <>((* endif *)) + \textbf{<>}, <>((* if entry.location *)) -- <>((* endif *)) \hfill <> ((* for item in entry.highlights *)) ((* if loop.first *)) \begin{highlights} @@ -19,8 +13,4 @@ \end{highlights} ((* endif *)) ((* endfor *)) -((* if entry.date_string == "" *)) -\end{onecolentry} -((* else *)) -\end{twocolentry} -((* endif *)) \ No newline at end of file +\end{onecolentry} \ No newline at end of file diff --git a/rendercv/themes/engineeringresumes/Header.j2.tex b/rendercv/themes/engineeringresumes/Header.j2.tex index 747b204..ab50529 100644 --- a/rendercv/themes/engineeringresumes/Header.j2.tex +++ b/rendercv/themes/engineeringresumes/Header.j2.tex @@ -10,11 +10,11 @@ \normalsize ((* if cv.phone *)) - \mbox{\hrefWithoutArrow{<>}{\color{black}{\footnotesize\faPhone*}\hspace*{0.13cm}<>}} + \mbox{\href{<>}{\color{black}{\footnotesize\faPhone*}\hspace*{0.13cm}<>}} \hspace*{<>} ((* endif *)) ((* if cv.email *)) - \mbox{\hrefWithoutArrow{mailto:<>}{\color{black}{\small\faEnvelope[regular]}\hspace*{0.13cm}<>}} + \mbox{\href{mailto:<>}{\color{black}{\small\faEnvelope[regular]}\hspace*{0.13cm}<>}} \hspace*{<>} ((* endif *)) ((* if cv.location *)) @@ -22,7 +22,7 @@ \hspace*{<>} ((* endif *)) ((* if cv.website *)) - \mbox{\hrefWithoutArrow{<>}{\color{black}{\small\faLink}\hspace*{0.13cm}<>}} + \mbox{\href{<>}{\color{black}{\small\faLink}\hspace*{0.13cm}<>}} \hspace*{<>} ((* endif *)) ((* @@ -37,7 +37,7 @@ ((* if cv.social_networks *)) ((* for network in cv.social_networks *)) ((* if network.network in icon_dictionary *)) - \mbox{\hrefWithoutArrow{<>}{\color{black}{\small<>}\hspace*{0.13cm}<>}} + \mbox{\href{<>}{\color{black}{\small<>}\hspace*{0.13cm}<>}} \hspace*{<>} ((* endif *)) ((* endfor *)) diff --git a/rendercv/themes/engineeringresumes/NormalEntry.j2.tex b/rendercv/themes/engineeringresumes/NormalEntry.j2.tex index 079e97e..ed1b6db 100644 --- a/rendercv/themes/engineeringresumes/NormalEntry.j2.tex +++ b/rendercv/themes/engineeringresumes/NormalEntry.j2.tex @@ -2,14 +2,8 @@ \vspace{<>} ((* endif *)) -((* if entry.date_string == "" *)) \begin{onecolentry} -((* else *)) -\begin{twocolentry}{ - <> -} -((* endif *)) - \textbf{<>}((* if entry.location *)) -- <>((* endif *)) + \textbf{<>}((* if entry.location *)) -- <>((* endif *)) \hfill <> ((* for item in entry.highlights *)) ((* if loop.first *)) \begin{highlights} @@ -19,8 +13,4 @@ \end{highlights} ((* endif *)) ((* endfor *)) -((* if entry.date_string == "" *)) \end{onecolentry} -((* else *)) -\end{twocolentry} -((* endif *)) \ No newline at end of file diff --git a/rendercv/themes/engineeringresumes/Preamble.j2.tex b/rendercv/themes/engineeringresumes/Preamble.j2.tex index f3295b3..c5447b5 100644 --- a/rendercv/themes/engineeringresumes/Preamble.j2.tex +++ b/rendercv/themes/engineeringresumes/Preamble.j2.tex @@ -68,7 +68,7 @@ \titlespacing{\section}{ % left space: - 0pt + -1pt }{ % top space: <> @@ -88,6 +88,8 @@ ] }{ \end{itemize} + + \vspace{-0.20cm} } % new environment for highlights @@ -104,7 +106,7 @@ \newenvironment{twocolentry}[2][]{ \onecolentry \def\secondColumn{#2} - \setcolumnwidth{\fill, 4.2cm} + \setcolumnwidth{\fill, <>} \begin{paracol}{2} }{ \switchcolumn \raggedleft \secondColumn @@ -115,7 +117,7 @@ \newenvironment{threecolentry}[3][]{ \onecolentry \def\thirdColumn{#3} - \setcolumnwidth{1cm, \fill, 4.2cm} + \setcolumnwidth{<>, \fill, <>} \begin{paracol}{3} \raggedright #2 \switchcolumn }{ @@ -141,7 +143,7 @@ }% }% -% save the original href command in a new command: -\let\hrefWithoutArrow\href - % new command for external links: -\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\ifthenelse{\equal{#2}{}}{ }{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}} \ No newline at end of file +% % save the original href command in a new command: +% \let\hrefWithoutArrow\href +% % new command for external links: +% \renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\ifthenelse{\equal{#2}{}}{ }{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}} \ No newline at end of file diff --git a/rendercv/themes/engineeringresumes/PublicationEntry.j2.tex b/rendercv/themes/engineeringresumes/PublicationEntry.j2.tex index 8f0c0d8..ff87f59 100644 --- a/rendercv/themes/engineeringresumes/PublicationEntry.j2.tex +++ b/rendercv/themes/engineeringresumes/PublicationEntry.j2.tex @@ -2,10 +2,8 @@ \vspace{<>} ((* endif *)) -\begin{twocolentry}{ - <> -} - \textbf{<>} +\begin{onecolentry} + \textbf{<>} \hfill <> \vspace{<>} @@ -23,4 +21,4 @@ ((*- endif -*)) ((*- if entry.doi and entry.journal *)))((* endif -*)) -\end{twocolentry} +\end{onecolentry} diff --git a/rendercv/themes/engineeringresumes/__init__.py b/rendercv/themes/engineeringresumes/__init__.py index fbf0c19..eb40f25 100644 --- a/rendercv/themes/engineeringresumes/__init__.py +++ b/rendercv/themes/engineeringresumes/__init__.py @@ -84,6 +84,39 @@ class EngineeringresumesThemeOptions(ThemeOptions): " 25 pt." ), ) + color: pydantic_color.Color = pydantic.Field( + default="rgb(0,0,0)", + validate_default=True, + title="Primary Color", + description=( + "The primary color of the theme. \nThe color can be specified either with" + " their [name](https://www.w3.org/TR/SVG11/types.html#ColorKeywords)," + " hexadecimal value, RGB value, or HSL value. The default value is" + " rgb(0,0,0)." + ), + examples=["Black", "7fffd4", "rgb(0,79,144)", "hsl(270, 60%, 70%)"], + ) + disable_page_numbering: bool = pydantic.Field( + default=True, + title="Disable Page Numbering", + description=( + "If this option is set to true, then the page numbering will be disabled." + " The default value is true." + ), + ) + show_last_updated_date: bool = pydantic.Field( + default=False, + title="Show Last Updated Date", + description=( + "If this option is set to true, then the last updated date will be shown" + " in the header. The default value is false." + ), + ) + text_alignment: Literal["left-aligned", "justified", "justified-with-no-hyphenation"] = pydantic.Field( + default="left-aligned", + title="Text Alignment", + description="The alignment of the text. The default value is left-aligned.", + ) margins: MarginsForEngineeringresumes = pydantic.Field( default=MarginsForEngineeringresumes(), title="Margins",