\documentclass[c]{beamer}
\usetheme[NoFinalFrame]{STORM}

%%%%%%%%%%%%% packages
\usepackage{cite}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{calc,epic,relsize}
\usepackage{cmbright}
\usepackage[T1]{fontenc}
\usepackage{caption}
\usepackage{centernot}
\usepackage{dsfont}
\usepackage{subcaption}
\usepackage{float}
\usepackage{textcomp}
\usepackage{faktor}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{indentfirst}
\usepackage{amssymb}
\usepackage{fancybox}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{centernot}
\usepackage{esint}
\usepackage{tikz}
\usepackage[most]{tcolorbox}

% Set the overall layout of the tree
\tikzstyle{level 1}=[level distance=4cm, sibling distance=3.5cm,->]
\tikzstyle{level 2}=[level distance=4cm, sibling distance=2cm,->]

% Define styles for bags and leafs
\tikzstyle{bag} = [text width=2em, text centered]
\tikzstyle{end} = []


\setbeamertemplate{section in toc}{\hspace*{1em}\inserttocsection}
\setbeamertemplate{subsection in toc}{\hspace*{2em}\inserttocsubsection}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%commands
\newcommand{\Om}{\Omega}
\newcommand{\om}{\omega}
\newcommand{\vfi}{\varphi}
\newcommand{\veps}{\varepsilon}
\newcommand{\lra}{\longrightarrow}
\newcommand{\ovl}{\overline}
\newcommand{\unl}{\underline}
\newcommand{\ubr}{\underbrace}
\newcommand{\stt}{\substack}
\newcommand{\cu}{\subseteq}
\newcommand{\wt}{\widetilde}
\newcommand{\esssup}{\textrm{ess}\,\textrm{sup}}

\newcommand{\mbb}{\mathbb}

\newcommand{\mcal}{\mathcal}
\newcommand{\mcalf}{\mathcal{F}}
\newcommand{\mcala}{\mathcal{A}}
\newcommand{\mcalb}{\mathcal{B}}

\newcommand{\mfh}{\mathcal{H}}

\newcommand{\mf}{\mathfrak}
\newcommand{\mfa}{\mathfrak{A}}
\newcommand{\mfb}{\mathfrak{B}}
\newcommand{\mfp}{\mathfrak{P}}
\newcommand{\mff}{\mathcal{F}}
\newcommand{\mfe}{\mathcal{E}}
\newcommand{\filtration}{\mbb{F}}
\newcommand{\filtrationd}{\mbb{F}_\delta}
\newcommand{\filtratione}{\mbb{E}}


\newcommand{\D}{\mathfrak{D}}
\newcommand{\J}{\mathfrak{J}}

\newcommand{\T}{{[0,T]}}
\newcommand{\ranget}{t \in \T}
\newcommand{\rangetd}{t \in [\delta,T]}
\newcommand{\ranges}{s \in [0,T]}
\newcommand{\rangeo}{\omega \in \Omega}
\newcommand{\reali}{\mbb{R}}
\newcommand{\realio}{{\mbb{R}_{0}}}
\newcommand{\rangez}{z \in \mbb{R}_{0}}
\newcommand{\rangex}{x \in X}
\newcommand{\rangext}{(x,t)\in X\times [0,T]}

\newcommand{\rangeint}{\int_0^T \hspace{-3mm}\int_\realio}
\newcommand{\cp}{\widetilde N }

\newcommand{\subconet}{L_{t}^{+}}
\newcommand{\subcones}{L_{s}^{+}}
\newcommand{\conet}{L_{p}^{+}(\mathcal{F}_{t})}
\newcommand{\cones}{L_{p}^{+}(\mathcal{F}_{s})}

\newcommand{\funsp}{L_2 (P\times M)}
\newcommand{\fun}{L_2 (P)}
\newcommand{\integrand}{L_2 (\mfp)}
\newcommand{\prodsigma}{\mfb_X \times \mfb_{[0,T]}}

\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\E}{\ensuremath{\mathbb{E}}}
\def\e{{\mathrm{e}}}


%%%%%%%%%%%%%%%MIEI COMANDI%%%%%%%%%%%%%%%%%%%

\newcommand{\N}{\mathbb{N} }
\newcommand{\Z}{\mathbb{Z} }

\newcommand{\bbG}{\mathbb{G} }
\newcommand{\bbF}{\mathbb{F} }
\newcommand{\F}{\mathcal{F}}
\newcommand{\calG}{\mathcal{G}}
\newcommand{\calA}{\mathcal{A}}
\newcommand{\calU}{\mathcal{U}}
\newcommand{\calL}{\mathcal{L}}
\newcommand{\calH}{\mathcal{H}}
\newcommand{\hatu}{\hat{u}}
\newcommand{\hatX}{\hat{X}}
\newcommand{\hatY}{\hat{Y}}
\newcommand{\hatphi}{\hat{\phi}}
\newcommand{\hatk}{\hat{\kappa}}
\newcommand{\hatb}{\hat{b}}
\newcommand{\hath}{\hat{h}}
\newcommand{\hatF}{\hat{F}}
\newcommand{\tH}{\widetilde{H}}
\newcommand{\probspace}{(\Omega,\F,P)}
\renewcommand{\t}{t \in [0,T]}
\DeclarePairedDelimiter{\set}{ \{ } { \} }

