summaryrefslogtreecommitdiffstats
path: root/awesome-source-cv.cls
diff options
context:
space:
mode:
Diffstat (limited to 'awesome-source-cv.cls')
-rwxr-xr-xawesome-source-cv.cls48
1 files changed, 31 insertions, 17 deletions
diff --git a/awesome-source-cv.cls b/awesome-source-cv.cls
index e5a7e98..93710df 100755
--- a/awesome-source-cv.cls
+++ b/awesome-source-cv.cls
@@ -1,7 +1,7 @@
%% Copyright 2016 Christophe Roger
%
% Author:
-%Christophe Roger
+% Christophe Roger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -17,9 +17,9 @@
%
% This work consists of the files awesome-source-cv.cls
-\ProvidesClass{awesome-source-cv}[2016/10/14 v1.3 Awesome Source CV Class]
+\ProvidesClass{awesome-source-cv}[2016/10/23 v1.4 Awesome Source CV Class]
-\LoadClass[11pt,a4paper]{article}
+\LoadClass[a4paper]{article}
\DeclareOption{green}{
\def\@green{green}
@@ -39,6 +39,7 @@
\DeclareOption{localFont}{
\def\@local{local}
}
+
\ProcessOptions
% Dependences
@@ -59,6 +60,7 @@
\RequirePackage{etoolbox}
\RequirePackage{tikz}
\RequirePackage{pgffor}
+\RequirePackage[skins]{tcolorbox}
% Define default accent colors
\definecolor{basecolor}{HTML}{000066} %BLUE
@@ -144,18 +146,12 @@
\newcommand\link[2]{\color{linkcolor}\href{#1}{#2}\color{Black} }
\newcommand\important[1]{\textbf #1}
-% Create tag
+% Create a tag
+% Usage: \cvtag{<tag label>}
\newcommand{\cvtag}[1]{%
\tikz[baseline]\node[anchor=base,draw=darkGrey!70,rounded corners=0.5ex,inner xsep=1ex,inner ysep =0.55ex,text height=1.3ex,text depth=.25ex]{#1};
}
-% Create skill level
-%\newcommand{\cvskill}[2]{%
-%\textcolor{accentcolor}{\textbf{#1}}\hfill
-%\foreach \x in {1,...,5}{%
-% \space{\color{accentcolor} \ifnumgreater{\x}{#2}{\faCircleThin}{\faCircle}}}\par%
-%}
-
% Render author's name
% Usage: \user{<firstanme>}{<lastname>}
\newcommand\user[2]{\color{accentcolor}{\LARGE #1 \textbf{#2}}\color{Black}} % Username
@@ -183,6 +179,10 @@
% Usage: \tagline{<tag line>}
\newcommand*{\tagline}[1]{\def\@tagline{#1}}
+% Define author's photo
+% Usage \photo{<diameter>}{<photo>}
+\newcommand{\photo}[2]{\def\@photo{#2}\def\@photodiameter{#1}}
+
% Render author's address
% Usage: \address{<address>}
\newcommand*{\address}[1]{\socialtext{\locationSymbol}{#1}}
@@ -211,6 +211,7 @@
% Usage: \smartphone{<mobile phone number>}
\newcommand*\smartphone[1]{\socialtext{\mobileSymbol}{#1}}
+% Render author's tagline
\newcommand\resumetitle[1]{
\par{
\bigskip\center{\Large \color{accentcolor}\textsc{#1}\color{Black}}\par
@@ -223,25 +224,39 @@
% Render CV header
% Needs \@firstname, \@lastname and \@tagline to be defined
-\newcommand{\makecvheader}{
+\newcommand*{\makecvheader}{
+ \ifundef{\@photodiameter}{
+ \begin{minipage}{\linewidth}
+ }{
+ \begin{minipage}{\dimexpr\linewidth-\@photodiameter-2em}
+ }
\user{\@firstname}{\@lastname}\\
\small{\@socialinfo}
+ \end{minipage}
+ \ifdef{\@photodiameter}{
+ \begin{minipage}{\@photodiameter}
+ \tikz\path[fill overzoom image={\@photo}]circle[radius=0.5\linewidth];
+ \end{minipage}
+ }{}
\resumetitle{\@tagline}
}
% Resume part title definition
\newcommand\sectionTitle[2]{\section{\texorpdfstring{\color{accentcolor}#2\enspace #1}{#1}}}
+% Define a new column type for the scholarship environment
\newcolumntype{D}{>{\raggedleft}p{\leftcolumn}}
-% Define the 'scolarship' environment
-\newenvironment{scolarship}{%
+% Define the 'scholarship' environment
+\newenvironment{scholarship}{%
\begin{tabular}{D p{\rightcolumnlength}}
}{%
\end{tabular}
}
-\newcommand\scolarshipentry[2]{
+% Render a scholarshipentry in the scolarship environment
+% Usage: \scholarshipentry{<date>}{<description>}
+\newcommand\scholarshipentry[2]{
#1 & #2 \\
}
@@ -253,8 +268,7 @@
}
% Render a skill in the skills environment
-% Usage:
-% \skill{<skill>}{<level>}
+% Usage: \skill{<skill>}{<level>}
\newcommand\skill[2]{
\textsc{#1} & \foreach \x in {1,...,5}{{\color{accentcolor!80} \ifnumgreater{\x}{#2}{\faCircleO}{\faCircle}}\enspace } \\
}