Skip to content
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

Closed
wants to merge 1 commit into from
Closed

docs: update readme file #131

wants to merge 1 commit into from

Conversation

baravkareknath
Copy link
Contributor

@baravkareknath baravkareknath commented Jan 2, 2024

Description

Related resources

  • #...
  • #...

Checklist

  • [Yes] I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

Signed-off-by: eknath.baravkar <eknath.baravkar@infosys.com>
@baravkareknath
Copy link
Contributor Author

Hi fsbraun,
As per your suggestion I am added image aligned options example in readme.rst with reference URL of bootstrap.
Please review on it and let me know.

@baravkareknath
Copy link
Contributor Author

Hi Team,
Please give me review.

Copy link
Sponsor Member

@fsbraun fsbraun left a 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?

Comment on lines +100 to +120
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.

Copy link
Sponsor Member

@fsbraun fsbraun Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@baravkareknath baravkareknath closed this by deleting the head repository Jan 12, 2024
@baravkareknath baravkareknath mentioned this pull request Jan 12, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants