kopia lustrzana https://github.com/wagtail/wagtail
Fix: remove responsive behavior in embed when there is no ratio available
rodzic
49421e5a41
commit
1d33cc7838
|
@ -9,6 +9,7 @@ Changelog
|
|||
* Added `Page.get_admin_display_title` method to override how the title is displayed in the admin (Henk-Jan van Hasselaar)
|
||||
* Fix: `AbstractForm` now respects custom `get_template` methods on the page model (Gagaro)
|
||||
* Fix: Use specific page model for the parent page in the explore index (Gagaro)
|
||||
* Fix: Remove responsive styles in embed when there is no ratio available (Gagaro)
|
||||
|
||||
|
||||
1.7 (xx.xx.xxxx) - IN DEVELOPMENT
|
||||
|
|
|
@ -24,6 +24,7 @@ Bug fixes
|
|||
|
||||
* ``AbstractForm`` now respects custom ``get_template`` methods on the page model (Gagaro)
|
||||
* Use specific page model for the parent page in the explore index (Gagaro)
|
||||
* Remove responsive styles in embed when there is no ratio available (Gagaro)
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
@ -15,7 +15,7 @@ def embed_to_frontend_html(url):
|
|||
if embed.width and embed.height:
|
||||
ratio = str(embed.height / embed.width * 100) + "%"
|
||||
else:
|
||||
ratio = "0"
|
||||
ratio = None
|
||||
|
||||
# Render template
|
||||
return render_to_string('wagtailembeds/embed_frontend.html', {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<div style="padding-bottom: {{ ratio }};" class="responsive-object">
|
||||
<div{% if not ratio is None %} style="padding-bottom: {{ ratio }};" class="responsive-object"{% endif %}>
|
||||
{{ embed.html|safe }}
|
||||
</div>
|
||||
|
|
Ładowanie…
Reference in New Issue