mirror of https://github.com/eyhc1/rendercv.git
themes: add new design options (`seperator_between_connections` and `use_icons_for_connections`)
This commit is contained in:
parent
9deb39246d
commit
3bac4eea32
|
@ -280,6 +280,22 @@ class ThemeOptions(pydantic.BaseModel):
|
||||||
title="Text Alignment",
|
title="Text Alignment",
|
||||||
description="The alignment of the text. The default value is justified.",
|
description="The alignment of the text. The default value is justified.",
|
||||||
)
|
)
|
||||||
|
seperator_between_connections: str = pydantic.Field(
|
||||||
|
default="",
|
||||||
|
title="Seperator Between Connections",
|
||||||
|
description=(
|
||||||
|
"The separator between the connections in the header. The default value is"
|
||||||
|
" empty string."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
use_icons_for_connections: bool = pydantic.Field(
|
||||||
|
default=True,
|
||||||
|
title="Use Icons for Connections",
|
||||||
|
description=(
|
||||||
|
"If this option is set to true, then icons will be used for the connections"
|
||||||
|
" in the header. The default value is true."
|
||||||
|
),
|
||||||
|
)
|
||||||
margins: Margins = pydantic.Field(
|
margins: Margins = pydantic.Field(
|
||||||
default=Margins(),
|
default=Margins(),
|
||||||
title="Margins",
|
title="Margins",
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
\newcommand{\AND}{\unskip
|
||||||
|
\cleaders\copy\ANDbox\hskip\wd\ANDbox
|
||||||
|
\ignorespaces
|
||||||
|
}
|
||||||
|
\newsavebox\ANDbox
|
||||||
|
\sbox\ANDbox{<<design.seperator_between_connections>>}
|
||||||
|
|
||||||
((* if not design.disable_last_updated_date *))
|
((* if not design.disable_last_updated_date *))
|
||||||
\placelastupdatedtext
|
\placelastupdatedtext
|
||||||
((* endif *))
|
((* endif *))
|
||||||
|
@ -10,12 +17,24 @@
|
||||||
|
|
||||||
\normalsize
|
\normalsize
|
||||||
((* for connection in cv.connections *))
|
((* for connection in cv.connections *))
|
||||||
|
((* if design.use_icons_for_connections *))
|
||||||
\mbox{((*- if connection["url"] -*))
|
\mbox{((*- if connection["url"] -*))
|
||||||
\hrefWithoutArrow{<<connection["url"]>>}{{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>}
|
\hrefWithoutArrow{<<connection["url"]>>}{{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>}
|
||||||
((*- else -*))
|
((*- else -*))
|
||||||
{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>
|
{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>
|
||||||
((*- endif -*))}
|
((*- endif -*))}%
|
||||||
\kern <<design.margins.header.horizontal_between_connections>>
|
((* else *))
|
||||||
|
\mbox{((*- if connection["url"] -*))
|
||||||
|
\hrefWithoutArrow{<<connection["url"]>>}{<<connection["clean_url"]|escape_latex_characters>>}
|
||||||
|
((*- else -*))
|
||||||
|
<<connection["placeholder"]|escape_latex_characters>>
|
||||||
|
((*- endif -*))}%
|
||||||
|
((* endif *))
|
||||||
|
((* if not loop.last *))
|
||||||
|
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
||||||
|
\AND%
|
||||||
|
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
||||||
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{header}
|
\end{header}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
\ignorespaces
|
\ignorespaces
|
||||||
}
|
}
|
||||||
\newsavebox\ANDbox
|
\newsavebox\ANDbox
|
||||||
\sbox\ANDbox{$|$}
|
\sbox\ANDbox{<<design.seperator_between_connections>>}
|
||||||
|
|
||||||
((* if not design.disable_last_updated_date *))
|
((* if not design.disable_last_updated_date *))
|
||||||
\placelastupdatedtext
|
\placelastupdatedtext
|
||||||
|
@ -16,16 +16,24 @@
|
||||||
|
|
||||||
\normalsize
|
\normalsize
|
||||||
((* for connection in cv.connections *))
|
((* for connection in cv.connections *))
|
||||||
|
((* if design.use_icons_for_connections *))
|
||||||
|
\mbox{((*- if connection["url"] -*))
|
||||||
|
\hrefWithoutArrow{<<connection["url"]>>}{{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>}
|
||||||
|
((*- else -*))
|
||||||
|
{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>
|
||||||
|
((*- endif -*))}%
|
||||||
|
((* else *))
|
||||||
\mbox{((*- if connection["url"] -*))
|
\mbox{((*- if connection["url"] -*))
|
||||||
\hrefWithoutArrow{<<connection["url"]>>}{<<connection["clean_url"]|escape_latex_characters>>}
|
\hrefWithoutArrow{<<connection["url"]>>}{<<connection["clean_url"]|escape_latex_characters>>}
|
||||||
((*- else -*))
|
((*- else -*))
|
||||||
<<connection["placeholder"]|escape_latex_characters>>
|
<<connection["placeholder"]|escape_latex_characters>>
|
||||||
((*- endif -*))}%
|
((*- endif -*))}%
|
||||||
|
((* endif *))
|
||||||
|
((* if not loop.last *))
|
||||||
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
||||||
((* if not loop.last *))
|
|
||||||
\AND%
|
\AND%
|
||||||
((* endif *))
|
|
||||||
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
||||||
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{header}
|
\end{header}
|
||||||
|
|
||||||
|
|
|
@ -162,6 +162,22 @@ class EngineeringresumesThemeOptions(ThemeOptions):
|
||||||
title="Text Alignment",
|
title="Text Alignment",
|
||||||
description="The alignment of the text. The default value is left-aligned.",
|
description="The alignment of the text. The default value is left-aligned.",
|
||||||
)
|
)
|
||||||
|
seperator_between_connections: str = pydantic.Field(
|
||||||
|
default="$|$",
|
||||||
|
title="Seperator Between Connections",
|
||||||
|
description=(
|
||||||
|
"The separator between the connections in the header. The default value is"
|
||||||
|
" empty string."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
use_icons_for_connections: bool = pydantic.Field(
|
||||||
|
default=False,
|
||||||
|
title="Use Icons for Connections",
|
||||||
|
description=(
|
||||||
|
"If this option is set to true, then icons will be used for the connections"
|
||||||
|
" (like phone, email, and website). The default value is false."
|
||||||
|
),
|
||||||
|
)
|
||||||
margins: MarginsForEngineeringresumes = pydantic.Field(
|
margins: MarginsForEngineeringresumes = pydantic.Field(
|
||||||
default=MarginsForEngineeringresumes(),
|
default=MarginsForEngineeringresumes(),
|
||||||
title="Margins",
|
title="Margins",
|
||||||
|
|
|
@ -62,13 +62,13 @@
|
||||||
|
|
||||||
((* if cv.social_networks *))
|
((* if cv.social_networks *))
|
||||||
((* for network in cv.social_networks *))
|
((* for network in cv.social_networks *))
|
||||||
\social[<<network.network|lower()>>]{<<network.username>>}
|
\social[<<network.network|lower()|replace(" ", "")>>]{<<network.username>>}
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
((* endif *))
|
((* endif *))
|
||||||
% Social icons
|
% Social icons
|
||||||
% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
|
% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
|
||||||
% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted
|
% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted
|
||||||
% \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted
|
% \social[twitter]{ji\_doe} % optional, remove / comment the line if not wanted
|
||||||
% \social[github]{jdoe} % optional, remove / comment the line if not wanted
|
% \social[github]{jdoe} % optional, remove / comment the line if not wanted
|
||||||
% \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted
|
% \social[gitlab]{jdoe} % optional, remove / comment the line if not wanted
|
||||||
% \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted
|
% \social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
\newcommand{\AND}{\unskip
|
||||||
|
\cleaders\copy\ANDbox\hskip\wd\ANDbox
|
||||||
|
\ignorespaces
|
||||||
|
}
|
||||||
|
\newsavebox\ANDbox
|
||||||
|
\sbox\ANDbox{<<design.seperator_between_connections>>}
|
||||||
|
|
||||||
((* if not design.disable_last_updated_date *))
|
((* if not design.disable_last_updated_date *))
|
||||||
\placelastupdatedtext
|
\placelastupdatedtext
|
||||||
((* endif *))
|
((* endif *))
|
||||||
|
@ -9,12 +16,24 @@
|
||||||
|
|
||||||
\normalsize
|
\normalsize
|
||||||
((* for connection in cv.connections *))
|
((* for connection in cv.connections *))
|
||||||
|
((* if design.use_icons_for_connections *))
|
||||||
\mbox{((*- if connection["url"] -*))
|
\mbox{((*- if connection["url"] -*))
|
||||||
\hrefWithoutArrow{<<connection["url"]>>}{\color{black}{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>}
|
\hrefWithoutArrow{<<connection["url"]>>}{\color{black}{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>}
|
||||||
((*- else -*))
|
((*- else -*))
|
||||||
{\color{black}{\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>}
|
{\color{black}\footnotesize<<connection["latex_icon"]>>}\hspace*{0.13cm}<<connection["placeholder"]|escape_latex_characters>>
|
||||||
((*- endif -*))}
|
((*- endif -*))}%
|
||||||
\kern <<design.margins.header.horizontal_between_connections>>
|
((* else *))
|
||||||
|
\mbox{((*- if connection["url"] -*))
|
||||||
|
\hrefWithoutArrow{<<connection["url"]>>}{<<connection["clean_url"]|escape_latex_characters>>}
|
||||||
|
((*- else -*))
|
||||||
|
<<connection["placeholder"]|escape_latex_characters>>
|
||||||
|
((*- endif -*))}%
|
||||||
|
((* endif *))
|
||||||
|
((* if not loop.last *))
|
||||||
|
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
||||||
|
\AND%
|
||||||
|
\kern <<design.margins.header.horizontal_between_connections|divide_length_by(2)>>%
|
||||||
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{header}
|
\end{header}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue