Skip to content

Commit

Permalink
embed: Make embedded media responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Mar 24, 2021
1 parent 230757a commit 603a841
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@
WAGTAILMODELTRANSLATION_TRANSLATE_SLUGS = False
WAGTAILMODELTRANSLATION_LOCALE_PICKER_DEFAULT = ('de', 'en')

WAGTAILEMBEDS_RESPONSIVE_HTML = True

# WAGTAIL
WAGTAIL_SITE_NAME = 'MPI CMS'
# WAGTAIL_USER_EDIT_FORM = 'mpicms.users.forms.CustomUserEditForm'
Expand Down
16 changes: 16 additions & 0 deletions mpicms/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -745,3 +745,19 @@ div.codehilite:not(:last-child) {
list-style: none;
margin: 0;
}

/* wagtail embed responsive objects */

.responsive-object {
position: relative;
}

.responsive-object iframe,
.responsive-object object,
.responsive-object embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

0 comments on commit 603a841

Please sign in to comment.