%% Uni Bremen Beamer Theme 2.0.0 (2021-07)
%% LaTeX-version by Erik Michelson (michelson@uni-bremen.de)

\mode<presentation>

\defbeamertemplate*{frametitle}{uhb}[1][] {
	
	\begin{tikzpicture}[remember picture,overlay]
	\node[xshift=1.75cm,yshift=-0.75cm] at (current page.north west){%
	    \includegraphics[height=0.8cm]{assets/logo}};
	\end{tikzpicture}
	
	\IfFileExists{assets/workgroup.pdf}{%
	\begin{tikzpicture}[remember picture,overlay]
	\node[xshift=5cm,yshift=-0.75cm] at (current page.north west){%
	    \includegraphics[height=0.8cm]{assets/workgroup}};
	\end{tikzpicture}
	}{%
	\begin{textblock}{0.2}(0.3,0.04)
		{\begin{singlespace}\fontsize{5}{9}
		\selectfont
		\@workgroup\end{singlespace}}
	\end{textblock}
	}
	
	\begin{textblock}{0.25}(0.5,0.04)
		{\begin{singlespace}\fontsize{5}{9}
		\selectfont
		\textbf{\inserttitle
		\\
		\insertsubtitle}\end{singlespace}}
	\end{textblock}
	
	\begin{textblock}{0.15}(0.72,0.04)
		{\begin{singlespace}\fontsize{5}{9}
		\selectfont
		\insertauthor
		\\
		\insertdate\end{singlespace}}
	\end{textblock}
	
	\begin{textblock}{0.2}(0.9,0.04)
		{\begin{singlespace}\fontsize{5}{9}
		\selectfont
		\textbf{\@facultynum}
		\\
		\@faculty\end{singlespace}}
	\end{textblock}
	
	\ifthenelse{\equal{\beamer@frametitle}{.}}{}{%
	\begin{textblock}{0.9}(0.05,0.18)
		{\begin{singlespace}\fontsize{17}{22}
		\selectfont
		\insertframetitle
		\end{singlespace}}
	\end{textblock}
	}

	\vspace{2.0em}
}

\defbeamertemplate*{frametitle}{smalltitle}[1][] {
	
	\begin{tikzpicture}[remember picture,overlay]
	\node[xshift=-1.25cm,yshift=-0.75cm] at (current page.north east){%
	    \includegraphics[height=0.7cm]{assets/logo}};
	\end{tikzpicture}
	
	\IfFileExists{assets/workgroup.pdf}{%
	\begin{tikzpicture}[remember picture,overlay]
	\node[xshift=-3.5cm,yshift=-0.75cm] at (current page.north east){%
	    \includegraphics[height=0.7cm]{assets/workgroup}};
	\end{tikzpicture}
	}{}
	
	\ifthenelse{\equal{\beamer@frametitle}{.}}{}{%
	\begin{textblock}{0.78}(0.05,0.058)
		{\begin{singlespace}\fontsize{16}{20}
		\selectfont
		\insertframetitle
		\end{singlespace}}
	\end{textblock}
	}

	\vspace{0.2em}
}

\defbeamertemplate*{frametitle}{smallertitle}[1][] {
	
	\begin{tikzpicture}[remember picture,overlay]
	\node[xshift=-1.25cm,yshift=-0.75cm] at (current page.north east){%
	    \includegraphics[height=0.7cm]{assets/logo}};
	\end{tikzpicture}
	
	\IfFileExists{assets/workgroup.pdf}{%
	\begin{tikzpicture}[remember picture,overlay]
	\node[xshift=-3.5cm,yshift=-0.75cm] at (current page.north east){%
	    \includegraphics[height=0.7cm]{assets/workgroup}};
	\end{tikzpicture}
	}{}
	
	\ifthenelse{\equal{\beamer@frametitle}{.}}{}{%
	\begin{textblock}{0.78}(0.05,0.058)
		{\begin{singlespace}\fontsize{14}{18}
		\selectfont
		\insertframetitle
		\end{singlespace}}
	\end{textblock}
	}

	\vspace{0.2em}
}

\defbeamertemplate*{footline}{uhb}{
	\ifthenelse{\equal{\insertframenumber}{1} \OR \equal{\insertframenumber}{0}}{}{%
		\begin{tikzpicture}[remember picture,overlay]
		\node[xshift=8cm,yshift=0.3cm] at (current page.south west){%
		    \includegraphics[height=0.6cm,width=\paperwidth]{assets/bottom}};
		\end{tikzpicture}
		
		\begin{textblock}{0.05}(1.1,0.955)
			{\begin{singlespace}\fontsize{8}{14}
			\selectfont
			\insertframenumber\end{singlespace}}
		\end{textblock}
		
		\begin{textblock}{0.4}(0.05,0.955)
			{\begin{singlespace}\fontsize{8}{14}
			\selectfont\color{white}
			\@footertext\end{singlespace}}
		\end{textblock}
		
		\begin{textblock}{0.4}(0.48,0.955)
			{\begin{singlespace}\fontsize{8}{14}
			\selectfont
			\@footertextr\end{singlespace}}
		\end{textblock}
	}
}

\mode<all>
