engineeringresumes: start working on a new theme

This commit is contained in:
Sina Atalay 2024-03-29 19:07:34 +01:00
parent 9f3bc2e922
commit d0840f2da6
12 changed files with 240 additions and 0 deletions

View File

@ -0,0 +1,11 @@
((* if not is_first_entry *))
\vspace{<<design.margins.entry_area.vertical_between>>}
((* endif *))
\begingroup((* if design.text_alignment == "left-aligned" *))\raggedright((* endif *))
\leftskip=<<design.margins.entry_area.left_and_right>>
\advance\csname @rightskip\endcsname <<design.margins.entry_area.left_and_right>>
\advance\rightskip <<design.margins.entry_area.left_and_right>>
\textbullet \hspace{3pt} <<entry.bullet>>
\par\endgroup

View File

@ -0,0 +1 @@
\textbf{<<entry.institution>>} -- \textit{((* if entry.degree *))<<entry.degree>> in ((* endif *))<<entry.area>>((* if entry.location))} \hfill XXXX

View File

@ -0,0 +1,10 @@
\cventry{
((*- if design.show_only_years *))<<-entry.date_string_only_years->>((* else *))<<-entry.date_string->>((* endif -*))
}{\textbf{<<entry.company>>}}{
<<-entry.position->>
}{
<<-entry.location->>
}{}{}
((* for item in entry.highlights *))
\cvlistitem{<<item>>}
((* endfor *))

View File

@ -0,0 +1,11 @@
((* if cv.name is not none *))
\maketitle
((* endif *))
% save the original href command in a new command:
\let\hrefWithoutArrow\href
% new command for external links:
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\mbox{\color{color1} #2 \raisebox{.15ex}{\footnotesize \faExternalLink*}}}}
\hypersetup{pdftitle={<<cv.name>>'s CV}}

View File

@ -0,0 +1,10 @@
\cventry{
((*- if design.show_only_years *))<<-entry.date_string_only_years->>((* else *))<<-entry.date_string->>((* endif -*))
}{
<<-entry.name->>
}{
<<-entry.location->>
}{}{}{}
((* for item in entry.highlights *))
\cvlistitem{<<item>>}
((* endfor *))

View File

@ -0,0 +1,2 @@
\textbf{<<entry.label>>:} <<entry.details>>

View File

@ -0,0 +1,105 @@
\documentclass[<<design.font_size>>, <<design.page_size>>]{article}
% Packages:
\usepackage[
ignoreheadfoot, % set margins without considering header and footer
top=<<design.margins.page.top>>, % seperation between body and page edge from the top
bottom=<<design.margins.page.bottom>>, % seperation between body and page edge from the bottom
left=<<design.margins.page.left>>, % seperation between body and page edge from the left
right=<<design.margins.page.right>>, % seperation between body and page edge from the right
footskip=<<design.margins.page.bottom|divide_length_by(2)>>, % seperation between body and footer
% showframe % for debugging
]{geometry} % for adjusting page geometry
\usepackage{titlesec} % for customizing section titles
\usepackage[dvipsnames]{xcolor} % for coloring text
\definecolor{primaryColor}{RGB}{<<design.color.as_rgb_tuple()|join(", ")>>} % define primary color
\usepackage{enumitem} % for customizing lists
\usepackage{fontawesome5} % for using icons
\usepackage{amsmath} % for math
\usepackage[
pdftitle={<<cv.name>>'s CV},
pdfauthor={<<cv.name>>},
colorlinks=true,
urlcolor=primaryColor
]{hyperref} % for links, metadata and bookmarks
\usepackage[pscoord]{eso-pic} % for floating text on the page
\usepackage{calc} % for calculating lengths
\usepackage{bookmark} % for bookmarks
\usepackage{lastpage} % for getting the total number of pages
\usepackage{charter} % for using charter font
\usepackage{ifthen}
% Some settings:
\pagestyle{empty} % no header or footer
\setcounter{secnumdepth}{0} % no section numbering
\setlength{\parindent}{0pt} % no indentation
\setlength{\topskip}{0pt} % no top skip
((* if design.disable_page_numbering *))
\pagenumbering{gobble} % no page numbering
((* else *))
((* set page_numbering_style_placeholders = {
"NAME": cv.name,
"PAGE_NUMBER": "\\thepage{}",
"TOTAL_PAGES": "\pageref*{LastPage}"
} *))
\makeatletter
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle
\patchcmd{\ps@customFooterStyle}{\thepage}{
\color{gray}\textit{\small <<design.page_numbering_style|replace_placeholders_with_actual_values(page_numbering_style_placeholders)>>}
}{}{} % replace number by desired string
\makeatother
\pagestyle{customFooterStyle}
((* endif *))
\titleformat{\section}{\bfseries\large}{}{0pt}{}[\vspace{1pt}\titlerule]
\titlespacing{\section}{
% left space:
0pt
}{
% top space:
<<design.margins.section_title.top>>
}{
% bottom space:
<<design.margins.section_title.bottom>>
} % section title spacing
\renewcommand\labelitemi{$\vcenter{\hbox{\small$\bullet$}}$}
\newenvironment{highlights}{
\begin{itemize}[
topsep=0pt,
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
after=\vspace{-1\baselineskip},
leftmargin=<<design.margins.highlights_area.left>> + 3pt
]
}{
\end{itemize}
} % new environment for highlights
\newenvironment{header}{
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
}{
\par\kern\topsep
} % new environment for the header
\newcommand{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>}
\AddToShipoutPictureFG*{% Add <stuff> to current page foreground
\put(
\LenToUnit{\paperwidth-<<design.margins.page.right>>-<<design.margins.entry_area.left_and_right>>+0.05cm},
\LenToUnit{\paperheight-<<design.margins.page.top|divide_length_by(2)>>}
){\vtop{{\null}\makebox[0pt][c]{
\small\color{gray}\textit{Last updated in <<today>>}\hspace{\widthof{Last updated in <<today>>}}
}}}%
}%
}%
% 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*}}}}
% Ensure that generate pdf is machine readable/ATS parsable
\input{glyphtounicode}
\pdfgentounicode=1

