modal.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Modal Block
  2. ===========
  3. Creates a popup box with a header, footer, and the ability to display the body as a block.
  4. Click the "X" in the corner or background of page to close it.
  5. Example: (Modal Open Button)
  6. .. figure:: images/modal_button.jpeg
  7. :alt: The webpage with an open modal button.
  8. The webpage with an open modal button. Can be styled like any other button see Button Block.
  9. (Modal Open)
  10. .. figure:: images/modal_open.jpeg
  11. :alt: The webpage with an open modal button.
  12. The webpage with an open modal button. Can be styled like any other button see Button Block.
  13. Field Reference
  14. ---------------
  15. Fields and purposes:
  16. * **Button Title** - The text to show on the button. You can insert simple HTML
  17. here as well, such as ``Learn <b>More</b>``.
  18. * **Button Style** - The appearance of the button. This is a choice loaded from
  19. ``CRX_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
  20. CSS class in the HTML.
  21. * **Button Size** - The size of button. This is a choice loaded from
  22. ``CRX_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
  23. class in the HTML.
  24. * **Modal Heading** - The heading, or title, that will display on the modal
  25. * **Content** - Choose from other content blocks for the body of the modal.
  26. * **Modal Footer** - Choose a Simple Text footer or a button link
  27. Once it is published, website visitors can click the button to see the popup message.
  28. .. figure:: images/modal_editor.jpeg
  29. :alt: modal editing block
  30. Modal editing block