%%%%%%%%%%%%%%%%%%%

%%%%%%%%NEW BLOCKS%%%%%%%%%%%%%%%%
\definecolor{BluPastello}{RGB}{175,238,238}
\definecolor{RossoPastello}{RGB}{194,0,65}
\definecolor{VerdePastello}{RGB}{64, 226, 119}
\definecolor{GrigioChiaro}{RGB}{242,242,242}
\definecolor{GrigioScuro}{RGB}{217,217,217}
\definecolor{bluPisa}{RGB}{190,3,12}
\definecolor{grigioPantano}{RGB}{31,130,220}
\definecolor{sfondosection}{RGB}{0,85,201}
\definecolor{gialloPisano}{RGB}{248,173,58}
\definecolor{text}{RGB}{32,33,43}
\definecolor{caso}{RGB}{12,40,66}
\definecolor{BluSircana}{RGB}{15,74,124}

\newenvironment<>{redblock}[1]{%
	\setbeamercolor{block title}{fg=RossoPastello!80,bg=white}%
	\setbeamercolor{block body}{fg=black,bg=white}
	\begin{block}#2{#1}}{\end{block}}

\newenvironment<>{blueblock}[1]{%
	\setbeamercolor{block title}{fg=BluSircana!50!BluPastello,bg=white}%
	\setbeamercolor{block body}{fg=black,bg=white}
	\begin{block}#2{#1}}{\end{block}}

\newenvironment<>{greenblock}[1]{%
	\setbeamercolor{block title}{fg=VerdePastello,bg=white}%
	\setbeamercolor{block body}{fg=black,bg=white}
	\begin{block}#2{#1}}{\end{block}}


\newtcolorbox{linedblueblock}[2][]{
	beamer,
	colback=white,
	colframe=white,
	coltitle=BluSircana,
	fonttitle=\bfseries,
	no shadow,
	oversize,
	overlay={
		\draw[BluPastello, ultra thick] 
		([xshift=10pt,yshift=-0.5\pgflinewidth]title.south west) --
		([xshift=-250pt,yshift=-0.5\pgflinewidth]title.south east);},
	#1,title=#2}
\makeatletter
\tikzset{beamer@color/.style={top color=white,bottom color=white}}
\makeatother

\newtcolorbox{longlinedblueblock}[2][]{
	beamer,
	colback=white,
	colframe=white,
	coltitle=BluSircana,
	fonttitle=\bfseries,
	no shadow,
	oversize,
	overlay={
		\draw[BluPastello, ultra thick] 
		([xshift=10pt,yshift=-0.5\pgflinewidth]title.south west) --
		([xshift=-100pt,yshift=-0.5\pgflinewidth]title.south east);},
	#1,title=#2}
\makeatletter
\tikzset{beamer@color/.style={top color=white,bottom color=white}}
\makeatother

\newtcolorbox{linedredblock}[2][]{
	beamer,
	colback=white,
	colframe=white,
	coltitle=RossoPastello,
	fonttitle=\bfseries,
	no shadow,
	oversize,
	overlay={
		\draw[RossoPastello!30, ultra thick] 
		([xshift=10pt,yshift=-0.5\pgflinewidth]title.south west) --
		([xshift=-250pt,yshift=-0.5\pgflinewidth]title.south east);},
	#1,title=#2}
\makeatletter
\tikzset{beamer@color/.style={top color=white,bottom color=white}}
\makeatother

\newtcolorbox{linedgreenblock}[2][]{
	beamer,
	equal height group=beamer,
	colback=white,
	colframe=white,
	coltitle=VerdePastello,
	fonttitle=\bfseries,
	no shadow,
	oversize,
	overlay={
		\draw[VerdePastello!30, ultra thick] 
		([xshift=10pt,yshift=-0.5\pgflinewidth]title.south west) --
		([xshift=-250pt,yshift=-0.5\pgflinewidth]title.south east);},
	#1,title=#2}
\makeatletter
\tikzset{beamer@color/.style={top color=white,bottom color=white}}
\makeatother

%%%%%%%%%%%%%%%%%%%%MARGINS%%%%%%%%%%%%%%%%
\setbeamersize{text margin left=5mm,text margin right=5mm} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Beamer example}
\subtitle{Showcasing the theme STORM}
\author{Martin Hels\o}

\begin{document}

\section{Introduction}

\begin{frame}
    \frametitle{Ordinary table of contents}
    \tableofcontents
\end{frame}

\begin{frame}
    \frametitle{Table of contents that highlights the current section}
    \tableofcontents[currentsection]
\end{frame}

\section{Mathematics}
\subsection{Theorem}

\begin{frame}
    \frametitle{Mathematics}

    \begin{theorem}[Fermat's little theorem]
        For a prime~\(p\) and \(a \in \mathbb{Z}\) it holds that \(a^p \equiv a \pmod{p}\).
    \end{theorem}

    \begin{proof}
        The invertible elements in a field form a group under multiplication.
        In particular, the elements
        \begin{equation*}
            1, 2, \ldots, p - 1 \in \mathbb{Z}_p
        \end{equation*}
        form a group under multiplication modulo~\(p\).
        This is a group of order \(p - 1\).
        For \(a \in \mathbb{Z}_p\) and \(a \neq 0\) we thus get \(a^{p-1} = 1 \in \mathbb{Z}_p\).
        The claim follows.
    \end{proof}
\end{frame}

\subsection{Example}

\begin{frame}
    \frametitle{Mathematics}

    \begin{example}
        The function \(\phi \colon \mathbb{R} \to \mathbb{R}\) given by \(\phi(x) = 2x\) is continuous at the point \(x = \alpha\),
        because if \(\epsilon > 0\) and \(x \in \mathbb{R}\) is such that \(\lvert x - \alpha \rvert < \delta = \frac{\epsilon}{2}\),
        then
        \begin{equation*}
            \lvert \phi(x) - \phi(\alpha)\rvert = 2\lvert x - \alpha \rvert < 2\delta = \epsilon.
        \end{equation*}
    \end{example}
\end{frame}

\section{Highlighting}

\begin{frame}
    \frametitle{Highlighting}

    Some times it is useful to \alert{highlight} certain words in the text.

    \begin{alertblock}{Important message}
        If a lot of text should be \alert{highlighted}, it is a good idea to put it in a box.
    \end{alertblock}

    It is easy to match the \structure{color theme}.
\end{frame}
\section{Personal blocks}
\begin{frame}
Here I have introduced some new personal blocks that are really simple. They come in 3 colors:
\begin{blueblock}{blueblock}
	in blue
\end{blueblock}
\begin{redblock}{redblock}
	in red
\end{redblock}
\begin{greenblock}{redblock}
	in green
\end{greenblock}

\end{frame}
\begin{frame}
	Also you can have the same blocks with a line, by just writing
	\begin{linedblueblock}{linedblueblock}
		for blue
	\end{linedblueblock}
\begin{linedredblock}{linedredblock}
	for red
\end{linedredblock}
\begin{linedgreenblock}{linedgreenblock}
	for green
\end{linedgreenblock}
the line has a standard size, but if you want it longer you can write 
\begin{longlinedblueblock}{longlinedblueblock}
	And have something like this. This block only comes in blue
\end{longlinedblueblock}
\end{frame}
\section{Lists}

\begin{frame}
    \frametitle{Lists}

    \begin{itemize}
        \item
        Bullet lists are marked with box.
    \end{itemize}

    \begin{enumerate}
        \item
        Numbered lists are marked with a number inside a box.
    \end{enumerate}

    \begin{description}
        \item[Description] highlights important words with the structure color.
    \end{description}

    \begin{example}
        \begin{itemize}
            \item
            Lists change color after the environment.
        \end{itemize}
    \end{example}
\end{frame}


\section{References}


\begin{frame}[allowframebreaks]
    \frametitle{References}

    \begin{thebibliography}{}

        % Article is the default.
        \setbeamertemplate{bibliography item}[book]

        \bibitem{Hartshorne1977}
        R.~Hartshorne.
        \newblock \emph{Algebraic Geometry}.
        \newblock Springer-Verlag, 1977.

        \setbeamertemplate{bibliography item}[article]

        \bibitem{Artin1966}
        M.~Artin.
        \newblock On isolated rational singularities of surfaces.
        \newblock \emph{Amer. J. Math.}, 80(1):129--136, 1966.

        \setbeamertemplate{bibliography item}[online]

        \bibitem{Vakil2006}
        R.~Vakil.
        \newblock \emph{The moduli space of curves and Gromov--Witten theory}, 2006.
        \newblock \url{http://arxiv.org/abs/math/0602347}

        \setbeamertemplate{bibliography item}[triangle]

        \bibitem{AM1969}
        M.~Atiyah og I.~Macdonald.
        \newblock \emph{Introduction to commutative algebra}.
        \newblock Addison-Wesley Publishing Co., Reading, Mass.-London-Don
        Mills, Ont., 1969

        \setbeamertemplate{bibliography item}[text]

        \bibitem{Fraleigh1967}
        J.~Fraleigh.
        \newblock \emph{A first course in abstract algebra}.
        \newblock Addison-Wesley Publishing Co., Reading, Mass.-London-Don Mills, Ont., 1967

    \end{thebibliography}
\end{frame}

\end{document}