-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update readme file #131
Conversation
Signed-off-by: eknath.baravkar <[email protected]>
Hi fsbraun, |
Hi Team, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing up the reminder, @Bernardvdv.
I have a suggestion to rephrase a little. What do you think?
As per the choice use multiple alignment style options with ``DJANGOCMS_PICTURE_ALIGN``, for example:: | ||
must have to align image with multiple styles such as left, right or center as well as float image and verticle align image. | ||
|
||
DJANGOCMS_PICTURE_ALIGN = [ | ||
('left', _('Align left')), | ||
('right', _('Align right')), | ||
('center', _('Align center')), | ||
#image-float align option | ||
("start", _("Float left")), | ||
("end", _("Float right")), | ||
#verticle-align option | ||
('top', _('Align top')), | ||
('middle', _('Align middle')), | ||
('bottom', _('Align Bottom')), | ||
('baseline', _('Align baseline')), | ||
] | ||
|
||
This will generate a class prefixed with ``align-``. For left align option the above example would produce a ``class="align-left"``. Adding a ``class`` key to the image attributes automatically merges the alignment with the attribute class. | ||
It works same for others align options. | ||
For this refer https://getbootstrap.com/docs/5.2/content/images/#aligning-images for css styles. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the choice use multiple alignment style options with ``DJANGOCMS_PICTURE_ALIGN``, for example:: | |
must have to align image with multiple styles such as left, right or center as well as float image and verticle align image. | |
DJANGOCMS_PICTURE_ALIGN = [ | |
('left', _('Align left')), | |
('right', _('Align right')), | |
('center', _('Align center')), | |
#image-float align option | |
("start", _("Float left")), | |
("end", _("Float right")), | |
#verticle-align option | |
('top', _('Align top')), | |
('middle', _('Align middle')), | |
('bottom', _('Align Bottom')), | |
('baseline', _('Align baseline')), | |
] | |
This will generate a class prefixed with ``align-``. For left align option the above example would produce a ``class="align-left"``. Adding a ``class`` key to the image attributes automatically merges the alignment with the attribute class. | |
It works same for others align options. | |
For this refer https://getbootstrap.com/docs/5.2/content/images/#aligning-images for css styles. | |
When using the `DJANGOCMS_PICTURE_ALIGN` setting, you have the flexibility to align images in various styles, such as left, right, or center, as well as to float images and vertically align them. You can customize these alignment options as follows:: | |
DJANGOCMS_PICTURE_ALIGN = [ | |
('left', _('Align left')), | |
('right', _('Align right')), | |
('center', _('Align center')), | |
# Image float alignment options | |
("start", _("Float left")), | |
("end", _("Float right")), | |
# Vertical alignment options | |
('top', _('Align top')), | |
('middle', _('Align middle')), | |
('bottom', _('Align Bottom')), | |
('baseline', _('Align baseline')), | |
] | |
This configuration will generate a CSS class prefixed with ``align-``. For example, when selecting the left align option, it will produce a class attribute like ``class="align-left"`` for the image. You can apply these classes to your image attributes, and they will automatically handle the alignment. | |
These alignment options are consistent with `Bootstrap's image alignment styles <https://getbootstrap.com/docs/5.3/content/images/#aligning-images>`_, however, **you have to provide your own CSS styles for the alignment options**, be it through Bootstrap or otherwise. |
Description
Related resources
Checklist
master
Slack to find a “pr review buddy” who is going to review my pull request.