feat: attempt to generate an anonymous resume as an option

This commit is contained in:
Matthieu Bessat 2022-08-25 13:32:23 +02:00
parent 1ba155c8e5
commit 8ca2d2612b
2 changed files with 13 additions and 8 deletions

View file

@ -37,8 +37,11 @@ class ResumeController extends AbstractController
'tag_comment' => ['(!', '!)'], 'tag_comment' => ['(!', '!)'],
'tag_variable' => ['((', '))'], 'tag_variable' => ['((', '))'],
])); ]));
$out = $twig->load('cv.tex')->render([ $out = $twig->load('cv.tex')->render([
...$resume ...$resume,
// Allow to generate annonymized resume/CV (sort of)
'anno' => in_array(($request->getQueryParams()['anno'] ?? false), ['true', 'yes'])
]); ]);
$response->getBody()->write($out); $response->getBody()->write($out);

View file

@ -38,7 +38,7 @@
\fancyhfoffset{0em} \fancyhfoffset{0em}
\fancyfoot{} \fancyfoot{}
\fancyfoot[L]{(( misc.updated_at | format_date(locale=getLocale()) ))} \fancyfoot[L]{(( misc.updated_at | format_date(locale=getLocale()) ))}
\fancyfoot[C]{(( firstName )) (( lastName )) - CV} \fancyfoot[C]{(% if anno %)CV annonyme(% else %)(( firstName )) (( lastName )) - CV(% endif %)}
\fancyfoot[R]{\thepage} \fancyfoot[R]{\thepage}
\newcommand\link[2]{\color{linkcolor}\href{#1}{#2}\color{Black} } \newcommand\link[2]{\color{linkcolor}\href{#1}{#2}\color{Black} }
@ -126,6 +126,9 @@
\begin{document} \begin{document}
% \section{\color{accentcolor} \textsc{Hello World}}{Hello world} % \section{\color{accentcolor} \textsc{Hello World}}{Hello world}
(% if anno %)
\noindent\color{accentcolor}\textbf{\large{(( getDynLocalizedStr(label) ))}}\color{black}
(% else %)
\begin{minipage}{\dimexpr\linewidth-3cm} \begin{minipage}{\dimexpr\linewidth-3cm}
\noindent{\huge{((firstName)) \textbf{((lastName))}}} \noindent{\huge{((firstName)) \textbf{((lastName))}}}
\vspace{5px} \vspace{5px}
@ -136,20 +139,17 @@
\\ \\
\iconwithtext{icons/cake.svg}{(( getLocalizedStr('intro.age-raw') | format(age) ))} \iconwithtext{icons/cake.svg}{(( getLocalizedStr('intro.age-raw') | format(age) ))}
\\ \\
% \sociallink{\includesvg[width=10pt,height=9pt]{./public/imgs/icons/robot.svg}}{https://matthieubessat.fr}{matthieubessat.fr}
\iconwithtext{icons/at.svg}{\link{mailto:(( email ))}{(( email ))}} \iconwithtext{icons/at.svg}{\link{mailto:(( email ))}{(( email ))}}
\iconwithtext{icons/phone.svg}{\link{(( phone | replace({' ':''}) ))}{(( phone ))}} \iconwithtext{icons/phone.svg}{\link{(( phone | replace({' ':''}) ))}{(( phone ))}}
\\ \\
\iconwithtext{icons/link.svg}{\link{(( website ))}{(( website_alt ))}} \iconwithtext{icons/link.svg}{\link{(( website ))}{(( website_alt ))}}
\iconwithtext{logos/github.svg}{\link{(( links_by_ids.github.url ))}{(( links_by_ids.github.username ))}} \iconwithtext{logos/github.svg}{\link{(( links_by_ids.github.url ))}{(( links_by_ids.github.username ))}}
\iconwithtext{logos/gitlab.svg}{\link{(( links_by_ids.gitlab.url ))}{(( links_by_ids.gitlab.username ))}} \iconwithtext{logos/gitlab.svg}{\link{(( links_by_ids.gitlab.url ))}{(( links_by_ids.gitlab.username ))}}
% Website, Email, Location, Age
% \includesvg[width=\svgsize]{./public/imgs/icons/robot.svg}
\end{minipage} \end{minipage}
\begin{minipage}{3cm} \begin{minipage}{3cm}
\tikz\path[fill overzoom image={\@photo}]circle[radius=0.45\linewidth]; \tikz\path[fill overzoom image={\@photo}]circle[radius=0.45\linewidth];
\end{minipage} \end{minipage}
(% endif %)
\\ \\
\vspace{8px} \vspace{8px}
\par{(( getDynLocalizedStr(intro) | raw ))} \par{(( getDynLocalizedStr(intro) | raw ))}
@ -197,14 +197,16 @@
(% for exp in side_projects %) (% for exp in side_projects %)
\begin{minipage}[t]{\dimexpr(\linewidth) - 1.5em} \begin{minipage}[t]{\dimexpr(\linewidth) - 1.5em}
(% if exp.detailled %) (% if exp.detailled and not anno %)
\link{(( website ))/(( getLocale() ))/projects/(( exp.id )).html}{% \link{(( website ))/(( getLocale() ))/projects/(( exp.id )).html}{%
(% endif %) (% endif %)
\textbf{\textsc{(( getDynLocalizedStr(exp.name) | raw ))}}% \textbf{\textsc{(( getDynLocalizedStr(exp.name) | raw ))}}%
(% if exp.detailled %)}(% endif %) (% if exp.detailled %)}(% endif %)
\hfill \textsc{(( exp.date | format_date(locale=getLocale(), pattern='YYYY') ))}\smallskip\\ \hfill \textsc{(( exp.date | format_date(locale=getLocale(), pattern='YYYY') ))}\smallskip\\
(% if not anno %)
\iconwithtext{(( exp.link_icon ))}{\link{(( exp.link ))}{(( exp.link_alt ))}} \iconwithtext{(( exp.link_icon ))}{\link{(( exp.link ))}{(( exp.link_alt ))}}
\vspace{.4em} \vspace{.4em}
(% endif %)
\\ \\
(( getDynLocalizedStr(exp.description) | raw ))\vspace{.4em}\\ (( getDynLocalizedStr(exp.description) | raw ))\vspace{.4em}\\
\footnotesize{(% for t in exp.technologies %)\cvtag{(( t.name ))}(% endfor %)}\\ \footnotesize{(% for t in exp.technologies %)\cvtag{(( t.name ))}(% endfor %)}\\
@ -268,5 +270,5 @@
\keywordsentry{(( getLocalizedStr(lang.long) ))}{(( getLocalizedStr('fluency.' ~ lang.level) ))} \keywordsentry{(( getLocalizedStr(lang.long) ))}{(( getLocalizedStr('fluency.' ~ lang.level) ))}
(% endfor %) (% endfor %)
\end{keywords} \end{keywords}
\end{document} \end{document}