diff --git a/rendercv/data_model.py b/rendercv/data_model.py index 9a3bf88..c1525d5 100644 --- a/rendercv/data_model.py +++ b/rendercv/data_model.py @@ -417,6 +417,26 @@ class ClassicThemeHighlightsAreaMargins(BaseModel): ) +class ClassicThemeHeaderMargins(BaseModel): + """This class stores the margins of the header for the classic theme.""" + + vertical_between_name_and_connections: LaTeXDimension = Field( + default="0.2 cm", + title="Vertical Margin Between the Name and Connections", + description=( + "The vertical margin between the name of the person and the connections." + ), + ) + bottom: LaTeXDimension = Field( + default="0.2 cm", + title="Bottom Margin", + description=( + "The bottom margin of the header, i.e., the vertical margin between the" + " connections and the first section title." + ), + ) + + class ClassicThemeMargins(BaseModel): """This class stores the margins for the classic theme.""" @@ -440,6 +460,11 @@ class ClassicThemeMargins(BaseModel): title="Highlights Area Margins", description="Highlights area margins for the classic theme.", ) + header: ClassicThemeHeaderMargins = Field( + default=ClassicThemeHeaderMargins(), + title="Header Margins", + description="Header margins for the classic theme.", + ) class ClassicThemeOptions(BaseModel): @@ -463,7 +488,7 @@ class ClassicThemeOptions(BaseModel): ) date_and_location_width: LaTeXDimension = Field( - default="3.6 cm", + default="4.1 cm", title="Date and Location Column Width", description="The width of the date and location column.", ) diff --git a/rendercv/templates/classic/classic.tex.j2 b/rendercv/templates/classic/classic.tex.j2 index 25fddda..28e16a0 100644 --- a/rendercv/templates/classic/classic.tex.j2 +++ b/rendercv/templates/classic/classic.tex.j2 @@ -135,6 +135,7 @@ ((* endif *)) <> + ((* if cv.summary is not none *)) \section{Summary} { diff --git a/rendercv/templates/classic/components/header.tex.j2 b/rendercv/templates/classic/components/header.tex.j2 index fcfcb6e..2f8e0fe 100644 --- a/rendercv/templates/classic/components/header.tex.j2 +++ b/rendercv/templates/classic/components/header.tex.j2 @@ -4,6 +4,8 @@ \Huge \textbf{<>} + \vspace{<>} + \normalsize ((* for connection in connections *)) <> @@ -12,4 +14,6 @@ ((* endif *)) ((* endfor *)) \end{header} + +\vspace{<>} ((* endmacro *)) \ No newline at end of file diff --git a/schema.json b/schema.json index 394dba1..b77e125 100644 --- a/schema.json +++ b/schema.json @@ -21,6 +21,27 @@ "type": "object", "additionalProperties": false }, + "ClassicThemeHeaderMargins": { + "properties": { + "vertical_between_name_and_connections": { + "default": "0.2 cm", + "description": "The vertical margin between the name of the person and the connections.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Vertical Margin Between the Name and Connections", + "type": "string" + }, + "bottom": { + "default": "0.2 cm", + "description": "The bottom margin of the header, i.e., the vertical margin between the connections and the first section title.", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Bottom Margin", + "type": "string" + } + }, + "title": "ClassicThemeHeaderMargins", + "type": "object", + "additionalProperties": false + }, "ClassicThemeHighlightsAreaMargins": { "properties": { "top": { @@ -105,6 +126,19 @@ }, "description": "Highlights area margins for the classic theme.", "title": "Highlights Area Margins" + }, + "header": { + "allOf": [ + { + "$ref": "#/$defs/ClassicThemeHeaderMargins" + } + ], + "default": { + "bottom": "0.2 cm", + "vertical_between_name_and_connections": "0.2 cm" + }, + "description": "Header margins for the classic theme.", + "title": "Header Margins" } }, "title": "ClassicThemeMargins", @@ -127,7 +161,7 @@ "type": "string" }, "date_and_location_width": { - "default": "3.6 cm", + "default": "4.1 cm", "description": "The width of the date and location column.", "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", "title": "Date and Location Column Width", @@ -169,6 +203,10 @@ "left_and_right": "0.2 cm", "vertical_between": "0.12 cm" }, + "header": { + "bottom": "0.2 cm", + "vertical_between_name_and_connections": "0.2 cm" + }, "highlights_area": { "left": "0.6 cm", "top": "0.12 cm", @@ -1561,12 +1599,16 @@ "font": "SourceSans3", "font_size": "10pt", "options": { - "date_and_location_width": "3.6 cm", + "date_and_location_width": "4.1 cm", "margins": { "entry_area": { "left_and_right": "0.2 cm", "vertical_between": "0.12 cm" }, + "header": { + "bottom": "0.2 cm", + "vertical_between_name_and_connections": "0.2 cm" + }, "highlights_area": { "left": "0.6 cm", "top": "0.12 cm", diff --git a/tests/reference_files/John_Doe_CV_tex_reference.tex b/tests/reference_files/John_Doe_CV_tex_reference.tex index 732b85c..65a4451 100644 --- a/tests/reference_files/John_Doe_CV_tex_reference.tex +++ b/tests/reference_files/John_Doe_CV_tex_reference.tex @@ -109,7 +109,7 @@ \LenToUnit{\paperwidth-1.35 cm-0.2 cm+0.05cm}, \LenToUnit{\paperheight-0.675 cm} ){\vtop{{\null}\makebox[0pt][c]{ - \small\color{gray}\textit{Last updated on November 20, 2023}\hspace{\widthof{Last updated on November 20, 2023}} + \small\color{gray}\textit{Last updated on November 22, 2023}\hspace{\widthof{Last updated on November 22, 2023}} }}}% }% }% @@ -126,6 +126,8 @@ \Huge \textbf{John Doe} + \vspace{0.2 cm} + \normalsize \mbox{{\small\faMapMarker*}\hspace{0.13cm}TX, USA} \hspace{0.5cm} @@ -140,6 +142,9 @@ \mbox{\hrefWithoutArrow{https://www.linkedin.com/in/johndoe}{{\small\faLinkedinIn}\hspace{0.13cm}johndoe}} \end{header} + \vspace{0.2 cm} + + \section{Summary} { \raggedright