Created
March 19, 2021 17:17
-
-
Save davemerwin/9924eb59f6a96a1c218d3a2c666f4063 to your computer and use it in GitHub Desktop.
Image Classes For Richtext Image in Wagtail with Tailwind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.translation import gettext_lazy as _ | |
from wagtail.images.formats import Format, register_image_format, unregister_image_format | |
unregister_image_format('fullwidth') | |
register_image_format(Format('fullwidth', _('Full width'), 'w-100 rounded-lg', 'width-800')) | |
unregister_image_format('left') | |
register_image_format(Format('left', _('Left-aligned'), 'w-1/2 float-left rounded-lg', 'width-800')) | |
unregister_image_format('right') | |
register_image_format(Format('right', _('Right-aligned'), 'w-1/2 float-right rounded-lg', 'width-800')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment