From 11bddc36a221034df656cf2b0f4b45f314a0551c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Mon, 12 Feb 2024 08:26:12 +0100 Subject: [PATCH] Add company and school logos (#882) * Add education logo * Fix width * Update css * Add logos to company * Add multiple positions * Update Styling * Strenghten poistion title * Improve timeline * Fix missing curly braces * Fix curly braces * Add space * Add space between position and date * Make single and multiple experiences more consistent * Remove single-position layout * Remove duplicated comment --- assets/styles/components/images.scss | 10 ++++ assets/styles/sections/experiences.scss | 10 ++++ layouts/partials/sections/education-alt.html | 12 +++++ layouts/partials/sections/education.html | 13 ++++++ layouts/partials/sections/experiences.html | 4 +- .../sections/experiences/experience-info.html | 5 -- .../experiences/multiple-positions.html | 29 ------------ .../sections/experiences/positions.html | 46 +++++++++++++++++++ .../sections/experiences/single-position.html | 23 ---------- 9 files changed, 93 insertions(+), 59 deletions(-) delete mode 100644 layouts/partials/sections/experiences/experience-info.html delete mode 100644 layouts/partials/sections/experiences/multiple-positions.html create mode 100644 layouts/partials/sections/experiences/positions.html delete mode 100644 layouts/partials/sections/experiences/single-position.html diff --git a/assets/styles/components/images.scss b/assets/styles/components/images.scss index d546d7b..146ea8b 100644 --- a/assets/styles/components/images.scss +++ b/assets/styles/components/images.scss @@ -46,3 +46,13 @@ html[data-theme='dark'] { .svg-inverted { filter: invert(1); } + +.logo-holder { + height: 64px; + margin-bottom: 1em; +} + +.company-logo { + max-height: 100%; + width: auto; +} \ No newline at end of file diff --git a/assets/styles/sections/experiences.scss b/assets/styles/sections/experiences.scss index d6f6085..aae541b 100644 --- a/assets/styles/sections/experiences.scss +++ b/assets/styles/sections/experiences.scss @@ -92,6 +92,16 @@ } } + .company-heading { + h5 { + display: inline; + margin-right: 0.25em; + } + p { + display: inline; + } + } + @include media('<=medium') { .container { max-width: 100%; diff --git a/layouts/partials/sections/education-alt.html b/layouts/partials/sections/education-alt.html index b6996df..827194b 100644 --- a/layouts/partials/sections/education-alt.html +++ b/layouts/partials/sections/education-alt.html @@ -31,6 +31,18 @@
+ + {{ $logoImage:= resources.Get .institution.logo}} + {{ if $logoImage }} + {{/* svg don't support "Fit" operation */}} + {{ if ne $logoImage.MediaType.SubType "svg" }} + {{ $logoImage = $logoImage.Fit "300x300" }} + {{ end }} +
+ +
+ {{ end }} +
{{ if .institution.url }} diff --git a/layouts/partials/sections/education.html b/layouts/partials/sections/education.html index 6a7fb74..39ef52a 100644 --- a/layouts/partials/sections/education.html +++ b/layouts/partials/sections/education.html @@ -31,6 +31,19 @@
+ + {{ $logoImage:= resources.Get .institution.logo}} + {{ if $logoImage }} + {{/* svg don't support "Fit" operation */}} + {{ if ne $logoImage.MediaType.SubType "svg" }} + {{ $logoImage = $logoImage.Fit "300x300" }} + {{ end }} + +
+ +
+ {{ end }} +
{{ if .institution.url }} diff --git a/layouts/partials/sections/experiences.html b/layouts/partials/sections/experiences.html index eafe926..b1cd34f 100644 --- a/layouts/partials/sections/experiences.html +++ b/layouts/partials/sections/experiences.html @@ -18,11 +18,11 @@ {{ if eq (mod $index 2) 0 }}
{{ partial "sections/experiences/vertical-line.html" $index }} - {{ partial "sections/experiences/experience-info.html" $experience }} + {{ partial "sections/experiences/positions.html" $experience }}
{{else}}
- {{ partial "sections/experiences/experience-info.html" $experience }} + {{ partial "sections/experiences/positions.html" $experience }} {{ partial "sections/experiences/vertical-line.html" $index }}
{{ end }} diff --git a/layouts/partials/sections/experiences/experience-info.html b/layouts/partials/sections/experiences/experience-info.html deleted file mode 100644 index 1d068a9..0000000 --- a/layouts/partials/sections/experiences/experience-info.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ if gt (len .positions) 1 }} - {{ partial "sections/experiences/multiple-positions.html" . }} -{{ else }} - {{ partial "sections/experiences/single-position.html" . }} -{{ end }} diff --git a/layouts/partials/sections/experiences/multiple-positions.html b/layouts/partials/sections/experiences/multiple-positions.html deleted file mode 100644 index 1c77f53..0000000 --- a/layouts/partials/sections/experiences/multiple-positions.html +++ /dev/null @@ -1,29 +0,0 @@ -
-
- -
{{ if .company.url }}{{ .company.name }}{{ else }}{{ .company.name }}{{ end }}
- - - {{ $oldestPosition := index (last 1 .positions) 0}} - {{ $mostRecentPosition := index (first 1 .positions) 0}} -

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

- -

{{ .company.overview | markdownify }}

-
- -
- {{ range $index,$position:= .positions }} -
{{ $position.designation }}
-

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

- -
    - {{ range $position.responsibilities }} -
  • {{ . | markdownify }}
  • - {{ end }} -
- {{ end }} -
-
diff --git a/layouts/partials/sections/experiences/positions.html b/layouts/partials/sections/experiences/positions.html new file mode 100644 index 0000000..514d449 --- /dev/null +++ b/layouts/partials/sections/experiences/positions.html @@ -0,0 +1,46 @@ +
+
+ {{ $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 }} + + {{ $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.overview | markdownify }}

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

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

+
+ + {{ 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 deleted file mode 100644 index 4b0e500..0000000 --- a/layouts/partials/sections/experiences/single-position.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
- {{ $position:= index .positions 0 }} - -
{{ $position.designation }}
-
{{ if .company.url }}{{ .company.name }}{{ else }}{{ .company.name }}{{ end }}
- -

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

-
- -

{{ .company.overview | markdownify }}

- - {{ if $position.responsibilities }} -
{{ i18n "responsibilities" }}
-
    - {{ range $position.responsibilities }} -
  • {{ . | markdownify }}
  • - {{ end }} -
- {{ end }} -