\mode<presentation>

%%%
% Frame header
%%%
\defbeamertemplate*{frametitle}{corporate}[1][]{%
  \nointerlineskip
  % Add frame title
  \begin{beamercolorbox}[
    wd=\paperwidth,
    ht=3ex,
    dp=1.5ex,
    left,
    leftskip=2ex
  ]{header}
    \insertframetitle
  \end{beamercolorbox}
  % Add line after header
  \nointerlineskip
  \begin{beamercolorbox}[
    wd=\paperwidth,
    ht=0.25ex
  ]{trailer}
  \end{beamercolorbox}%
}

%%%
% Frame trailer
%%%
\defbeamertemplate*{footline}{corporate}{%
  \hbox{%
    % Add metadata
    \begin{beamercolorbox}[
      wd=0.50\paperwidth,
      ht=2ex,
      dp=0.5ex,
      left,
      leftskip=2ex
    ]{trailer}
	    \hfill\url{https://www.rgdd.se/}\hfill
    \end{beamercolorbox}%
    % Add title
    \begin{beamercolorbox}[
      wd=0.45\paperwidth,
      ht=2ex,
      dp=0.5ex,
      left,
      leftskip=2ex
    ]{header}
      \hfill\insertsubtitle\hfill
    \end{beamercolorbox}%
    % Add page counter
    \begin{beamercolorbox}[
      wd=0.05\paperwidth,
      ht=2ex,
      dp=0.5ex,
      right,
      rightskip=1ex
    ]{header}
      \insertframenumber/\inserttotalframenumber
    \end{beamercolorbox}%
  }
}

\mode<all>
