% Copyright 2009, 2020 Stefan Huber <shuber@sthu.org>

\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer

\mode<presentation>

\usecolortheme{SHblue3}

%\useoutertheme{infolines}
%\useoutertheme{shadow}
%\useoutertheme{split}
%\useinnertheme[shadow=true]{rounded}


%\useroutertheme{} % No outer theme
\useinnertheme{rectangles}
\setbeamertemplate{itemize items}[triangle]

\setbeamerfont{frametitle}{parent=structure,size=\Large}
\setbeamerfont{author}{size=\small}
\setbeamerfont{date}{size=\normalsize}
%\setbeamerfont{title}{series=\bfseries}


\defbeamertemplate*{footline}{SHblue theme}
{%
	\leavevmode%
	\hbox{%
		\begin{beamercolorbox}[wd=\textwidth,ht=2.25ex,dp=1ex]{footline}%
			\hspace{1ex}\insertshortauthor:\hspace{2ex}\bf\insertshorttitle\normalfont
			\hfill \insertsectionhead%
			\ifnum\value{subsection}=0\relax%
			{}%
			\else%
			{\ /\ \insertsubsectionhead}%
			\fi%
			\hspace*{4ex} \bf \insertframenumber{} of \inserttotalframenumber\hspace{2ex}
		\end{beamercolorbox}%
	}%
    %\vskip0pt%
}

\setbeamertemplate{footnote}
{%
  \parindent 1em\noindent%
  \raggedright%
  \insertfootnotemark\enspace\tiny\insertfootnotetext\par%
}


\setbeamersize{text margin left=1em,text margin right=1em}


\newcommand{\framenumbersave}{%
    \ifcsname c@tmpframenumber\endcsname%
    \else%
        \newcounter{tmpframenumber}%
        \newcounter{tmpframenumberstored}%
        \setcounter{tmpframenumberstored}{0}
    \fi%

    \ifnum \value{tmpframenumberstored}=0
        \setcounter{tmpframenumber}{\value{framenumber}}
    \fi
    \addtocounter{tmpframenumberstored}{1}
}
\newcommand{\framenumberrestore}{%
    \addtocounter{tmpframenumberstored}{-1}
    \ifnum \value{tmpframenumberstored}=0
        \setcounter{framenumber}{\value{tmpframenumber}}
    \fi
}
\newenvironment{skipframecount}{\framenumbersave}{\framenumberrestore}


\let\fcntpart\part
\renewcommand{\part}[1]{\framenumbersave\fcntpart{#1}\framenumberrestore}
\let\fcntsection\section
\renewcommand{\section}[1]{\framenumbersave\fcntsection{#1}\framenumberrestore}
\let\fcntsubsection\subsection
\renewcommand{\subsection}[1]{\framenumbersave\fcntsubsection{#1}\framenumberrestore}


\mode<all>

