\usetheme[logo=logo.png, faculty=ped]{fibeamer}

\usepackage{subcaption}
\usepackage{listings}
\usepackage{tikz}
\usepackage{tikz-timing}
\usepackage{circuitikz}
\usetikzlibrary{positioning}

\usepackage{xcolor}
\definecolor{lts-orange}{HTML}{F6B26B}
\definecolor{lts-yellow}{HTML}{F1C232}
\definecolor{lts-green}{HTML}{93c47d}
\definecolor{lts-red}{HTML}{cc4125}
\definecolor{lts-blue}{HTML}{4a86e8}
\definecolor{lts-magenta}{HTML}{a64d79}

\usepackage{tcolorbox}
\tcbset{
    colframe=white,
    colback=white!95!black,
    coltext=white!20!black,
    arc=0mm,
    boxsep=1mm,
    left=0mm,
    right=0mm,
    top=0mm,
    bottom=0mm
}
\tcbuselibrary{listings, minted, skins}

\makeatletter
\setlength\fibeamer@lengths@logowidth{1.6em}
\setlength\fibeamer@lengths@logoheight{1.4em}
\setbeamertemplate{title page}{%
	%   This is slide 0
	\setcounter{framenumber}{0}

	%   Input the university logo
	\begin{tikzpicture}[
			remember picture,
			overlay,
			xshift=21\fibeamer@lengths@logowidth,
			yshift=-9.1\fibeamer@lengths@logoheight
		]
		\node at (0,0) {
			\fibeamer@includeLogo[
				width=\fibeamer@lengths@logowidth,
				height=\fibeamer@lengths@logoheight
			]};
	\end{tikzpicture}

	%   Input the title
	\usebeamerfont{title}%
	\usebeamercolor[fg]{title}%
	\begin{minipage}[b][2\baselineskip][b]{\textwidth}%
		\raggedright\inserttitle
	\end{minipage}
	\vskip-.5\baselineskip

	%   Input the dashed line
	\begin{pgfpicture}
		\pgfsetlinewidth{2pt}
		\pgfsetroundcap
		\pgfsetdash{{0pt}{4pt}}{0cm}

		\pgfpathmoveto{\pgfpoint{0mm}{0mm}}
		\pgfpathlineto{\pgfpoint{\textwidth-2mm}{0mm}}

		\pgfusepath{stroke}
	\end{pgfpicture}
	\vfill
	%   Input the subtitle
	\usebeamerfont{subtitle}%
	\usebeamercolor[fg]{subtitle}%
	\begin{minipage}{\textwidth}
		\raggedright%
		\insertsubtitle%
	\end{minipage}\vskip.25\baselineskip

	%   Input the author's name
	\usebeamerfont{author}%
	\usebeamercolor[fg]{author}%
	\begin{minipage}{\textwidth}
		\raggedright%
		\insertauthor
	\end{minipage}%
}

\definecolor{fibeamer@lightOrange}{HTML}{329cac}
%\definecolor{fibeamer@lightOrange}{HTML}{65acef}
% \definecolor{fibeamer@orange}{HTML}{228c9c}
%\definecolor{fibeamer@orange}{HTML}{999999}
%\definecolor{fibeamer@orange}{HTML}{65acef}
\definecolor{fibeamer@orange}{HTML}{329cac}
\setbeamercolor{block body}{bg=white, fg=black}
\setbeamercolor{example title}{bg=white, fg=black}

\setbeamertemplate{caption}[numbered]

\colorlet{fillcolor}{fibeamer@orange}


\newcommand{\ftitle}[1]{
        \addtobeamertemplate{frametitle}{
            \vspace*{.2cm}
            \scriptsize
            \textcolor{gray!50!white}{#1}\vspace*{-.8cm}
        }{}
}
\newenvironment{myframe}[2][\insertsection]{%
        \ftitle{#1}
        \begin{frame}{#2}%
    }{\end{frame}}
\newenvironment{myfframe}[2][\insertsection]{%
        \ftitle{#1}
        \begin{frame}[fragile]{#2}%
    }{\end{frame}}
\newenvironment{myframe*}[2][\insertsection]{%
    \ftitle{#1}
	\begin{frame}[noframenumbering]{#2}%
		}{%
	\end{frame}
}
\setbeamertemplate{footline}{%
    \ifnum\c@framenumber=0\else%
        \begin{tikzpicture}[overlay]
            \node[anchor=south east,
                yshift=\fibeamer@lengths@footerpad,
                xshift=-\fibeamer@lengths@footerpad] at
                (current page.south east) {
                    \usebeamercolor[fg]{framenumber}%
                    \usebeamerfont{framenumber}%
                    \footnotesize%
                    \insertframenumber
                };
        \end{tikzpicture}
    \fi
}
\makeatother

\newtcbox{\mylib}[1][white]{
    enhanced,
    nobeforeafter,
    tcbox raise base,
    boxrule=1.5pt,
    top=0mm,
    bottom=0mm,
    right=0mm,
    left=0mm,
    arc=2pt,
    boxsep=3pt,
    coltext=white!20!black,
    colback=black!5!white,
    colframe=#1,
    fontupper=\ttfamily\footnotesize
}

\robustify{\mylib}

\pdfstringdefDisableCommands{%
  \def\mylib#1{'#1'}%
}

\addtobeamertemplate{frametitle}{
    \vspace*{.2cm}
    \scriptsize
    \textcolor{gray!50!white}{\secname}\vspace*{-.8cm}
}{}
