Skip to content

Commit

Permalink
Avoid resizing navbar gifs as they ruin animations
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdeluk committed Mar 4, 2025
1 parent aa91957 commit 4f31995
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/navigators/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@
{{/* resize the logos. don't resize svg because it is not supported */}}
{{ if $mainLogo }}
{{ $mainLogo = resources.Get $mainLogo}}
{{ if and $mainLogo (ne $mainLogo.MediaType.SubType "svg") }}
{{ if and $mainLogo (not (or (eq $mainLogo.MediaType.SubType "svg") (eq $mainLogo.MediaType.SubType "gif"))) }}
{{ $mainLogo = $mainLogo.Resize "42x" }}
{{ end }}
{{ $mainLogo = $mainLogo.RelPermalink}}
{{ end }}

{{ if $invertedLogo }}
{{ $invertedLogo = resources.Get $invertedLogo}}
{{ if and $invertedLogo (ne $invertedLogo.MediaType.SubType "svg")}}
{{ if and $invertedLogo (not (or (eq $invertedLogo.MediaType.SubType "svg") (eq $invertedLogo.MediaType.SubType "gif"))) }}
{{ $invertedLogo = $invertedLogo.Resize "42x" }}
{{ end }}
{{ $invertedLogo = $invertedLogo.RelPermalink}}
{{ end }}

{{ if $darkLogo }}
{{ $darkLogo = resources.Get $darkLogo}}
{{ if and $darkLogo (ne $darkLogo.MediaType.SubType "svg")}}
{{ if and $darkLogo (not (or (eq $darkLogo.MediaType.SubType "svg") (eq $darkLogo.MediaType.SubType "gif"))) }}
{{ $darkLogo = $darkLogo.Resize "42x" }}
{{ end }}
{{ $darkLogo = $darkLogo.RelPermalink}}
Expand Down

0 comments on commit 4f31995

Please sign in to comment.