From aba5f7f0b9d5b7c05a4d34903b1074f7c4f09bee Mon Sep 17 00:00:00 2001
From: Christophe Roger <darwiinc@live.fr>
Date: Fri, 14 Oct 2016 22:02:45 +1100
Subject: - New class version (1.3)

---
 awesome-source-cv.cls | 98 ++++++++++++++++++++++++++++++++-------------------
 1 file changed, 61 insertions(+), 37 deletions(-)

(limited to 'awesome-source-cv.cls')

diff --git a/awesome-source-cv.cls b/awesome-source-cv.cls
index 1d81ef7..4843cfd 100755
--- a/awesome-source-cv.cls
+++ b/awesome-source-cv.cls
@@ -17,36 +17,20 @@
 %
 % This work consists of the files awesome-source-cv.cls 
 
-\ProvidesClass{awesome-source-cv}[2016/09/20 v1.2 Awesome Source CV Class]
+\ProvidesClass{awesome-source-cv}[2016/10/14 v1.3 Awesome Source CV Class]
 
 \LoadClass[11pt,a4paper]{article}
 
-\newcommand{\setColors}[3] {
-  \newcommand{\accentColor}{\color{#1}}
-  \newcommand{\linkColor}{\color{#1}}
-  \newcommand{\symbolcolor}{\textcolor{#1}}
-}
-
-\newcommand{\resetColors}[3] {
-  \renewcommand{\accentColor}{\color{#1}}
-  \renewcommand{\linkColor}{\color{#1}}
-  \renewcommand{\symbolcolor}{\textcolor{#1}}
-}
-
-\setColors{Blue}{Blue}{Blue}
-
 \DeclareOption{green}{
-  \resetColors{PineGreen}{PineGreen}{PineGreen}
+  \def\@green{green}
 }
 
 \DeclareOption{red}{
-  \resetColors{Red}{Red}{Red}
+  \def\@red{red}
 }
 
-\DeclareOption{myBlue}{
-  \renewcommand{\accentColor}{\color{myBlue}}
-  \renewcommand{\linkColor}{\color{myBlue}}
-  \renewcommand{\symbolcolor}{\textcolor{myBlue}}
+\DeclareOption{indigo}{
+  \def\@indigo{indigo}
 }
 
 \DeclareOption{localFont}{
@@ -69,12 +53,44 @@
 \RequirePackage{array}
 \RequirePackage{enumitem}
 \RequirePackage{longtable} 	
-\RequirePackage{xifthen}
+\RequirePackage{etoolbox}
+\RequirePackage{tikz}
+\RequirePackage{pgffor}
 
-\definecolor{myBlue}{HTML}{FF9B1C}
+% Define default colors
+\definecolor{accentcolor}{rgb}{0,0.2,0.6}
+\definecolor{linkcolor}{rgb}{0,0.2,0.6}
+\definecolor{symbolcolor}{rgb}{0,0.2,0.6}
+
+\ifundef{\@green} 
+{
+  \ifundef{\@red} 
+  {
+    \ifundef{\@indigo}
+    {}
+    {
+      \definecolor{accentcolor}{rgb}{0.2, 0.07, 0.48}
+      \definecolor{linkcolor}{rgb}{0.2, 0.07, 0.48}
+      \definecolor{symbolcolor}{rgb}{0.2, 0.07, 0.48}
+    }
+  }
+  {
+    \definecolor{accentcolor}{rgb}{0.83, 0.0, 0.0}
+    \definecolor{linkcolor}{rgb}{0.83, 0.0, 0.0}
+    \definecolor{symbolcolor}{rgb}{0.83, 0.0, 0.0}
+  }  
+}
+{
+  \definecolor{accentcolor}{rgb}{0.0, 0.62, 0.38}
+  \definecolor{linkcolor}{rgb}{0.0, 0.62, 0.38}
+  \definecolor{symbolcolor}{rgb}{0.0, 0.62, 0.38}
+}
+
+
+\definecolor{darkGrey}{HTML}{989898}
 
 % Setup hyperref package, and colours for links
-\definecolor{linkcolour}{rgb}{0,0.2,0.6}
+%\definecolor{linkcolour}{rgb}{0,0.2,0.6}
 \hypersetup{breaklinks}
 
 \pagestyle{empty}                         % non-numbered pages
@@ -98,17 +114,20 @@
 %
 
 % Define font to use according to localFont option
-\ifthenelse{\isundefined{\@local}}
+\ifundef{\@local}
 {
   %\setmainfont[BoldFont = Helvetica Neue, ItalicFont=Helvetica Neue Thin Italic ,SmallCapsFont = Helvetica Neue Light]{Helvetica Neue Thin}
-  \setmainfont[BoldFont = Source Sans Pro Semibold, ItalicFont=Source Sans Pro Light Italic,SmallCapsFont = Source Sans Pro]{Source Sans Pro Light}
+  \setmainfont{Source Sans Pro Light}[
+    BoldFont = Source Sans Pro Semibold, 
+    ItalicFont= Source Sans Pro Light Italic,
+    SmallCapsFont = Source Sans Pro]
 }
 {
   \setmainfont{SourceSansPro-Light}[
     Path = fonts/, 
-      BoldFont = SourceSansPro-Semibold, 
-      ItalicFont = SourceSansPro-LightIt, 
-      SmallCapsFont = SourceSansPro-Regular]
+    BoldFont = SourceSansPro-Semibold, 
+    ItalicFont = SourceSansPro-LightIt, 
+    SmallCapsFont = SourceSansPro-Regular]
 }
 
 %New length definition
@@ -130,20 +149,25 @@
 \newcommand{\mobileSymbol}{\faMobilePhone}
 \newcommand{\githubSymbol}{\faGithub}
 
-\newcommand\link[2]{\linkColor\href{#1}{#2}\color{Black} }
+\newcommand\link[2]{\color{linkcolor}\href{#1}{#2}\color{Black} }
 \newcommand\important[1]{\textbf #1}
 
+% Create tag
+\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};
+}
+
 % Render author's name
 % Usage: \user{<firstanme>}{<lastname>}
-\newcommand\user[2]{\accentColor{\LARGE #1 \textbf{#2}}\color{Black}}      % Username
+\newcommand\user[2]{\color{accentcolor}{\LARGE #1 \textbf{#2}}\color{Black}}      % Username
 
 % Render a text with its symbol
 % Usage; \socialtext{<icon>}{<label>}
-\newcommand{\socialtext}[2]{\mbox{\symbolcolor{#1}\hspace{0.5em}#2\hspace{1em}}}
+\newcommand{\socialtext}[2]{\mbox{\textcolor{symbolcolor}{#1}\hspace{0.5em}#2\hspace{1em}}}
 
 % Render a link with its symbol
 % Usage; \sociallink{<icon>}{<label>}
-\newcommand{\sociallink}[3]{\mbox{\symbolcolor{#1}\hspace{0.5em}\link{#2}{#3}\hspace{1em}}}
+\newcommand{\sociallink}[3]{\mbox{\textcolor{symbolcolor}{#1}\hspace{0.5em}\link{#2}{#3}\hspace{1em}}}
 
 % Define author's name
 % Usage: \name{<firstname>}{<lastname>}
@@ -190,7 +214,7 @@
 
 \newcommand\resumetitle[1]{
 	\par{
-		\bigskip\center{\Large \accentColor\textsc{#1}\color{Black}}\par
+		\bigskip\center{\Large \color{accentcolor}\textsc{#1}\color{Black}}\par
 	}
 	\bigskip
 }
@@ -207,7 +231,7 @@
 }
 
 % Resume part title definition
-\newcommand\sectionTitle[2]{\section{\texorpdfstring{\accentColor#2\enspace #1}{#1}}}
+\newcommand\sectionTitle[2]{\section{\texorpdfstring{\color{accentcolor}#2\enspace #1}{#1}}}
 
 % Define the 'experiences' environment
 \newenvironment{experiences}{%
@@ -228,7 +252,7 @@
   \textsc{#5}    & \begin{minipage}[t]{\rightcolumnlength}
   					         #6
                    \end{minipage}										\\
-                 & \footnotesize{\emph{Technologies utilisées:} #7 } 	\\
+                 & \footnotesize{\foreach \n in {#7}{\cvtag{\n}}} 	\\
   }
 
 % Render a consultant experience in the experiences environment
@@ -245,7 +269,7 @@
   				       & 	\begin{minipage}[t]{\rightcolumnlength}
   						        #8
                    	\end{minipage}										\\
-                 & \footnotesize{\emph{Technologies utilisées:} #9 } 	\\
+                 & \footnotesize{\foreach \n in {#9}{\cvtag{\n}} } 	\\
   }
 
 \newcommand\emptySeparator{\multicolumn{2}{c}{}\\}
-- 
cgit v1.2.3

