
% Vertex beamer theme

\ProvidesPackage{beamerthemevertex}[2014/03/31]

\mode<presentation>

% Process options
\newif\if@simplefootline\@simplefootlinefalse
\DeclareOption{simplefootline}{\@simplefootlinetrue}
\ProcessOptions

% Table of contents
\useoutertheme[subsection=false,shadow]{miniframes}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]

% Itemize
\setbeamertemplate{itemize item}{→}
\setbeamertemplate{itemize subitem}{→}
\setbeamertemplate{itemize subsubitem}{→}
\setlength{\parskip}{0.5em}

% Colors
\definecolor{vertexDarkGrey}{rgb}{0.3019607844,0.2803921571,0.258823530}
\definecolor{vertexLightGrey}{rgb}{0.833333333,0.8117647064,0.790196078}
\setbeamercolor{normal text}{fg=vertexDarkGrey}
\setbeamercolor{math text}{parent=normal text}
\setbeamercolor{structure}{fg=vertexDarkGrey}
\setbeamercolor{palette1}{fg=white, bg=vertexDarkGrey}
\setbeamercolor{palette2}{fg=vertexDarkGrey,bg=vertexLightGrey}
\setbeamercolor{title page}{parent=palette2}
\setbeamercolor{title}{parent=normal text}
\setbeamercolor{subtitle}{parent=normal text}
\setbeamercolor{institute}{parent=normal text}
\setbeamercolor{frametitle}{parent=palette1}
\setbeamercolor{block title}{parent=palette1}
\setbeamercolor{block body}{parent=palette2}
\setbeamercolor{block title example}{parent=palette2}
\setbeamercolor{block body example}{parent=palette2}

% Fonts
\usepackage{fontspec}%	
\usefonttheme{professionalfonts} 
\usepackage{unicode-math}
\newfontfamily\Light{Source Sans Pro Light}%
\newfontfamily\Regular{Source Sans Pro}%
\newfontfamily\Bold{Source Sans Pro Bold}%
\setsansfont{Source Sans Pro}%
\setmonofont[Scale=MatchLowercase]{Source Code Pro}%
\setmathfont{Latin Modern Math}
\setbeamerfont{title}{family=\Light,size=\fontsize{30}{30}}
\setbeamerfont{subtitle}{family=\Light,size=\fontsize{18}{20}}
\setbeamerfont{date}{size=\fontsize{10}{12}}
\setbeamerfont{author}{size=\fontsize{16}{18}}
\setbeamerfont{institute}{size=\fontsize{14}{16}}
\setbeamerfont{section title}{size=\LARGE}
\setbeamerfont{frametitle}{family=\Regular,size=\Large}
\setbeamerfont{block title}{family=\Regular,size=\large}
\setbeamerfont{caption name}{family=\Regular}

% Titlepage
\def\maketitle{\ifbeamer@inframe\titlepage\else\frame[plain]{\titlepage}\fi}
\def\titlepage{\usebeamertemplate{title page}}
\setbeamertemplate{title page}
{%
	\begin{minipage}[b][\paperheight]{\textwidth}
    \centering%
    \begin{beamercolorbox}[wd=\paperwidth,ht=12em,dp=2em]{title page}%
      \centering%
      \ifx\inserttitle\@empty%
      \else%
      {\usebeamerfont{title}\inserttitle\par}%
      \fi%
      \ifx\insertsubtitle\@empty%
      \else%
        \vspace{6mm}
        {\usebeamerfont{subtitle}\insertsubtitle\par}%
      \fi%
    \end{beamercolorbox}%
    \ifx\insertauthor\@empty%
    \else%
      \vspace*{5mm}%
      {\usebeamerfont{author}\insertauthor\par}%
    \fi%
    \ifx\insertinstitute\@empty%
    \else%
      \vspace*{5mm}%
      {\usebeamerfont{institute}\insertinstitute\par}%
    \fi% 
    \vfill
    \ifx\insertdate\@empty%
    \else%
      {\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par}%
    \fi% 
    \vspace{10mm}%
	\end{minipage}
}

% Frametitle
\setbeamertemplate{frametitle}
{%
\nointerlineskip % This one's tricky
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.3cm,rightskip=0.3cm,ht=3ex,dp=1.5ex]{frametitle}
  \usebeamerfont{frametitle}{\setbeamercolor{math text}{parent=palette1}\insertframetitle}%
\end{beamercolorbox}
}

% Footline
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}
{%
\leavevmode%
\if@simplefootline%
  \hfill
\else%
  \begin{beamercolorbox}[wd=.2\paperwidth, ht=1.8em, dp=1em, left, leftskip=1em]{normal text}%
  \insertshortauthor%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.6\paperwidth, ht=1.8em, dp=1em, center]{}%
  \insertshorttitle%
  \end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[wd=.2\paperwidth, ht=1.8em, dp=1em, right, rightskip=1em]{}%
\insertframenumber{} / \inserttotalframenumber%
\end{beamercolorbox}%
}

% Blocks
\setbeamertemplate{block begin}
{%
  \setbeamercolor{item}{parent=block body}
  \par\vskip\medskipamount%
  \begin{beamercolorbox}[sep=.5ex,dp=0.6ex,leftskip=0.5ex,rightskip=0.5ex]{block title}
    \usebeamerfont*{block title}\insertblocktitle%
  \end{beamercolorbox}%
  {\parskip0pt\par}%
  {\nointerlineskip\vskip-0.5pt}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[sep=.5ex,dp=0.4ex,leftskip=0.5ex,rightskip=0.5ex,vmode]{block body}%
}
\setbeamertemplate{block end}  
{\end{beamercolorbox}\vskip\smallskipamount}

% Captions
\usepackage{caption}
\captionsetup[figure]{labelformat=empty}  % get rid of 'figure:' under figures
\captionsetup[subfigure]{labelformat=empty}  % and subfigures
\captionsetup[table]{labelformat=empty}  % same for tables

% Headline
\setbeamertemplate{headline}{}

\mode
<all>
