I want to create a certain section page. But I have 2 Problems left. From another question Creating fancy section pages for beamer I could create the basis.
\documentclass[svgnames]{beamer}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tikz}
\usetikzlibrary{positioning,calc,shadings}
\tikzset{section number/.style={
inner sep=0pt,
draw=none,
},
section/.style={
inner sep=0pt,
draw=none,
text width=\the\dimexpr\paperwidth-3.8em\relax,
text=blue,
align=left
},
subsection/.style={
inner sep=0pt,
draw=none,
text width=\the\dimexpr\paperwidth-3.8em\relax,
text=gray,
align=left
}
}
\makeatletter
\def\sectionsubtitle#1{\gdef\@sectionsubtitle{#1}}
\AtBeginSection[]{%
\begingroup
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}[remember picture,overlay]
\fill[gray!30] (current page.north west) rectangle (current page.south east);
\end{tikzpicture}
}
\begin{frame}
\begin{beamercolorbox}[wd=\paperwidth,ht=1cm]{}
\begin{tikzpicture}
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,1);
\shade [left color=gray,right color=white] (0,0) rectangle (\the\paperwidth,0.02);
\end{tikzpicture}
\end{beamercolorbox}
\begin{tikzpicture}[remember picture,overlay]
\node[section,anchor=east] at (current page.east) (title)
{\hfill\parbox[c][3.5em][c]{\the\dimexpr\paperwidth-4.2em\relax}{\fontsize{20}{20}\selectfont\insertsectionhead}\hfill};
\node[subsection,below= 2pt of title] (subtitle)
{\hfill\parbox[c][2em][c]{\the\dimexpr\paperwidth-4.2em\relax}{\@sectionsubtitle}\hfill};
\end{tikzpicture}
\end{frame}
\gdef\@sectionsubtitle{}
\endgroup
}
\makeatother
\begin{document}
\sectionsubtitle{Test Subtitle One}
\section{Test Section One}
\begin{frame}
Test Frame
\end{frame}
\sectionsubtitle{Test Subtitle Two}
\section{Test Section Two}
\begin{frame}
Test Frame
\end{frame}
\end{document}
My Problems are: - to get the both texts in the middle and centered. - to move the white rectangle on top of the frame and not in the middle. Somehow it does not work to move it further up.
That's how it should look: (don't bother about the colors and the background) 

