%% Copyright (C) 2016 Achim D. Brucker, https://www.brucker.ch
%%
%% License:
%%   This program can be redistributed and/or modified under the terms
%%   of the LaTeX Project Public License Distributed from CTAN
%%   archives in directory macros/latex/base/lppl.txt; either
%%   version 1 of the License, or any later version.
%%   OR
%%   The 2-clause BSD-style license.
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{beamerouterthemetuos}
     [2016/08/20 v1.1  LaTeX presenation class following the cooperate design of The University of Sheffield]

\mode<presentation>
  \RequirePackage{ifthen}
  \RequirePackage{ifpdf}
  \RequirePackage{datetime}
  \ifpdf\else
    \@ifundefined{pdfpagewidth}{\newdimen\pdfpagewidth}{}
    \@ifundefined{pdfpageheight}{\newdimen\pdfpageheight}{}
    \pdfpagewidth=\paperwidth
    \pdfpageheight=\paperheight
  \fi
  \RequirePackage{tikz}
  \defbeamertemplate*{navigation symbols}{TUOS}{}
  \defbeamertemplate*{headline}{TUOS}{%
    \begin{tikzpicture}[overlay,remember picture]
      \node[anchor=north west,yshift=-0.1cm,xshift=-.2cm]
      at (current page.north west) {
        \ifbeamer@colour
          \tuosLogoDark[height=1.2cm]
        \else
          \tuosLogoLight[height=1.2cm]
        \fi
      };
    \end{tikzpicture}}
\defbeamertemplate*{frametitle}{TUOS}{%
  \ifbeamer@plainframe%
  \else%
    \ifbeamer@compress%
      \vskip0.2cm%
      \hskip2.5cm%
    \else
      \vskip1.8cm%
      \vskip-\topsep%
    \fi%
  \fi%
  \usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}%
  \insertframetitle\par%
  \ifbeamer@plainframe%
  \else%
    \ifbeamer@compress%
      \hskip2.5cm%
    \else%
    \fi%
  \fi%
  \usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}%
  \insertframesubtitle
}
\defbeamertemplate*{footline}{TUOS}{%
   \quad
    \ifnum \insertpagenumber=1
    \else
      \mmddyyyydate\today \quad \textcopyright\ Copyright The University
      of Sheffield / 
      Page \insertframenumber{} of \inserttotalframenumber\hspace*{2ex}
    \fi
    \vskip5pt%
}
\mode
<all>
\endinput
