From 43f938d1bb0e2b766e5ceeb8f88618926a31c330 Mon Sep 17 00:00:00 2001 From: Sina Atalay <79940989+sinaatalay@users.noreply.github.com> Date: Mon, 8 Apr 2024 00:23:55 +0000 Subject: [PATCH] classic: add education_degree_width design option --- rendercv/themes/classic/Preamble.j2.tex | 10 ++++++---- rendercv/themes/classic/__init__.py | 25 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/rendercv/themes/classic/Preamble.j2.tex b/rendercv/themes/classic/Preamble.j2.tex index 6c28f49..838344a 100644 --- a/rendercv/themes/classic/Preamble.j2.tex +++ b/rendercv/themes/classic/Preamble.j2.tex @@ -79,7 +79,7 @@ \titlespacing{\section}{ % left space: - 0pt + -1pt }{ % top space: <> @@ -94,10 +94,12 @@ parsep=<>, partopsep=0pt, itemsep=0pt, - leftmargin=<> + 3pt + leftmargin=<> + 10pt ] }{ \end{itemize} + + \vspace{-0.20cm} } % new environment for highlights @@ -114,7 +116,7 @@ \newenvironment{twocolentry}[2][]{ \onecolentry \def\secondColumn{#2} - \setcolumnwidth{\fill, 4.2cm} + \setcolumnwidth{\fill, <>} \begin{paracol}{2} }{ \switchcolumn \raggedleft \secondColumn @@ -125,7 +127,7 @@ \newenvironment{threecolentry}[3][]{ \onecolentry \def\thirdColumn{#3} - \setcolumnwidth{1cm, \fill, 4.2cm} + \setcolumnwidth{1cm, \fill, <>} \begin{paracol}{3} \raggedright #2 \switchcolumn }{ diff --git a/rendercv/themes/classic/__init__.py b/rendercv/themes/classic/__init__.py index adefd2e..046d03c 100644 --- a/rendercv/themes/classic/__init__.py +++ b/rendercv/themes/classic/__init__.py @@ -2,7 +2,30 @@ from typing import Literal import pydantic -from .. import ThemeOptions +from .. import ThemeOptions, EntryAreaMargins, Margins, LaTeXDimension + + +class EntryAreaMarginsForClassic(EntryAreaMargins): + """This class is a data model for the entry area margins.""" + + education_degree_width: LaTeXDimension = pydantic.Field( + default="1 cm", + title="Date and Location Column Width", + description=( + "The width of the degree column in EducationEntry. The default value is" + " 1 cm." + ), + ) + + +class MarginsForClassic(Margins): + """This class is a data model for the margins.""" + + entry_area: EntryAreaMarginsForClassic = pydantic.Field( + default=EntryAreaMarginsForClassic(), + title="Entry Area Margins", + description="Entry area margins.", + ) class ClassicThemeOptions(ThemeOptions):