Skip to content

Commit d03f4cb

Browse files
Merge branch '6.0' into add-related-content
2 parents 59a411b + f21d6d2 commit d03f4cb

File tree

20 files changed

+134
-70
lines changed

20 files changed

+134
-70
lines changed
111 KB
Loading
260 KB
Loading
54.1 KB
Loading
243 KB
Loading

docs/backend/relations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ minions = RelationList(
6161
)
6262
```
6363

64-
We can see that the [code for the behavior `IRelatedItems`](https://github.com/plone/plone.app.relationfield/blob/master/plone/app/relationfield/behavior.py) does exactly the same thing.
64+
We can see that the [code for the behavior `IRelatedItems`](https://github.com/plone/plone.app.relationfield/blob/master/src/plone/app/relationfield/behavior.py) does exactly the same thing.
6565

6666

6767
(relations-controlling-relation-targets-label)=

docs/backend/upgrading/version-specific-migration/upgrade-to-python3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,6 @@ Here is a list of helpful references on the topic of porting Python 2 to Python
382382
- https://eev.ee/blog/2016/07/31/python-faq-how-do-i-port-to-python-3/
383383
- https://diveintopython3.net/
384384
- https://docs.djangoproject.com/en/1.11/topics/python3/
385-
- https://docs.ansible.com/ansible/latest/dev_guide/developing_python_3.html
385+
- https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_python_3.html
386386
- https://docs.python.org/2/library/doctest.html#debugging
387387
```

docs/backend/widgets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ You can set the template used by the widget with the `<z3c:widgetTemplate>` ZCML
624624
### Widget frame override
625625

