diff --git a/.gitignore b/.gitignore index b428d603e0..09c7667442 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ content/community/people/ content/community/donate/ static/assets/examples/ static/processed_images/ +static/assets/donor_logos/ # Tools target/ diff --git a/templates/news.html b/templates/news.html index 8f0bba66c2..10e7f21979 100644 --- a/templates/news.html +++ b/templates/news.html @@ -9,7 +9,7 @@ {% if page.extra.image %} {% set image_parent = page.path | replace(from="_index.md", to="") %} An image representing the article {% else %} diff --git a/templates/sponsors.html b/templates/sponsors.html index 67e011d738..f0bb056434 100644 --- a/templates/sponsors.html +++ b/templates/sponsors.html @@ -56,13 +56,14 @@

${{ tier.amount }} / month

{% for donor in donors_in_tier %} {% if tier.reward_logo and donor.logo %} - {% set_global logo_height = tier.logo_height %} + {% set_global logo_height = tier.logo_height | int %} {% if donor.square_logo %} - {% set_global logo_height = logo_height * 2.0 %} + {% set_global logo_height = (logo_height * 2.0) | int %} {% endif %} {% if donor.logo_scale %} - {% set_global logo_height = logo_height * donor.logo_scale %} + {% set_global logo_height = (logo_height * donor.logo_scale) | int %} {% endif %} + {% set logo_path = "/assets/donor_logos/" ~ donor.logo %} ${{ tier.amount }} / month {% if donor.style %} style="{{ donor.style }}" {% endif %} - src="/assets/donor_logos/{{ donor.logo }}" + {% if donor.logo is matching("\.svg$") %} + src="{{ logo_path }}" + {% else %} + {% set image = resize_image(path=logo_path, op="fit_height", height=logo_height) %} + src="{{ image.url }}" + {% endif %} {% if donor.name %} alt="{{ donor.name }} logo" {% else %}