diff --git a/cli/resume.go b/cli/resume.go index ef71c07..656b697 100644 --- a/cli/resume.go +++ b/cli/resume.go @@ -36,6 +36,7 @@ import ( _ "jsonresume/themes/kendall" _ "jsonresume/themes/kendallfr" _ "jsonresume/themes/stackoverflow" + _ "jsonresume/themes/stackoverflowfr" ) func main() { diff --git a/themes/kendall/resume.template b/themes/kendall/resume.template index 7f5fa4d..b5074bd 100644 --- a/themes/kendall/resume.template +++ b/themes/kendall/resume.template @@ -2,14 +2,13 @@ - Resume of {{.Basic.Name}} - - + +
diff --git a/themes/kendallfr/kendallfr.go b/themes/kendallfr/kendallfr.go index 4158fdb..bd015d6 100644 --- a/themes/kendallfr/kendallfr.go +++ b/themes/kendallfr/kendallfr.go @@ -26,12 +26,9 @@ package kendallfr import ( - "fmt" "io/ioutil" - "jsonresume/model" "jsonresume/themes" "path" - "strings" "text/template" ) @@ -46,10 +43,10 @@ var Theme = themes.Theme{ Name: "kendallfr", Directory: packageDirectory, Functions: template.FuncMap{ - "iconClass": iconClass, - "formatDateWork": formatDateWork, - "formatDateEdu": formatDateEdu, - "formatDatePub": formatDatePub, + "iconClass": themes.IconClass, + "formatDateWork": themes.FormatDateWorkFR, + "formatDateEdu": themes.FormatDateEduFR, + "formatDatePub": themes.FormatDatePubFR, "css": getCSS, "printcss": getPrintCSS, }, @@ -69,91 +66,3 @@ func getPrintCSS() string { func init() { (&Theme).Register() } -func iconClass(network string) string { - network = strings.ToLower(network) - switch network { - // special cases - case "google-plus": - case "googleplus": - return "fa fa-google-plus" - case "flickr": - case "flicker": - return "fa fa-flickr" - case "dribbble": - case "dribble": - return "fa fa-dribbble" - case "codepen": - return "fa fa-codepen" - case "soundcloud": - return "fa fa-soundcloud" - case "reddit": - return "fa fa-reddit" - case "tumblr": - case "tumbler": - return "fa fa-tumblr" - case "stack-overflow": - case "stackoverflow": - return "fa fa-stack-overflow" - case "blog": - case "rss": - return "fa fa-rss" - case "gitlab": - return "fa fa-gitlab" - case "keybase": - return "fa fa-key" - default: - return "fa fa-" + network - } - - return "fa fa-" + network -} - -func getMonth(date model.ResumeDate) string { - switch date.Month() { - case 1: - return "Janvier" - case 2: - return "Février" - case 3: - return "Mars" - case 4: - return "Avril" - case 5: - return "Mai" - case 6: - return "Juin" - case 7: - return "Juillet" - case 8: - return "Août" - case 9: - return "Septembre" - case 10: - return "Octobre" - case 11: - return "Novembre" - case 12: - return "Décembre" - } - return "" -} -func formatDateWork(date model.ResumeDate) string { - if date.IsZero() { - return "Présent" - } - return fmt.Sprintf("%s %d", getMonth(date), date.Year()) -} - -func formatDateEdu(date model.ResumeDate) string { - if date.IsZero() { - return "Présent" - } - return fmt.Sprintf("%d", date.Year()) -} - -func formatDatePub(date model.ResumeDate) string { - if date.IsZero() { - return "Présent" - } - return fmt.Sprintf("%d %s %d", date.Day(), getMonth(date), date.Year()) -} diff --git a/themes/kendallfr/resume.template b/themes/kendallfr/resume.template index fde864a..2978a3b 100644 --- a/themes/kendallfr/resume.template +++ b/themes/kendallfr/resume.template @@ -77,7 +77,7 @@ {{if .Awards -}}
-

Awards

+

Récompenses