Split highlights into title and items

This commit is contained in:
Arnaud Ysmal 2018-05-08 23:43:11 +02:00
parent 96f48ac739
commit 5d82dbf58b
5 changed files with 49 additions and 14 deletions

View File

@ -93,18 +93,23 @@ type SocialProfile struct {
URL string `json:"url"` URL string `json:"url"`
} }
type JobHighlight struct {
Title string `json:"title"`
Items []string `json:"items"`
}
// Work is the work details of the resume owner. // Work is the work details of the resume owner.
type Work struct { type Work struct {
Name string `json:"name"` Name string `json:"name"`
WorkLocation string `json:"location"` WorkLocation string `json:"location"`
Description string `json:"description"` Description string `json:"description"`
Position string `json:"position"` Position string `json:"position"`
URL string `json:"url"` URL string `json:"url"`
StartDate ResumeDate `json:"startDate"` StartDate ResumeDate `json:"startDate"`
EndDate ResumeDate `json:"endDate"` EndDate ResumeDate `json:"endDate"`
Summary string `json:"summary"` Summary string `json:"summary"`
Highlights []string `json:"highlights"` Highlights []JobHighlight `json:"highlights"`
Keywords []string `json:"keywords"` Keywords []string `json:"keywords"`
} }
// Volunteer is the volunteer details of the resume owner. // Volunteer is the volunteer details of the resume owner.

View File

@ -62,7 +62,14 @@
<div class="highlights"></div> <div class="highlights"></div>
<ul class="list-group"> <ul class="list-group">
{{range .Highlights -}} {{range .Highlights -}}
<li class="list-group-item">{{.}}</li> <li class="list-group-item">
{{.Title}}
{{if .Items -}}
<ul>
{{range .Items}}<li>{{.}}</li>{{end}}
</ul>
{{- end}}
</li>
{{- end}} {{- end}}
</ul> </ul>
{{- end}} {{- end}}

View File

@ -63,7 +63,14 @@
<div class="highlights"></div> <div class="highlights"></div>
<ul class="list-group"> <ul class="list-group">
{{range .Highlights -}} {{range .Highlights -}}
<li class="list-group-item">{{.}}</li> <li class="list-group-item">
{{.Title}}
{{if .Items -}}
<ul>
{{range .Items}}<li>{{.}}</li>{{end}}
</ul>
{{- end}}
</li>
{{- end}} {{- end}}
</ul> </ul>
{{- end}} {{- end}}

View File

@ -156,7 +156,15 @@
{{if $w.Summary}}<div class="summary"><p>{{$w.Summary}}</p></div>{{end}} {{if $w.Summary}}<div class="summary"><p>{{$w.Summary}}</p></div>{{end}}
{{if $w.Highlights -}} {{if $w.Highlights -}}
<ul class="highlights"> <ul class="highlights">
{{range $w.Highlights}}<li>{{.}}</li>{{end}} {{range $w.Highlights -}}
<li>{{.Title}}
{{if .Items -}}
<ul>
{{range .Items}}<li>{{.}}</li>{{end}}
</ul>
{{- end}}
</li>
{{- end}}
</ul>{{end}} </ul>{{end}}
</div> </div>
</section> </section>

View File

@ -156,7 +156,15 @@
{{if $w.Summary}}<div class="summary"><p>{{$w.Summary}}</p></div>{{end}} {{if $w.Summary}}<div class="summary"><p>{{$w.Summary}}</p></div>{{end}}
{{if $w.Highlights -}} {{if $w.Highlights -}}
<ul class="highlights"> <ul class="highlights">
{{range $w.Highlights}}<li>{{.}}</li>{{end}} {{range $w.Highlights -}}
<li>{{.Title}}
{{if .Items -}}
<ul>
{{range .Items}}<li>{{.}}</li>{{end}}
</ul>
{{- end}}
</li>
{{- end}}
</ul>{{end}} </ul>{{end}}
</div> </div>
</section> </section>