Skip to content

Commit

Permalink
Add education logo
Browse files Browse the repository at this point in the history
  • Loading branch information
BernatBC committed Feb 2, 2024
1 parent de1cee3 commit e6e2ace
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/styles/components/images.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ html[data-theme='dark'] {
.svg-inverted {
filter: invert(1);
}

.company-logo {
height: auto;
width: 64px;
margin-bottom: 1em;
}
11 changes: 11 additions & 0 deletions layouts/partials/sections/education-alt.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ <h1 class="text-center" style="display: none">
</td>
<td class="details">
<div class="degree-info card">

{{ $logoImage:= resources.Get .institution.logo}}
{{ if $logoImage }}
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage = $logoImage.Fit "300x300" }}
{{ end }}

<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}

<div class="row">
<div class="col-lg-10 col-md-8">
{{ if .institution.url }}
Expand Down
11 changes: 11 additions & 0 deletions layouts/partials/sections/education.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ <h1 class="text-center" style="display: none">
</td>
<td class="details">
<div class="degree-info card">

{{ $logoImage:= resources.Get .institution.logo}}
{{ if $logoImage }}
{{/* svg don't support "Fit" operation */}}
{{ if ne $logoImage.MediaType.SubType "svg" }}
{{ $logoImage = $logoImage.Fit "300x300" }}
{{ end }}

<img class="company-logo" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}

<div class="row">
<div class="col-lg-10 col-md-8">
{{ if .institution.url }}
Expand Down

0 comments on commit e6e2ace

Please sign in to comment.