diff --git a/layouts/partials/experiences/experience-info.html b/layouts/partials/experiences/experience-info.html index b2d1ea8..d8892de 100644 --- a/layouts/partials/experiences/experience-info.html +++ b/layouts/partials/experiences/experience-info.html @@ -1,14 +1,5 @@ -
-
-
{{ .company.name }}
-
{{ .designation }}
-

{{ .start }} - {{ if .end }} {{ .end }} {{ else }}Present{{ end }}, {{ .company.location }}

-
-

{{ .company.overview | markdownify }}

-
Responsibilities:
- -
+{{ if .positions }} + {{ partial "experiences/multiple-positions" . }} +{{ else }} + {{ partial "experiences/one-position.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/experiences/multiple-positions.html b/layouts/partials/experiences/multiple-positions.html new file mode 100644 index 0000000..6ed607c --- /dev/null +++ b/layouts/partials/experiences/multiple-positions.html @@ -0,0 +1,23 @@ +
+
+
{{ if .company.url }} {{end }} {{ .company.name }}
+ {{ $oldestPosition := index (last 1 .positions) 0}} + {{ $mostRecentPosition := index (first 1 .positions) 0}} +
{{ .designation }}
+

{{ $oldestPosition.start }} - {{ if $mostRecentPosition.end }} {{ $mostRecentPosition.end }} {{ else }} Present {{ end }}, + {{ .company.location }} +

+
+

{{ .company.overview | markdownify }}

+ {{ $totalPositions:= len .positions }} + {{ range $index,$position:= .positions }} +
{{ $position.designation }}
+

{{ $position.start }} - {{if $position.end }} {{ $position.end }} {{else}} Present {{end}}

+ +
+ {{ end }} +
\ No newline at end of file diff --git a/layouts/partials/experiences/one-position.html b/layouts/partials/experiences/one-position.html new file mode 100644 index 0000000..c743f3a --- /dev/null +++ b/layouts/partials/experiences/one-position.html @@ -0,0 +1,17 @@ +
+
+
{{ .designation }}
+
{{ if .company.url }} {{end }} {{ .company.name }}
+ +

{{ .start }} - {{ if .end }} {{ .end }} {{ else }}Present{{ end }}, + {{ .company.location }} +

+
+

{{ .company.overview | markdownify }}

+
Responsibilities:
+ +
\ No newline at end of file