From 9cbc8154bbbae02ee01a0fdc532c59efd3fdd740 Mon Sep 17 00:00:00 2001 From: BernatBC Date: Fri, 9 Feb 2024 11:28:16 +0100 Subject: [PATCH] Make single and multiple experiences more consistent --- .../experiences/multiple-positions.html | 53 ++++++++++--------- .../sections/experiences/single-position.html | 30 ++++++----- 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/layouts/partials/sections/experiences/multiple-positions.html b/layouts/partials/sections/experiences/multiple-positions.html index cd3d905..9516d38 100644 --- a/layouts/partials/sections/experiences/multiple-positions.html +++ b/layouts/partials/sections/experiences/multiple-positions.html @@ -1,26 +1,27 @@
{{ $logoImage:= resources.Get .company.logo}} - {{ if $logoImage }} - {{/* svg don't support "Fit" operation */}} - {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage = $logoImage.Fit "300x300" }} - {{ end }} -
- + {{ if $logoImage }} + {{/* svg don't support "Fit" operation */}} + {{ if ne $logoImage.MediaType.SubType "svg" }} + {{ $logoImage = $logoImage.Fit "300x300" }} + {{ end }} +
+ +
+ {{ end }} + + {{ $oldestPosition := index (last 1 .positions) 0}} + {{ $mostRecentPosition := index (first 1 .positions) 0}} +
+
{{ if .company.url }}{{ .company.name }}{{ else }}{{ .company.name }}{{ end }}
+

+ {{ $oldestPosition.start }} - {{ if $mostRecentPosition.end }}{{ $mostRecentPosition.end }}{{ else }}{{ i18n "present" }}{{ end }} +

- {{ end }} - - {{ $oldestPosition := index (last 1 .positions) 0}} - {{ $mostRecentPosition := index (first 1 .positions) 0}} -
-
{{ if .company.url }}{{ .company.name }}{{ else }}{{ .company.name }}{{ end }}
-

{{ $oldestPosition.start }} - {{ if $mostRecentPosition.end }}{{ $mostRecentPosition.end }}{{ else }}{{ i18n "present" }}{{ end }} -

-
-

- {{ .company.location }} -

+

+ {{ .company.location }} +

{{ .company.overview | markdownify }}

@@ -29,14 +30,18 @@ {{ range $index,$position:= .positions }}
{{ $position.designation }}
-

{{ $position.start }} - {{if $position.end }} {{ $position.end }} {{else}} {{ i18n "present" }} {{end}}

+

{{ $position.start }} - {{if $position.end }} {{ $position.end }} {{else}} {{ i18n "present" }} {{end}}

-
    - {{ range $position.responsibilities }} -
  • {{ . | markdownify }}
  • + + {{ if $position.responsibilities }} +
    {{ i18n "responsibilities" }}
    +
      + {{ range $position.responsibilities }} +
    • {{ . | markdownify }}
    • + {{ end }} +
    {{ end }} -
{{ end }}
diff --git a/layouts/partials/sections/experiences/single-position.html b/layouts/partials/sections/experiences/single-position.html index 4a47b69..25ac983 100644 --- a/layouts/partials/sections/experiences/single-position.html +++ b/layouts/partials/sections/experiences/single-position.html @@ -1,30 +1,32 @@
- {{ $position:= index .positions 0 }} {{ $logoImage:= resources.Get .company.logo}} - {{ if $logoImage }} - {{/* svg don't support "Fit" operation */}} - {{ if ne $logoImage.MediaType.SubType "svg" }} - {{ $logoImage = $logoImage.Fit "300x300" }} - {{ end }} -
- -
- {{ end }} + {{ if $logoImage }} + {{/* svg don't support "Fit" operation */}} + {{ if ne $logoImage.MediaType.SubType "svg" }} + {{ $logoImage = $logoImage.Fit "300x300" }} + {{ end }} +
+ +
+ {{ end }} {{ $position:= index .positions 0 }}
{{ if .company.url }}{{ .company.name }}{{ else }}{{ .company.name }}{{ end }}
-

{{ $position.start }} - {{ if $position.end }}{{ $position.end }}{{ else }}{{ i18n "present" }}{{ end }} +

{{ $position.start }} - {{ if $position.end }}{{ $position.end }}{{ else }}{{ i18n "present" }}{{ end }}

{{ .company.location }}

+ +

{{ .company.overview | markdownify }}

-
{{ $position.designation }}
+
+
{{ $position.designation }}
+

{{ $position.start }} - {{if $position.end }} {{ $position.end }} {{else}} {{ i18n "present" }} {{end}}

+
- -

{{ .company.overview | markdownify }}

{{ if $position.responsibilities }}
{{ i18n "responsibilities" }}