AMP By Example uses relatively simple examples to demonstrate each component. It takes a lot of trial and error to find what works best out in the wild. I would like to provide / see more examples of advanced concepts.
Here is an example we have found working with AMP that better resembles the type of examples we would hope to find in the documentation. In our opinion, dynamic content is where a lot of complexity is introduced to AMP. Especially with pre-defined heights in certain cases. (We have simplified some of the code below to exclude the C# that laods the Model.HeroImage instead of {{primaryHeroImage}}. As well as carousel-dots and navigating the carousel from there)
For us, we used the below example to have a dynamic carousel load any product sku
This is just one example of more advanced examples that we would like to see. Because most quality, advanced examples exists in one-off code pens or people's personal githubs/gists.
Thanks for your feedback,
we have a section called "Advanced" in which we collect similar samples, feel free to send a pull request to add a sample there, your use case is great!
AMP By Example uses relatively simple examples to demonstrate each component. It takes a lot of trial and error to find what works best out in the wild. I would like to provide / see more examples of advanced concepts.
Here is an example we have found working with AMP that better resembles the type of examples we would hope to find in the documentation. In our opinion, dynamic content is where a lot of complexity is introduced to AMP. Especially with pre-defined heights in certain cases. (We have simplified some of the code below to exclude the C# that laods the
Model.HeroImage
instead of{{primaryHeroImage}}
. As well as carousel-dots and navigating the carousel from there)For us, we used the below example to have a dynamic carousel load any product sku
CSS
AMP STATE
AMP HTML
This is just one example of more advanced examples that we would like to see. Because most quality, advanced examples exists in one-off code pens or people's personal githubs/gists.