Drupal 8 Site using Vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
1.0 KiB

  1. {{ attach_library('vue_js/modal') }}
  2. {{ attach_library('vue_js/modal-vue') }}
  3. {% verbatim %}
  4. <section id="vue-modal" class="modal">
  5. <input v-model="content" type="text" name="content" />
  6. <a id="vue-modal=button" href="#" @click="showModal = true">Open Vue Modal</a>
  7. <transition name="modal" v-if="showModal" @close="showModal = false">
  8. <div class="modal__mask hidden"
  9. :style="{'display': 'block'}"
  10. >
  11. <div class="modal__modal">
  12. <div class="modal__content">
  13. <div class="content">{{ content }}</div>
  14. <div class="modal__button modal__close" @click="showModal = false">
  15. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </transition>
  21. </section>
  22. {% endverbatim %}