% This is a combination of Pandoc templating and LaTeX
% Pandoc templating https://pandoc.org/MANUAL.html#templates
% See the README for help

$if(titlepage-geometry)$
\newgeometry{$for(titlepage-geometry)$$titlepage-geometry$$sep$,$endfor$}
$endif$
\begin{minipage}[b][\textheight][s]{\textwidth}
\raggedright

% % background sigle
% $if(title-sigle)$
% \This$if(title-bg-location)$$title-bg-location$$else$LL$endif$CornerWallPaper{$if(title-bg-size)$$title-bg-size$$else$0.2$endif$}{$title-sigle$}
% $endif$

\vfill

% Title and subtitle
\setlength{\baselineskip}{26pt}
{\huge\bfseries\color{inrae}\nohyphens{$title$}}\\[0.7\baselineskip] 
$if(subtitle)${\color{inrae}\Large{$subtitle$}}\\[2\baselineskip]$endif$

\setlength{\baselineskip}{13pt}
\textbf{Date :} $date$\\[1\baselineskip]%

% Authors
\textbf{Auteur(s) :} %
$for(by-author)$
{$by-author.name.literal$}$sep$, 
$endfor$\\[1\baselineskip]

% Internship
$if(internship)$
  % 1. Affichage des infos du stage
  \textbf{Diplôme :} $internship.name$ \\
  \textbf{Période :} du $internship.start$ au $internship.end$ \\
  
  \vspace{1cm}
  
  % 2. Boucle sur les tuteurs imbriqués
  $if(internship.tutor)$
    \textbf{Encadrement :} \\
    \begin{tabular}{ll}
    $for(internship.tutor)$
      \textbf{$it.name$} & \textit{$it.function$} \\
    $endfor$
    \end{tabular}
  $endif$
\\[1\baselineskip]
$endif$

\vfill

% Cover image
% $if(cover)$\includegraphics[width=4cm]{$cover$}$endif$

% Whitespace between the title block and the tagline
\vspace{1\baselineskip}

%%%%% Tagline at bottom
\begin{center}
\begin{tabular}{>{\raggedright}p{.15\linewidth}>{\centering}p{.15\linewidth}>{\centering}p{.25\linewidth}>{\raggedleft}p{.25\linewidth}}
    \raisebox{-0.5\height}{\includegraphics[height=1cm]{data-common/figure/logo/logo-so-ii-texte.png}} &
    \raisebox{-0.5\height}{\includegraphics[height=1.2cm]{data-common/figure/logo/logo-g-eau-alternative.png}} &
    \raisebox{-0.5\height}{\includegraphics[height=1cm]{data-common/figure/logo/logo-inrae.png}} &
    \raisebox{-0.5\height}{\includegraphics[height=1cm]{logo.png}} \tabularnewline %use this line for your university logo
\end{tabular}
\end{center}

\vspace{1\baselineskip} 

\end{minipage}
$if(titlepage-geometry)$
\restoregeometry
$endif$