diff --git a/CHANGELOG.md b/CHANGELOG.md index de01026..67b46fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## [Unreleased] -## 1.1.0 - 2023-12-01 +## [1.2.0] - 2024-04-04 +### Added +- Added integration of the new AMP API fields `mode` and `dimensions`. +- Added possibility to render embed banners. +- Added new rendering mode `embed` (`EmbedRenderingMode`) for the Latte bridge. + +### Changed +- Updated docs + +## [1.1.0] - 2023-12-01 ### Added - Added ability to provide custom options for each banner through Renderer or Latte macro. - Added support for native lazy loading. Feature can be enabled through banner options `'loading' => 'lazy'` and `'loading-offset' => ` (for multiple positions only). @@ -20,3 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release. + +[Unreleased]: https://github.com/68publishers/amp-client-js/compare/v1.2.0...HEAD +[1.2.0]: https://github.com/68publishers/amp-client-php/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/68publishers/amp-client-php/compare/v1.0.0...v1.1.0 diff --git a/README.md b/README.md index 19d27ac..c71aecc 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,11 @@ $ composer require 68publishers/amp-client ## Versions compatibility matrix -| PHP client version | JS client version | PHP version | AMP version | API version | -|:------------------:|:-----------------:|:------------:|:-----------:|:-----------:| -| `>=1.0.0` | `>=1.4.0` | `>=7.4` | `>=2.12.0` | `1` | +| PHP client version | JS client version | AMP version | API version | +|:------------------:|:-----------------:|:-----------:|:-----------:| +| `~1.0.0` | `~1.4.0` | `2.12.0` | `1` | +| `~1.1.0` | `~1.4.0` | `2.12.0` | `1` | +| `~1.2.0` | `~1.5.0` | `>=2.13.0` | `1` | ## Integration without a framework diff --git a/docs/integration-with-nette-framework.md b/docs/integration-with-nette-framework.md index 63be7ce..3e79d4f 100644 --- a/docs/integration-with-nette-framework.md +++ b/docs/integration-with-nette-framework.md @@ -146,6 +146,7 @@ The following rendering modes are available: - **direct** ([DirectRenderingMode](../src/Bridge/Latte/RenderingMode/DirectRenderingMode.php)) - The default mode, API is requested separately for each banner. - **client_side** ([ClientSideRenderingMode](../src/Bridge/Latte/RenderingMode/ClientSideRenderingMode.php)) - Renders only a wrapper element and leaves loading banners on the JavaScript client. Banners are loaded by calling the `attachBanners()` function. +- **embed** ([EmbedRenderingMode](../src/Bridge/Latte/RenderingMode/EmbedRenderingMode.php)) - Same behavior as `client_side`, but passes the information to the JavaScript client that the banner should be rendered as `embed`. - **queued_in_presenter_context** ([QueuedRenderingInPresenterContextMode](../src/Bridge/Latte/RenderingMode/QueuedRenderingInPresenterContextMode.php)) - Renders only HTML comments as placeholders and stores requested positions in a queue. It will request, render and place all banners to them positions at once before the presenter returns a response. - **queued** ([QueuedRenderingMode](../src/Bridge/Latte/RenderingMode/QueuedRenderingMode.php)) - Same behavior as `queued_in_presenter_context`, but it doesn't take into account whether the website template is currently being rendered through the Nette application. It is more suited for an integration without a framework. diff --git a/docs/integration-without-framework.md b/docs/integration-without-framework.md index b22e703..d42c828 100644 --- a/docs/integration-without-framework.md +++ b/docs/integration-without-framework.md @@ -10,6 +10,7 @@ * [Fetching banners](#fetching-banners) * [Rendering banners](#rendering-banners) * [Rendering banners on the client side](#rendering-banners-on-the-client-side) + * [Rendering embed (iframe) banners](#rendering-embed-iframe-banners) * [Lazy loading of image banners](#lazy-loading-of-image-banners) * [Templates overwriting](#templates-overwriting) * [Rendering banners using Latte](#rendering-banners-using-latte) @@ -192,6 +193,56 @@ echo $renderer->renderClientSide(new Position('homepage.promo'), ['class' => 'my Banners rendered in this way will be loaded by the JavaScript client when its `attachBanners()` function is called. +### Rendering embed (iframe) banners + +Banners can be rendered in "embed" mode, which means they are inside the `