108 lines
2.2 KiB
TeX
108 lines
2.2 KiB
TeX
\ProvidesClass{friggeri-cv}[2012/04/30 CV class]
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
\DeclareOption{print}{\def\@cv@print{}}
|
|
\DeclareOption*{%
|
|
\PassOptionsToClass{\CurrentOption}{article}%
|
|
}
|
|
\ProcessOptions\relax
|
|
\LoadClass{article}
|
|
|
|
|
|
%%%%%%%%%%
|
|
% Colors %
|
|
%%%%%%%%%%
|
|
|
|
\RequirePackage{xcolor}
|
|
|
|
\ifdefined\@cv@print
|
|
\colorlet{green}{gray}
|
|
\colorlet{orange}{gray}
|
|
\colorlet{purple}{gray}
|
|
\colorlet{red}{gray}
|
|
\colorlet{blue}{white}
|
|
\colorlet{fillheader}{white}
|
|
\colorlet{header}{black}
|
|
\else
|
|
\colorlet{fillheader}{blue!30!black}
|
|
\colorlet{header}{white}
|
|
\fi
|
|
\colorlet{textcolor}{gray}
|
|
\colorlet{headercolor}{gray}
|
|
|
|
\RequirePackage{tikz}
|
|
|
|
\newcommand{\header}[2]{%
|
|
\begin{tikzpicture}[remember picture,overlay]
|
|
\node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=4cm] (box) at (current page.north){};
|
|
\node [anchor=center] (name) at (box) {%
|
|
\fontsize{40pt}{72pt}\color{header}%
|
|
{\huge #1}
|
|
};
|
|
\node [anchor=north] at (name.south) {%
|
|
\fontsize{14pt}{24pt}\color{header}%
|
|
{\Large #2}%
|
|
};
|
|
\end{tikzpicture}
|
|
\vspace{2.5cm}
|
|
\vspace{-2\parskip}
|
|
}
|
|
|
|
|
|
%%%%%%%%%%%%%
|
|
% Structure %
|
|
%%%%%%%%%%%%%
|
|
\RequirePackage{parskip}
|
|
|
|
\newcounter{colorCounter}
|
|
|
|
\pagestyle{empty}
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%
|
|
% List environment %
|
|
%%%%%%%%%%%%%%%%%%%%
|
|
|
|
\setlength{\tabcolsep}{0pt}
|
|
\newenvironment{entrylist}{%
|
|
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
|
|
}{%
|
|
\end{tabular*}
|
|
}
|
|
%\renewcommand{\bfseries}{\color{headercolor}}
|
|
\newcommand{\entry}[4]{%
|
|
#1&\parbox[t]{11.8cm}{%
|
|
\textbf{#2}%
|
|
\hfill%
|
|
{#3}\\%
|
|
{\footnotesize #4}\vspace{\parsep}%
|
|
}\\}
|
|
|
|
|
|
%%%%%%%%%%%%%%
|
|
% Side block %
|
|
%%%%%%%%%%%%%%
|
|
|
|
\RequirePackage[absolute,overlay]{textpos}
|
|
\setlength{\TPHorizModule}{1cm}
|
|
\setlength{\TPVertModule}{1cm}
|
|
\newenvironment{aside}{%
|
|
\let\oldsection\section
|
|
\renewcommand{\section}[1]{
|
|
\par\vspace{\baselineskip}{\Large\color{headercolor} ##1}
|
|
}
|
|
\begin{textblock}{3.6}(1.5, 4.33)
|
|
\begin{flushleft}
|
|
}{%
|
|
\end{flushleft}
|
|
\end{textblock}
|
|
\let\section\oldsection
|
|
}
|
|
|
|
%%%%%%%%%%%%%%%%
|
|
% Other tweaks %
|
|
%%%%%%%%%%%%%%%%
|
|
|
|
\RequirePackage[left=6.1cm,top=2cm,right=1.5cm,bottom=2.5cm,nohead,nofoot]{geometry}
|
|
\RequirePackage[colorlinks=true,urlcolor=blue!30!black]{hyperref}
|