\RequirePackage{tikz}

\mode<presentation>

% progressbar
\definecolor{lusteelgray}{HTML}{91A1AA}
\definecolor{luwarmgray}{HTML}{7D6A55}% background color for the progress bar

\makeatletter
\def\progressbar@progressbar{} % the progress bar
\newcount\progressbar@tmpcounta% auxiliary counter
\newcount\progressbar@tmpcountb% auxiliary counter
\newdimen\progressbar@pbht %progressbar height
\newdimen\progressbar@pbwd %progressbar width
\newdimen\progressbar@tmpdim % auxiliary dimension
\progressbar@pbwd=0.729\linewidth
\progressbar@pbht=1.87ex
%\progressbar@pbht=1.725ex
% the progress bar
\def\progressbar@progressbar{%
    \progressbar@tmpcounta= \insertframenumber % max = ?
    \progressbar@tmpcountb=\inserttotalframenumber      
    \progressbar@tmpdim=.5\progressbar@pbwd
    \multiply\progressbar@tmpdim by \progressbar@tmpcounta
    \divide\progressbar@tmpdim by \progressbar@tmpcountb
    \progressbar@tmpdim=2\progressbar@tmpdim
  \begin{tikzpicture}[rounded corners=0pt,very thin]
    \shade[top color=lubg,bottom color=lubg,middle color=lubg]
       (0pt, 0pt) rectangle ++ (\progressbar@pbwd, \progressbar@pbht);
      \shade[draw=brown,top color=brown,bottom color=brown,middle color=brown] %
        (0pt, 0pt) rectangle ++ (\progressbar@tmpdim, \progressbar@pbht);
  \end{tikzpicture}%
}

% page number
\defbeamertemplate*{footline}{my footline}
{
    \ifnum \insertpagenumber=1
      \leavevmode%
      \hbox{%
      \begin{beamercolorbox}[wd=\paperwidth,ht=4.25ex,dp=1ex,center]{}%
        % empty environment to raise height
      \end{beamercolorbox}}%
      \vskip0pt%
    \else
      \leavevmode%
      \hbox{%
      \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.0ex,dp=1ex,left]{date in head/foot}%
        \usebeamerfont{date in head/foot}\raisebox{-0.85ex}{\includegraphics[width=0.3\paperwidth]{lulogo}}\hfill
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.61\paperwidth,ht=2.8ex,dp=0ex,center]{white}\raisebox{-1.1ex}{\progressbar@progressbar}%{date in head/foot}%
      \end{beamercolorbox}
      \begin{beamercolorbox}[wd=.09\paperwidth,ht=2.75ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot} \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
      \end{beamercolorbox}
      }%
      \vskip0pt%
    \fi
}

\defbeamertemplate*{footline}{myfootline}
{
  \leavevmode%
  \hbox{%
    \begin{beamercolorbox}[wd=\paperwidth,ht=4.25ex,dp=1ex,center]{}%
      % empty environment to raise height
  \end{beamercolorbox}}%
  \vskip0pt%
}

\setbeamertemplate{footline}[my footline]

\mode
<all>