View File

@ -0,0 +1,8 @@
\cventry{
<<-entry.date_string->>
}{\textbf{<<entry.title>>}}{
<<-entry.journal->>
}{
((*- if entry.doi != "" -*))\href{<<entry.doi_url>>}{<<entry.doi>>}((*- endif -*))
}{}{}
\cvline{}{\small <<entry.authors|map("make_it_nolinebreak")|join(", ")>>}

View File

@ -0,0 +1 @@
\section{<<section_title>>}

View File

@ -0,0 +1 @@
\cvline{}{<<entry>>}

View File

@ -0,0 +1,80 @@
from typing import Literal
import pydantic
from .. import LaTeXDimension
class ModerncvThemeOptions(pydantic.BaseModel):
"""This class is the data model of the theme options for the moderncv theme."""
model_config = pydantic.ConfigDict(extra="forbid")
theme: Literal["moderncv"]
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"],
)
page_size: Literal["a4paper", "letterpaper"] = pydantic.Field(
default="letterpaper",
title="Page Size",
description='The page size of the CV. The default value is "letterpaper".',
examples=["a4paper", "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",
],
)
date_width: LaTeXDimension = pydantic.Field(
default="3.8 cm",
validate_default=True,
title="Date and Location Column Width",
description='The width of the date column. The default value is "3.8 cm".',
)
content_scale: float = pydantic.Field(
default=0.75,
title="Content Scale",
description=(
"The scale of the content with respect to the page size. The default value"
' is "0.75".'
),
)
show_only_years: bool = pydantic.Field(
default=False,
title="Show Only Years",
description=(
'If "True", only the years will be shown in the date column. The default'
' value is "False".'
),
)
disable_page_numbers: bool = pydantic.Field(
default=False,
title="Disable Page Numbers",
description=(
'If "True", the page numbers will be disabled. The default value is'
' "False".'
),
)