%% 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.3c of the License, or (at your opinion) any later version.
%%   OR
%%   The 2-clause BSD-style license.
%%
%%   SPDX-License-Identifier: LPPL-1.3c+ OR BSD-2-Clause

\ProvidesPackage{beamerthemetuos-poster}
  [2016/08/20 v1.1  LaTeX theme following the cooperate design of The University of Sheffield]
\usetheme{tuos-presentation}

\usefonttheme{tuos-poster}
\usecolortheme{tuos-poster}

\setbeamertemplate{rhlogo}{}
\setbeamertemplate{webpage}{www.brucker.ch}

\newlength{\logoheight}
\newlength{\titleheight}
\newlength{\rhlogowidth}

\usepackage{calc}
\setlength{\logoheight}{6cm}%
\setlength{\rhlogowidth}{0cm}%

\mode<presentation>

\setbeamertemplate{headline}{
  \leavevmode%
  \setlength{\rhlogowidth}{\widthof{\usebeamertemplate*{rhlogo}}}%
  \begin{beamercolorbox}[wd=\paperwidth]{headline}
      \begin{minipage}[t][\logoheight+2cm][t]{2.55\logoheight}
        \begin{tikzpicture}[overlay,remember picture]
          \node[anchor=north west,yshift=-.8cm,xshift=-0.2cm]
          at (current page.north west) {
            \ifbeamer@colour
            \tuosLogoDark[height=\logoheight]
            \else
            \tuosLogoLight[height=\logoheight]
            \fi
          };
        \end{tikzpicture}
      \end{minipage}%
      \begin{minipage}[t][\logoheight+2cm][t]{\paperwidth-2.55\logoheight-\rhlogowidth}
        \vspace*{\fill}
        \begin{center}
          \usebeamercolor[fg]{title}%
               \usebeamerfont{title}\inserttitle\\[1ex]
          \usebeamercolor[fg]{author}%
               \usebeamerfont{author}\insertauthor\\[1ex]
          \usebeamercolor[fg]{institute}%
               \usebeamerfont{institute}\insertinstitute\\[1ex]
          \vspace*{\fill}
        \end{center}
      \end{minipage}%
      \begin{minipage}[t][\logoheight+2cm][t]{\rhlogowidth}
        \usebeamertemplate*{rhlogo}%
      \end{minipage}
    \end{beamercolorbox}
}

\setbeamertemplate{block begin}{
  \vskip.75ex
  \begin{beamercolorbox}[rounded=true,shadow=true,leftskip=1cm,colsep*=.75ex]{block title}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[rounded=true,shadow=true,colsep*=.75ex,sep=.75ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block end}{
  \end{beamercolorbox}
}

\setbeamertemplate{block alerted begin}{
  \vskip.75ex
  \begin{beamercolorbox}[rounded=true,shadow=true,leftskip=1cm,colsep*=.75ex]{block alerted title}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[rounded=true,shadow=true,colsep*=.75ex,sep=.75ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block alerted end}{
  \end{beamercolorbox}
}

\setbeamertemplate{block example begin}{
  \vskip.75ex
  \begin{beamercolorbox}[rounded=true,shadow=true,leftskip=1cm,colsep*=.75ex]{block
    title example}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[rounded=true,shadow=true,colsep*=.75ex,sep=.75ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block example end}{
  \end{beamercolorbox}
}



\mode<all>
\endinput
