Carousel.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <f:comment><!-- Widget flux par Opentalent: Carousel --></f:comment>
  2. <f:comment><!-- Require: https://kenwheeler.github.io/slick/ --></f:comment>
  3. {namespace v=FluidTYPO3\Vhs\ViewHelpers}
  4. {namespace flux=FluidTYPO3\Flux\ViewHelpers}
  5. <div xmlns="http://www.w3.org/1999/xhtml"
  6. xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
  7. xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
  8. xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
  9. <f:layout name="{settings.template}/CustomContent"/>
  10. <f:section name="Configuration">
  11. <flux:form id="Carousel"
  12. label="Carrousel"
  13. description="Insérez un carrousel d'images"
  14. extensionName="OtTemplating"
  15. >
  16. <flux:form.option.group value="fce" />
  17. <flux:form.option.icon value="EXT:ot_templating/Resources/Public/Icons/opentalent-144x144.png" />
  18. <flux:field.input name="width" eval="trim" default="600" label="Largeur (en pixels)"/>
  19. <flux:field.input name="height" eval="trim" default="400" label="Hauteur (en pixels)"/>
  20. <flux:field.checkbox name="crop" label="Rogner les images trop grandes ?" default="0"/>
  21. <flux:field.inline.fal name="images" minItems="2" maxItems="24"/>
  22. </flux:form>
  23. </f:section>
  24. <f:section name="Preview">
  25. <p>Carrousel</p>
  26. <div class="be-carousel-preview">
  27. <f:for each="{v:content.resources.fal(field: 'images', uid: '{record.uid}')}"
  28. as="image"
  29. iteration="iterator">
  30. <f:image treatIdAsReference="1"
  31. src="{image.id}"
  32. title="{image.title}"
  33. alt="{image.alternative}"
  34. class="be-carousel-img-preview"
  35. maxWidth="128"
  36. maxHeight="128"
  37. />
  38. </f:for>
  39. </div>
  40. </f:section>
  41. <f:section name="Main">
  42. <div class="center-carousel">
  43. <div class="carousel" style="max-width:{width}px; max-height:{height}px">
  44. <f:for each="{v:content.resources.fal(field: 'images', uid: '{record.uid}')}"
  45. as="image"
  46. iteration="iterator">
  47. <div style="height: {height}px">
  48. <f:image treatIdAsReference="1"
  49. src="{image.id}"
  50. title="{image.title}"
  51. alt="{image.alternative}"
  52. class="carousel-img"
  53. width="{width}"
  54. maxHeight="{height}{f:if(condition: crop, then: 'c')}"
  55. />
  56. </div>
  57. </f:for>
  58. </div>
  59. </div>
  60. </f:section>
  61. </div>