diff --git a/rendercv/themes/sb2nov/EducationEntry.j2.tex b/rendercv/themes/sb2nov/EducationEntry.j2.tex index e69de29..8803537 100644 --- a/rendercv/themes/sb2nov/EducationEntry.j2.tex +++ b/rendercv/themes/sb2nov/EducationEntry.j2.tex @@ -0,0 +1,12 @@ +\resumeSubheading + {<>}{<>} + {((* if entry.degree *))<> in ((* endif *))<>}{<>} +((* for item in entry.highlights *)) + ((* if loop.first *)) + \resumeItemListStart + ((* endif *)) + \resumeItem{}{<>} + ((* if loop.last *)) + \resumeItemListEnd + ((* endif *)) +((* endfor *)) \ No newline at end of file diff --git a/rendercv/themes/sb2nov/ExperienceEntry.j2.tex b/rendercv/themes/sb2nov/ExperienceEntry.j2.tex index e69de29..269affc 100644 --- a/rendercv/themes/sb2nov/ExperienceEntry.j2.tex +++ b/rendercv/themes/sb2nov/ExperienceEntry.j2.tex @@ -0,0 +1,12 @@ +\resumeSubheading + {<>}{<>} + {<>}{<>} +((* for item in entry.highlights *)) + ((* if loop.first *)) + \resumeItemListStart + ((* endif *)) + \resumeItem{}{<>} + ((* if loop.last *)) + \resumeItemListEnd + ((* endif *)) +((* endfor *)) \ No newline at end of file diff --git a/rendercv/themes/sb2nov/Header.j2.tex b/rendercv/themes/sb2nov/Header.j2.tex index e69de29..027c0b7 100644 --- a/rendercv/themes/sb2nov/Header.j2.tex +++ b/rendercv/themes/sb2nov/Header.j2.tex @@ -0,0 +1,42 @@ +\begin{center} + \textbf{\Huge \scshape <>} \\ \vspace{3pt} + \small + + ((* if cv.phone *)) + \mbox{\href{<>}{{\footnotesize\faPhone*}\hspace{4pt}<>}} + \hspace{<>} + ((* endif *)) + ((* if cv.email *)) + \mbox{\href{mailto:<>}{{\small\faEnvelope[regular]}\hspace{4pt}<>}} + \hspace{<>} + ((* endif *)) + ((* if cv.location *)) + \mbox{{\small\faMapMarker*}\hspace{4pt}<>} + \hspace{<>} + ((* endif *)) + ((* if cv.website *)) + \mbox{\href{<>}{{\small\faLink}\hspace{4pt}<>}} + \hspace{<>} + ((* endif *)) + ((* + set icon_dictionary = { + "LinkedIn": "\\faLinkedinIn", + "GitHub": "\\faGithub", + "Instagram": "\\faInstagram", + "Mastodon": "\\faMastodon", + } + *)) + ((* if cv.social_networks *)) + ((* for network in cv.social_networks *)) + ((* if network.network in icon_dictionary *)) + \mbox{\href{<>}{{\small<>}\hspace{4pt}<>}} + \hspace{<>} + ((* endif *)) + ((* endfor *)) + ((* endif *)) +\end{center} + +% save the original href command in a new command: +\let\hrefWithoutArrow\href + % new command for external links: +\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{#2 \raisebox{.15ex}{\footnotesize \faExternalLink*}}}} \ No newline at end of file diff --git a/rendercv/themes/sb2nov/NormalEntry.j2.tex b/rendercv/themes/sb2nov/NormalEntry.j2.tex index e69de29..66d29d7 100644 --- a/rendercv/themes/sb2nov/NormalEntry.j2.tex +++ b/rendercv/themes/sb2nov/NormalEntry.j2.tex @@ -0,0 +1,11 @@ +\resumeNormalSubheading + {<>}{((* if entry.date_string == "" *))<>((* else *))<>((* endif *))} +((* for item in entry.highlights *)) + ((* if loop.first *)) + \resumeItemListStart + ((* endif *)) + \resumeItem{}{<>} + ((* if loop.last *)) + \resumeItemListEnd + ((* endif *)) +((* endfor *)) \ No newline at end of file diff --git a/rendercv/themes/sb2nov/OneLineEntry.j2.tex b/rendercv/themes/sb2nov/OneLineEntry.j2.tex index e69de29..3117c9f 100644 --- a/rendercv/themes/sb2nov/OneLineEntry.j2.tex +++ b/rendercv/themes/sb2nov/OneLineEntry.j2.tex @@ -0,0 +1,2 @@ +\resumeSubItem{<>} + {<>} \ No newline at end of file diff --git a/rendercv/themes/sb2nov/Preamble.j2.tex b/rendercv/themes/sb2nov/Preamble.j2.tex index d0ae6cf..dadf66f 100644 --- a/rendercv/themes/sb2nov/Preamble.j2.tex +++ b/rendercv/themes/sb2nov/Preamble.j2.tex @@ -17,6 +17,9 @@ \usepackage{fancyhdr} \usepackage[english]{babel} \usepackage{tabularx} +\usepackage{ifthen} +\usepackage{enumitem} +\usepackage{fontawesome5} \input{glyphtounicode} \pagestyle{fancy} @@ -46,34 +49,40 @@ % Ensure that generate pdf is machine readable/ATS parsable \pdfgentounicode=1 +\setlist{rightmargin=5pt} + +\newcolumntype{R}[1]{ + >{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1} +} % right-aligned fixed width column type + %------------------------- % Custom commands \newcommand{\resumeItem}[2]{ \item\small{ - \textbf{#1}{: #2 \vspace{-2pt}} + \ifthenelse{\equal{#1}{}}{#2 \vspace{-2pt}}{\textbf{#1}{: #2 \vspace{-2pt}}} } } % Just in case someone needs a heading that does not need to be in a list -\newcommand{\resumeHeading}[4]{ - \begin{tabular*}{0.99\textwidth}[t]{l@{\extracolsep{\fill}}r} - \textbf{#1} & #2 \\ - \textit{\small#3} & \textit{\small #4} \\ - \end{tabular*}\vspace{-5pt} -} - \newcommand{\resumeSubheading}[4]{ \vspace{-1pt}\item - \begin{tabular*}{0.97\textwidth}[t]{l@{\extracolsep{\fill}}r} - \textbf{#1} & #2 \\ - \textit{\small#3} & \textit{\small #4} \\ - \end{tabular*}\vspace{-5pt} + \begin{tabularx}{0.97\textwidth}[t]{X R{4.1cm}} + \textbf{#1} & \textit{\small\ifthenelse{\equal{#2}{}}{#4}{#2}} \\ + \textit{\small#3} & \textit{\small\ifthenelse{\equal{#2}{}}{}{#4}} \\ + \end{tabularx}\vspace{-5pt} +} + +\newcommand{\resumeNormalSubheading}[2]{ + \vspace{-1pt}\item + \begin{tabularx}{0.97\textwidth}[t]{l@{\extracolsep{\fill}}r} + \textbf{#1} & \textit{\small #2} + \end{tabularx}\vspace{-5pt} } \newcommand{\resumeSubSubheading}[2]{ - \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r} + \begin{tabularx}{0.97\textwidth}{l@{\extracolsep{\fill}}r} \textit{\small#1} & \textit{\small #2} \\ - \end{tabular*}\vspace{-5pt} + \end{tabularx}\vspace{-5pt} } \newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}} @@ -83,4 +92,4 @@ \newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]} \newcommand{\resumeSubHeadingListEnd}{\end{itemize}} \newcommand{\resumeItemListStart}{\begin{itemize}} -\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}} \ No newline at end of file +\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}} diff --git a/rendercv/themes/sb2nov/PublicationEntry.j2.tex b/rendercv/themes/sb2nov/PublicationEntry.j2.tex index e69de29..21be56d 100644 --- a/rendercv/themes/sb2nov/PublicationEntry.j2.tex +++ b/rendercv/themes/sb2nov/PublicationEntry.j2.tex @@ -0,0 +1,6 @@ +\resumeSubheading + {<>}{<>} + {\href{<>}{<>}}{} + \resumeItemListStart + \resumeItem{}{<>} + \resumeItemListEnd \ No newline at end of file diff --git a/rendercv/themes/sb2nov/SectionBeginning.j2.tex b/rendercv/themes/sb2nov/SectionBeginning.j2.tex index e69de29..cde297d 100644 --- a/rendercv/themes/sb2nov/SectionBeginning.j2.tex +++ b/rendercv/themes/sb2nov/SectionBeginning.j2.tex @@ -0,0 +1,2 @@ +\section{<>} + \resumeSubHeadingListStart \ No newline at end of file diff --git a/rendercv/themes/sb2nov/SectionEnding.j2.tex b/rendercv/themes/sb2nov/SectionEnding.j2.tex index e69de29..5247af9 100644 --- a/rendercv/themes/sb2nov/SectionEnding.j2.tex +++ b/rendercv/themes/sb2nov/SectionEnding.j2.tex @@ -0,0 +1 @@ +\resumeSubHeadingListEnd \ No newline at end of file diff --git a/rendercv/themes/sb2nov/TextEntry.j2.tex b/rendercv/themes/sb2nov/TextEntry.j2.tex index e69de29..79b58fa 100644 --- a/rendercv/themes/sb2nov/TextEntry.j2.tex +++ b/rendercv/themes/sb2nov/TextEntry.j2.tex @@ -0,0 +1 @@ +\resumeSubItem{}{<>} \ No newline at end of file diff --git a/rendercv/themes/sb2nov/__init__.py b/rendercv/themes/sb2nov/__init__.py index 1dc8dd9..a504066 100644 --- a/rendercv/themes/sb2nov/__init__.py +++ b/rendercv/themes/sb2nov/__init__.py @@ -17,70 +17,59 @@ class Sb2novThemeOptions(pydantic.BaseModel): model_config = pydantic.ConfigDict(extra="forbid") theme: Literal["sb2nov"] + font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field( default="10pt", title="Font Size", - description='The font size of the CV. The default value is "10pt".', - examples=["10pt", "11pt", "12pt"], + description="The font size of the CV. It can be 10pt, 11pt, or 12pt.", ) page_size: Literal["a4paper", "letterpaper"] = pydantic.Field( default="a4paper", title="Page Size", - description='The page size of the CV. The default value is "a4paper".', - examples=["a4paper", "letterpaper"], + description="The page size of the CV. It can be a4paper or letterpaper.", ) - color: ( - Literal["blue"] - | Literal["black"] - | Literal["burgundy"] - | Literal["green"] - | Literal["grey"] - | Literal["orange"] - | Literal["purple"] - | Literal["red"] - ) = pydantic.Field( - default="blue", - validate_default=True, - title="Primary Color", - description='The primary color of the CV. The default value is "blue".', - examples=[ - "blue", - "black", - "burgundy", - "green", - "grey", - "orange", - "purple", - "red", - ], + disable_page_numbering: bool = pydantic.Field( + default=False, + title="Disable Page Numbering", + description=( + "If this option is set to true, then the page numbering will be disabled." + ), ) - date_width: LaTeXDimension = pydantic.Field( - default="3.8 cm", - validate_default=True, + date_and_location_width: LaTeXDimension = pydantic.Field( + default="4.1 cm", title="Date and Location Column Width", - description='The width of the date column. The default value is "3.8 cm".', + description="The width of the date and location column.", ) - content_scale: float = pydantic.Field( - default=0.75, - title="Content Scale", + space_between_connection_objects: LaTeXDimension = pydantic.Field( + default="0.5 cm", + title="Space Between Connection Objects", description=( - "The scale of the content with respect to the page size. The default value" - ' is "0.75".' + "The space between the connection objects (like phone, email, and website)." ), ) - show_only_years: bool = pydantic.Field( - default=False, - title="Show Only Years", + text_alignment: Literal["left-aligned", "justified"] = pydantic.Field( + default="left-aligned", + title="Text Alignment", + description="The alignment of the text.", + ) + show_timespan_in: list[str] = pydantic.Field( + default=[], + title="Show Time Span in These Sections", description=( - 'If "True", only the years will be shown in the date column. The default' - ' value is "False".' + "The time span will be shown in the date and location column in these" + " sections. The input should be a list of strings." ), ) - disable_page_numbers: bool = pydantic.Field( - default=False, - title="Disable Page Numbers", + show_last_updated_date: bool = pydantic.Field( + default=True, + title="Show Last Updated Date", description=( - 'If "True", the page numbers will be disabled. The default value is' - ' "False".' + "If this option is set to true, then the last updated date will be shown" + " in the header." ), ) + header_font_size: LaTeXDimension = pydantic.Field( + default="30 pt", + title="Header Font Size", + description="The font size of the header (the name of the person).", + )