Add short address
This commit is contained in:
parent
e19cc078da
commit
48b71970b6
|
@ -46,8 +46,10 @@ func main() {
|
||||||
var err error
|
var err error
|
||||||
var outf string
|
var outf string
|
||||||
var lang string
|
var lang string
|
||||||
|
var fulladdr bool
|
||||||
var f *os.File
|
var f *os.File
|
||||||
|
|
||||||
|
flag.BoolVar(&fulladdr, "a", false, "Use full address")
|
||||||
flag.StringVar(&resume, "resume", "resume.json", "JSON of resume")
|
flag.StringVar(&resume, "resume", "resume.json", "JSON of resume")
|
||||||
flag.StringVar(&resume, "r", "resume.json", "JSON of resume")
|
flag.StringVar(&resume, "r", "resume.json", "JSON of resume")
|
||||||
flag.StringVar(&theme, "theme", "", "Theme of resume")
|
flag.StringVar(&theme, "theme", "", "Theme of resume")
|
||||||
|
@ -71,7 +73,7 @@ func main() {
|
||||||
if lang != "" {
|
if lang != "" {
|
||||||
r.Language = lang
|
r.Language = lang
|
||||||
}
|
}
|
||||||
|
r.UseFullAddress = fulladdr
|
||||||
if t, exists := themes.Themes[theme]; exists {
|
if t, exists := themes.Themes[theme]; exists {
|
||||||
if err = t.Render(r, f); err != nil {
|
if err = t.Render(r, f); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
|
@ -53,19 +53,20 @@ func (ct *ResumeDate) UnmarshalJSON(b []byte) (err error) {
|
||||||
|
|
||||||
// Resume represent Curriculum Vitae
|
// Resume represent Curriculum Vitae
|
||||||
type Resume struct {
|
type Resume struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Language string `json:"lang"`
|
UseFullAddress bool
|
||||||
Basic Basic `json:"basics"`
|
Language string `json:"lang"`
|
||||||
Work []Work `json:"work"`
|
Basic Basic `json:"basics"`
|
||||||
Volunteer []Volunteer `json:"volunteer"`
|
Work []Work `json:"work"`
|
||||||
Education []Education `json:"education"`
|
Volunteer []Volunteer `json:"volunteer"`
|
||||||
Awards []Award `json:"awards"`
|
Education []Education `json:"education"`
|
||||||
Publications []Publication `json:"publications"`
|
Awards []Award `json:"awards"`
|
||||||
Skills []Skill `json:"skills"`
|
Publications []Publication `json:"publications"`
|
||||||
Languages []Language `json:"languages"`
|
Skills []Skill `json:"skills"`
|
||||||
Interests []Interest `json:"interests"`
|
Languages []Language `json:"languages"`
|
||||||
References []Reference `json:"references"`
|
Interests []Interest `json:"interests"`
|
||||||
Projects []Project `json:"projects"`
|
References []Reference `json:"references"`
|
||||||
|
Projects []Project `json:"projects"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Basic is the basic information for a resume
|
// Basic is the basic information for a resume
|
||||||
|
@ -83,11 +84,12 @@ type Basic struct {
|
||||||
|
|
||||||
// Location is the location details of a resume owner.
|
// Location is the location details of a resume owner.
|
||||||
type UserLocation struct {
|
type UserLocation struct {
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
PostalCode string `json:"postalCode"`
|
ShortAddress string `json:"shortAddress"`
|
||||||
City string `json:"city"`
|
PostalCode string `json:"postalCode"`
|
||||||
CountryCode string `json:"countryCode"`
|
City string `json:"city"`
|
||||||
Region string `json:"region"`
|
CountryCode string `json:"countryCode"`
|
||||||
|
Region string `json:"region"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SocialProfile is the profile of the resume owner.
|
// SocialProfile is the profile of the resume owner.
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -150,6 +150,7 @@
|
||||||
{{if .Basic.Location.City -}}
|
{{if .Basic.Location.City -}}
|
||||||
<div class="contact-item">
|
<div class="contact-item">
|
||||||
<div class="icon pull-left text-center"><span class="fa fa-map-marker fa-fw"></span></div>
|
<div class="icon pull-left text-center"><span class="fa fa-map-marker fa-fw"></span></div>
|
||||||
|
{{- if .UseFullAddress -}}
|
||||||
{{if .Basic.Location.Address}}<div class="title pull-right">{{.Basic.Location.Address}}</div>{{- end}}
|
{{if .Basic.Location.Address}}<div class="title pull-right">{{.Basic.Location.Address}}</div>{{- end}}
|
||||||
<div class="title {{if not .Basic.Location.Address}}only {{- end}} pull-right">
|
<div class="title {{if not .Basic.Location.Address}}only {{- end}} pull-right">
|
||||||
{{- if eq .Language "fr" -}}
|
{{- if eq .Language "fr" -}}
|
||||||
|
@ -158,9 +159,18 @@
|
||||||
{{.Basic.Location.City}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.PostalCode}} {{.Basic.Location.PostalCode}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}
|
{{.Basic.Location.City}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.PostalCode}} {{.Basic.Location.PostalCode}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
|
{{- else -}}
|
||||||
|
<div class="title only pull-right">
|
||||||
|
{{- if eq .Language "fr" -}}
|
||||||
|
{{.Basic.Location.ShortAddress}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}
|
||||||
|
{{- else -}}
|
||||||
|
{{.Basic.Location.ShortAddress}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{if .Basic.Phone -}}
|
{{if and .Basic.Phone .UseFullAddress -}}
|
||||||
<div class="contact-item">
|
<div class="contact-item">
|
||||||
<div class="icon pull-left text-center"><span class="fa fa-phone fa-fw"></span></div>
|
<div class="icon pull-left text-center"><span class="fa fa-phone fa-fw"></span></div>
|
||||||
<div class="title only pull-right">{{.Basic.Phone}}</div>
|
<div class="title only pull-right">{{.Basic.Phone}}</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -40,7 +40,7 @@
|
||||||
<!-- WORK EXPERIENCE -->
|
<!-- WORK EXPERIENCE -->
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2><i class= "fa fa-suitcase ico"></i> {{.Lang.WorkExperience}}</h2>
|
<h2><i class= "fa fa-suitcase ico"></i> {{.Lang.WorkExperience}}</h2>
|
||||||
{{range .Work -}}
|
{{range .Work -}}{{if not .Hide}}
|
||||||
<div class="job clearfix">
|
<div class="job clearfix">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="details">
|
<div class="details">
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{- end}}{{- end}}
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{if .Awards -}}
|
{{if .Awards -}}
|
||||||
|
@ -149,11 +149,17 @@
|
||||||
{{if .Basic.Location.City -}}
|
{{if .Basic.Location.City -}}
|
||||||
<div class="contact-item">
|
<div class="contact-item">
|
||||||
<div class="icon pull-left text-center"><span class="fa fa-map-marker fa-fw"></span></div>
|
<div class="icon pull-left text-center"><span class="fa fa-map-marker fa-fw"></span></div>
|
||||||
|
{{- if .UseFullAddress -}}
|
||||||
{{if .Basic.Location.Address}}<div class="title pull-right">{{.Basic.Location.Address}}</div>{{- end}}
|
{{if .Basic.Location.Address}}<div class="title pull-right">{{.Basic.Location.Address}}</div>{{- end}}
|
||||||
<div class="title {{if not .Basic.Location.Address}}only {{- end}} pull-right">{{if .Basic.Location.PostalCode}} {{.Basic.Location.PostalCode}}{{- end}} {{.Basic.Location.City}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}</div>
|
<div class="title {{if not .Basic.Location.Address}}only {{- end}} pull-right">{{if .Basic.Location.PostalCode}} {{.Basic.Location.PostalCode}}{{- end}} {{.Basic.Location.City}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{- else -}}
|
||||||
|
<div class="title only pull-right">
|
||||||
|
{{.Basic.Location.ShortAddress}}{{if .Basic.Location.Region}}, {{.Basic.Location.Region}}{{- end}}{{if .Basic.Location.CountryCode}} {{.Basic.Location.CountryCode}}{{- end}}</div>
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{if .Basic.Phone -}}
|
{{if and .Basic.Phone .UseFullAddress -}}
|
||||||
<div class="contact-item">
|
<div class="contact-item">
|
||||||
<div class="icon pull-left text-center"><span class="fa fa-phone fa-fw"></span></div>
|
<div class="icon pull-left text-center"><span class="fa fa-phone fa-fw"></span></div>
|
||||||
<div class="title only pull-right">{{.Basic.Phone}}</div>
|
<div class="title only pull-right">{{.Basic.Phone}}</div>
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
{{if .Basic.Location.City}}
|
{{if .Basic.Location.City}}
|
||||||
<span class="location">
|
<span class="location">
|
||||||
|
{{- if .UseFullAddress -}}
|
||||||
{{if .Basic.Location.Address}}
|
{{if .Basic.Location.Address}}
|
||||||
<span class="address">{{.Basic.Location.Address}},</span>
|
<span class="address">{{.Basic.Location.Address}},</span>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
@ -38,6 +39,11 @@
|
||||||
{{if .Basic.Location.City}}
|
{{if .Basic.Location.City}}
|
||||||
<span class="city">{{.Basic.Location.City}},</span>
|
<span class="city">{{.Basic.Location.City}},</span>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- else -}}
|
||||||
|
{{if .Basic.Location.ShortAddress}}
|
||||||
|
<span class="city">{{.Basic.Location.ShortAddress}},</span>
|
||||||
|
{{- end}}
|
||||||
|
{{- end -}}
|
||||||
{{if .Basic.Location.Region}}
|
{{if .Basic.Location.Region}}
|
||||||
<span class="region">{{.Basic.Location.Region}}</span>
|
<span class="region">{{.Basic.Location.Region}}</span>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
@ -59,7 +65,7 @@
|
||||||
<a href="mailto:{{.Basic.Email}}">{{.Basic.Email}}</a>
|
<a href="mailto:{{.Basic.Email}}">{{.Basic.Email}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{if .Basic.Phone}}
|
{{if and .Basic.Phone .UseFullAddress}}
|
||||||
<div class="phone">
|
<div class="phone">
|
||||||
<span class="fas fa-mobile-alt"></span>
|
<span class="fas fa-mobile-alt"></span>
|
||||||
<a href="tel:{{.Basic.Phone}}">{{.Basic.Phone}}</a>
|
<a href="tel:{{.Basic.Phone}}">{{.Basic.Phone}}</a>
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user