\mode<presentation>

% Frame title
\defbeamertemplate*{frametitle}{texsx}[1][]
{
\vskip 5mm%
    \begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle} 
        \begin{tikzpicture}
            \definecolor{th-grey}{HTML}{38434b};
            \useasboundingbox[fill=th-grey](0,0) rectangle(.7*\the\paperwidth,1.2);
            \ifx\insertframesubtitle\@empty%
                {\node[anchor=west, white,font=\large] at (1,0.61){\insertframetitle};}
            \else%
                {\node[anchor= west, white,font=\large] at (1,0.81){\insertframetitle};%
                \node[anchor= west, white,font=\small] at (1,0.41){\insertframesubtitle};}%
            \fi
        \end{tikzpicture}
    \end{beamercolorbox}
}

\mode<all>
