%% Identification
%% The class identifies itself and the LaTeX version needed
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{brgbeamer}[1930/01/01 BRG Presentation Class]

%% Required class settings

%% This setting is overriden, but still needs to be in
%% the main class file to avoid spurious LaTeX warnings.
\renewcommand{\normalsize}{}

%% Beamer Setup
\LoadClass{beamer}
\usetheme{metropolis}

%% BRG customization
\definecolor{brgRed}{HTML}{990000}
\definecolor{red}{HTML}{990000}
\setbeamercolor{alerted text}{%
  fg=brgRed
}

\institute{BRG Feldkirchen}
\titlegraphic{\hfill\includegraphics[height=1.5cm]{brg.png}}

%% Misc
\usepackage{etoolbox}

%% Internationalization
\usepackage[german]{babel}
\usepackage[nodayofweek,level]{datetime}

%% Styling
\usepackage{booktabs}
\usepackage{underscore}
\usepackage[scale=2]{ccicons}
\usepackage{appendixnumberbeamer}
\usepackage{xspace}
\usepackage{svg}

%% Autotitle
\AtBeginDocument{\maketitle{}}

%% Better spacing
\pretocmd{\caption}{\vspace{-1em}}{}{}

%% Custom frames
\newenvironment{imageframe}[1][{\usebeamercolor[bg]{,}}]{
    \setbeamertemplate{frame footer}{#1}
    \begin{frame}
}{
    \end{frame}
}
  
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}
\ProcessOptions\relax