@studiometa/ui 0.2.51 → 0.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,5 +41,17 @@
|
|
|
41
41
|
{% endif %}
|
|
42
42
|
|
|
43
43
|
{% if twic_placeholder is defined %}
|
|
44
|
-
{%
|
|
44
|
+
{% if twic_placeholder in ['preview', 'meancolor', 'maincolor', 'blurhash', 'blank'] %}
|
|
45
|
+
{% set placeholder = src.withQueryParameter('twic', '%s/output=%s'|format(twic_param, twic_placeholder)) %}
|
|
46
|
+
{% else %}
|
|
47
|
+
{% set formatted_placeholder_transform = [] %}
|
|
48
|
+
{% for key, value in twic_placeholder %}
|
|
49
|
+
{% set key = key|replace({ _: '-' }) %}
|
|
50
|
+
{% set formatted_placeholder_transform = formatted_placeholder_transform|merge(['%s=%s'|format(key, value)]) %}
|
|
51
|
+
{% endfor %}
|
|
52
|
+
{% set formatted_placeholder_transform = formatted_placeholder_transform|join('/') %}
|
|
53
|
+
|
|
54
|
+
{% set placeholder = src.withQueryParameter('twic', '%s/%s'|format(twic_param, formatted_placeholder_transform)) %}
|
|
55
|
+
{% endif %}
|
|
45
56
|
{% endif %}
|
|
57
|
+
|