mirror of https://github.com/eyhc1/rendercv.git
add last updated date to the header
This commit is contained in:
parent
a0c8cb254b
commit
b56fb1d31f
|
@ -371,6 +371,15 @@ class ClassicThemeOptions(BaseModel):
|
|||
),
|
||||
)
|
||||
|
||||
show_last_updated_date: bool = Field(
|
||||
default=True,
|
||||
title="Show Last Updated Date",
|
||||
description=(
|
||||
"If this option is set to true, then the last updated date will be shown"
|
||||
" in the header."
|
||||
),
|
||||
)
|
||||
|
||||
margins: ClassicThemeMargins = Field(
|
||||
default=ClassicThemeMargins(),
|
||||
title="Margins",
|
||||
|
@ -610,6 +619,7 @@ class Event(BaseModel):
|
|||
|
||||
return month_and_year
|
||||
|
||||
|
||||
class OneLineEntry(Event):
|
||||
"""This class stores [OneLineEntry](../index.md#onelineentry) information."""
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
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
|
||||
|
||||
% Some settings:
|
||||
\pagestyle{empty} % no header or footer
|
||||
|
@ -94,9 +96,20 @@
|
|||
\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-0.5cm},\LenToUnit{\paperheight-0.5cm}){\vtop{{\null}\makebox[0pt][c]{
|
||||
\small\color{gray}\emph{Last updated on \printdayon\today} \hspace{\widthof{Last updated on \printdayon\today}}}}}%
|
||||
}%
|
||||
}%
|
||||
|
||||
\newcommand{\hrefExternal}[2]{\href{#1}{#2\, \raisebox{.1ex}{\footnotesize \faExternalLink*}}} % new command for external links
|
||||
|
||||
\begin{document}
|
||||
((* if design.show_last_updated_date *))
|
||||
\placelastupdatedtext
|
||||
((* endif *))
|
||||
|
||||
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
|
||||
|
||||
((* for section in cv.sections *))
|
||||
|
|
Loading…
Reference in New Issue