626626
You can override widget templates as instructed for `z3c.form`.
627-
`plone.app.z3cform` renders [a frame around each widget](https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/templates/widget.pt), which usually consists of:
627+
`plone.app.z3cform` renders [a frame around each widget](https://github.com/plone/plone.app.z3cform/blob/master/src/plone/app/z3cform/templates/widget.pt), which usually consists of:
628628

629629
- Label
630630
- Required marker
@@ -633,7 +633,7 @@ You can override widget templates as instructed for `z3c.form`.
633633
You might want to customize this widget frame for your own form.
634634
Below is an example of how to do it.
635635

636-
Copy [`widget.pt`](https://github.com/plone/plone.app.z3cform/blob/master/plone/app/z3cform/templates/widget.pt) to your own package, rename it as `demo-widget.pt`, and edit it.
636+
Copy [`widget.pt`](https://github.com/plone/plone.app.z3cform/blob/master/src/plone/app/z3cform/templates/widget.pt) to your own package, rename it as `demo-widget.pt`, and edit it.
637637

638638
Then add the following code to `configure.zcml`.
639639
Remember to fix the path of the template according to your own paths.

docs/classic-ui/forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ In the template, you can use the following variables:
174174
Dexterity content types come with default add and edit forms.
175175
You can build custom add and edit forms to adjust their behavior.
176176

177-
The implementation of the default edit and add forms is in [`plone.dexterity.browser.edit.py`](https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/browser/edit.py) and [`plone.dexterity.browser.add.py`](https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/browser/add.py).
177+
The implementation of the default edit and add forms is in [`plone.dexterity.browser.edit.py`](https://github.com/plone/plone.dexterity/blob/master/src/plone/dexterity/browser/edit.py) and [`plone.dexterity.browser.add.py`](https://github.com/plone/plone.dexterity/blob/master/src/plone/dexterity/browser/add.py).
178178

179179
```{todo}
180180
Describe Add/Edit forms here and how to customize them.

docs/classic-ui/images.md

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ To scale an image, you can use the `mode` parameter to control the scaling outpu
248248
You must use either `width` or `height`, or both.
249249

250250
Three different scaling options are supported.
251-
They correspond to the CSS [`background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) values.
251+
They correspond to the CSS [`background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/background-size) values.
252252

253253
The possible options for `mode` are listed below, where the default option is `scale`.
254254

@@ -272,6 +272,92 @@ The possible options for `mode` are listed below, where the default option is `s
272272

273273
Deprecated option names: `scale-crop-to-fill`, `up`.
274274

275+
### Images test rendering
276+
277+
Plone's Classic UI includes special demonstration views that render ready-made examples of image handling and responsive image components using your site's active theme.
278+
These views help developers verify image scaling, `srcset` generation, and explore available image optimization patterns.
279+
These views work on image content types, including images and documents with images.
280+
281+
Append the view name `/@@images-test` to an image URL, optionally followed by an anchor, such as `#srcset`, for specific sections.
282+
You must be authenticated as a site admin to view this demo.
283+
284+
For example, on the Classic UI demo site, the URL would be https://classic.demo.plone.org/en/demo/an-image.jpg/@@images-test#srcset.
285+
286+
````{card}
287+
```{image} /_static/images-test/images-test.png
288+
:alt: Images test view
289+
:target: /_static/images-test/images-test.png
290+
```
291+
+++
292+
_Images test view_
293+
````
294+
295+
The view displays the following examples, all rendered with the current settings in `/@@imaging-controlpanel`.
296+
297+
Standard image scales
298+
: Shows the Classic UI Plone scales with different modes:
299+
- Mini
300+
- Mini mode=cover
301+
- Mini mode=contain
302+
303+
````{card}
304+
```{image} /_static/images-test/examples.png
305+
:alt: Example standard image scales
306+
:target: /_static/images-test/examples.png
307+
```
308+
+++
309+
_Example standard image scales_
310+
````
311+
312+
Picture tags
313+
: Demonstrates the use of `<picture>` elements with configured picture variants.
314+
If the site runs on Plone 5.2 or earlier, a regular `<img>` tag is rendered instead.
315+
316+
Picture Tag Large
317+
: uses the configured `large` picture variant
318+
319+
Picture Tag Medium
320+
: uses the `medium` variant with multiple `<source>` elements and media queries for art direction
321+
322+
Picture Tag Small
323+
: uses the `small` variant
324+
325+
Picture Tag Small with title/alt
326+
: same as the previous, but with `title` and `alt` attributes explicitly set
327+
328+
````{card}
329+
```{image} /_static/images-test/picture-tags.png
330+
:alt: Picture tags
331+
:target: /_static/images-test/picture-tags.png
332+
```
333+
+++
334+
_Picture tags_
335+
````
336+
337+
`img` with `srcset` attributes
338+
: Shows how to use Plone’s `@@images` view to generate a full responsive `<img>` tag with a complete `srcset`.
339+
The browser automatically selects the most appropriate scale based on the available space and device pixel ratio.
340+
The example includes the required `sizes` attribute and demonstrates the resulting HTML output.
341+
342+
```{seealso}
343+
{ref}`classic-ui-images-responsive-image-support`
344+
```
345+
346+
````{card}
347+
```{image} /_static/images-test/image-srcset.png
348+
:alt: img with srcset attributes
349+
:target: /_static/images-test/image-srcset.png
350+
```
351+
+++
352+
_img with srcset attributes_
353+
````
354+
355+
```{seealso}
356+
{ref}`classic-ui-images-responsive-image-support`
357+
```
358+
359+
This view is especially valuable for theme developers who need to verify that responsive images, picture variants, and `srcset` functionality are correctly styled and behave as expected across devices and Plone versions.
360+
275361

276362
(classic-ui-images-permissions-label)=
277363

@@ -286,7 +372,7 @@ To access image scales, which are normally not accessible to the current user, o
286372
## Responsive image support
287373

288374
Plone supports the generation of [`picture`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture) tags with `srcset`s for image optimization.
289-
Additionally, you can define [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries) for [art direction](classic-ui-images-responsive-image-support-art-direction) and further optimization.
375+
Additionally, you can define [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Media_queries/Using) for [art direction](classic-ui-images-responsive-image-support-art-direction) and further optimization.
290376

291377
The configuration allows you to define different `picture` variants, such as `Large`, `Medium`, or `Small`.
292378
Users can choose from them in editors, such as TinyMCE, and developers can use them in templates.

docs/classic-ui/theming/css-custom-properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ myst:
1111

1212
# CSS custom properties
1313

14-
This chapter describes the [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties) used in Bootstrap and customized by Classic UI themes.
14+
This chapter describes the [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties) used in Bootstrap and customized by Classic UI themes.
1515
Custom properties (sometimes referred to as CSS variables or cascading variables) are entities defined by CSS authors that represent specific values to be reused throughout a document.
1616

1717

0 commit comments

Comments
 (0)