Commit c9306f14 authored by Alija Sabic's avatar Alija Sabic
Browse files

Add ASPECTRATIO and start new beamer template with options

parent 1443a834
\mode<presentation>
\DeclareOptionBeamer{front}{\def\beamer@fhtw@front{#1}}
\ProcessOptionsBeamer
% \defbeamertemplate*{logo}{fhtw}{%
% Logo
% }
% \setbeamertemplate{logo}{\insertlogo}
\renewcommand*\logo[1]{%
\defbeamertemplate*{logo}{fhtw}{%
\ifthenelse{\equal{\beamer@fhtw@front}{fhtw}}{%
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[anchor=south west] at (0.75,0.5) {#1};
\end{tikzpicture}
}{}
\ifthenelse{\equal{\beamer@fhtw@front}{noir}}{%
}{}
}
}
% \newlength{\picwidth}
\defbeamertemplate*{background}{fhtw}{%
% \settowidth{\picwidth}{\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{fhtw-noir}}%
\ifthenelse{\equal{\beamer@fhtw@front}{fhtw}}{%
\begin{tikzpicture}
\coordinate (start) at ($(current page.south west)+(0.1,0.1)$);
\coordinate (end) at ($(current page.north east)+(-0.1,-0.1)$);
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
% Colored rectangles
\def\fw{\the\paperheight/43}
\foreach \color [count=\ci] in {ttw-blue,ttw-violett,ttw-green,ttw-red,ttw-gray,ttw-lightblue,ttw-lightorange,ttw-red,ttw-gray,ttw-lightblue,
ttw-green,ttw-lightorange,ttw-red,ttw-gray,ttw-green,ttw-gray,ttw-yellow,ttw-lightorange,ttw-darkcyan,ttw-blue,
ttw-darkcyan,ttw-red,ttw-green,ttw-lightblue,ttw-gray,ttw-lightblue,ttw-green,ttw-gray,ttw-red,ttw-lightorange,
ttw-gray,ttw-green,ttw-gray,ttw-lightorange,ttw-darkcyan,ttw-violett,ttw-gray,ttw-blue,ttw-green,ttw-gray,
ttw-red,ttw-gray} {
\draw[draw=none,fill=\color] ($(end)+(0,-(\ci*\fw)$) rectangle ++(-2,\fw);
}
% Frame
\draw[draw=black,line width=0.2mm,anchor=north west] (start) rectangle (end);
\ifnum\thepage>1\relax
\fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}{}%
\ifthenelse{\equal{\beamer@fhtw@front}{noir}}{%
\begin{adjustbox}{min width=\paperwidth,min height=\paperheight}
\begin{tikzpicture}
% \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[inner sep=0] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{fhtw-noir}};%
\end{tikzpicture}
\end{adjustbox}
}{}%
\ifthenelse{\equal{\beamer@fhtw@front}{noir-bridge}}{%
\begin{adjustbox}{min width=\paperwidth,min height=\paperheight}
\begin{tikzpicture}%
% Background
\node[inner sep=0] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{fhtw-noir-bridge}};%
\end{tikzpicture}%
\end{adjustbox}
}{}%
}
\defbeamertemplate*{title page}{fhtw}{%
\ifthenelse{\equal{\beamer@fhtw@front}{fhtw}}{%
}{}
\ifthenelse{\equal{\beamer@fhtw@front}{noir}}{%
}{}
}
\mode<all>
\ No newline at end of file
\mode<presentation>
% Dependencies
\RequirePackage{tikz}
\usetikzlibrary{calc}
\RequirePackage[export]{adjustbox}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{xifthen}
\RequirePackage{twcolors}
% Options
\DeclareOptionBeamer{front}{\PassOptionsToPackage{front=#1}{beamerinnerthemefhtw}}
\ExecuteOptionsBeamer{front=fhtw}
\ProcessOptionsBeamer\relax
% Settings
\useinnertheme{fhtw}
% \useouterheme{fhtw}
% \usecolortheme{fhtw}
% \usefonttheme{fhtw}
\setbeamertemplate{navigation symbols}{}
\mode<all>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment