-
-
Notifications
You must be signed in to change notification settings - Fork 19
Add a method to the @@images view to render a img tag with srcset #170
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
Merged
Merged
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
b4b394c
fix: fix rendering unrenderable values
erral 0e47b89
feat: add a method to render a img tag with srcset
erral 1a2c0bb
add tests
erral bb7047c
show the srcset example in the image-test view
erral d46112b
changelog
erral 4634b00
add link in the images test
erral 2b69491
test file
erral f5133fa
lint
erral 00166e8
Update plone/namedfile/test.pt
erral 08fe009
Update plone/namedfile/tests/test_scaling.py
erral ac8b949
Update plone/namedfile/test.pt
erral 681facd
Update plone/namedfile/test.pt
erral d913573
Merge branch 'main' into erral-img-srcset
jensens 85ecca3
do not generate the scale itself, but use pre_scale to pre_create it,…
erral abee1ff
support passing custom CSS classes
erral 11ce52d
Merge branch 'main' into erral-img-srcset
erral 77ad029
Merge branch 'main' into erral-img-srcset
MrTango 10a4ac3
documentation
erral 90f7525
Merge branch 'main' into erral-img-srcset
erral 2dc84ba
fix spelling
erral 0fc3c04
Update plone/namedfile/usage.rst
erral de4c763
Update plone/namedfile/usage.rst
erral 41be735
Apply suggestions from code review
erral 0a6f4e0
point documentation of this package to Plone docs
erral 60e3642
Update plone/namedfile/scaling.py
erral 30108e7
make attribute generation consistent with the method
erral 0850c09
self.title does not work
erral 68c3e06
fix testing after the alt/title changes
erral File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Add a srcset method to the @@images view | ||
[erral] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I see the
tag
method having asrcset_attribute
, I wonder why adding a new method rather than changing thetag
one.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.
The point is that I didn't want to add a breaking change in the
tag
method, I want it to keep it working as it is and offer a way for the user who wants to render thesrcset
automatically, to get that.I could do the changes to get that also in the
tag
method, but that would mean to change the semantics of it, so I discarded it.