forked from hugo-toha/toha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple position in one company experience (hugo-toha#9)
* Add partials for multiple positions on one company * Remove unnecessary codes + Fix CSS Co-authored-by: hossainemruz <[email protected]>
- Loading branch information
Showing
6 changed files
with
102 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
<div class="col-10 col-lg-8"> | ||
<div class="experience-entry-heading"> | ||
<h5><a href="{{ .company.url }}">{{ .company.name }}</a></h5> | ||
<h6>{{ .designation }}</h6> | ||
<p class="text-muted">{{ .start }} - {{ if .end }} {{ .end }} {{ else }}Present{{ end }}, {{ .company.location }}</p> | ||
</div> | ||
<p>{{ .company.overview | markdownify }}</p> | ||
<h6 class="text-muted">Responsibilities:</h6> | ||
<ul class="justify-content-around"> | ||
{{ range .responsibilities }} | ||
<li>{{ . | markdownify }}</li> | ||
{{ end }} | ||
</ul> | ||
</div> | ||
{{ if gt (len .positions) 1 }} | ||
{{ partial "experiences/multiple-positions" . }} | ||
{{ else }} | ||
{{ partial "experiences/single-position.html" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="col-10 col-lg-8"> | ||
<div class="experience-entry-heading"> | ||
<!-- For multiple positions, give emphasis on the company name--> | ||
<h5>{{ if .company.url }}<a href={{.company.url}}>{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h5> | ||
|
||
<!-- Total experience duration on a company is time between the starting date of the oldest position and ending date of most recent position --> | ||
{{ $oldestPosition := index (last 1 .positions) 0}} | ||
{{ $mostRecentPosition := index (first 1 .positions) 0}} | ||
<p class="text-muted"> | ||
{{ $oldestPosition.start }} - {{ if $mostRecentPosition.end }}{{ $mostRecentPosition.end }}{{ else }}Present{{ end }}, | ||
{{ .company.location }} | ||
</p> | ||
<!-- Add company overview --> | ||
<p>{{ .company.overview | markdownify }}</p> | ||
</div> | ||
<!-- Add the positions information --> | ||
<div class="positions"> | ||
{{ range $index,$position:= .positions }} | ||
<h6 class="designation">{{ $position.designation }}</h6> | ||
<p class="text-muted">{{ $position.start }} - {{if $position.end }} {{ $position.end }} {{else}} Present {{end}}</p> | ||
<!-- Add the responsibilities handled at this position --> | ||
<ul class="justify-content-around"> | ||
{{ range $position.responsibilities }} | ||
<li>{{ . | markdownify }}</li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="col-10 col-lg-8"> | ||
<div class="experience-entry-heading"> | ||
{{ $position:= index .positions 0 }} | ||
<!-- For single position, give emphasis on the designation--> | ||
<h5>{{ $position.designation }}</h5> | ||
<h6>{{ if .company.url }}<a href={{.company.url}}>{{ .company.name }}</a>{{ else }}{{ .company.name }}{{ end }}</h6> | ||
<!-- Add experience duration info --> | ||
<p class="text-muted">{{ $position.start }} - {{ if $position.end }} {{ $position.end }} {{ else }}Present{{ end }}, | ||
{{ .company.location }} | ||
</p> | ||
</div> | ||
<!-- Add company overview --> | ||
<p>{{ .company.overview | markdownify }}</p> | ||
<!-- Add the responsibilities handled at this position --> | ||
<h6 class="text-muted">Responsibilities:</h6> | ||
<ul class="justify-content-around"> | ||
{{ range $position.responsibilities }} | ||
<li>{{ . | markdownify }}</li> | ||
{{ end }} | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters