PhotoAlbumPresenter.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div v-if="status.sensitive == true">
  3. <details class="details-animated">
  4. <summary>
  5. <p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
  6. <p class="font-weight-light">(click to show)</p>
  7. </summary>
  8. <b-carousel :id="status.id + '-carousel'"
  9. style="text-shadow: 1px 1px 2px #333;"
  10. controls
  11. indicators
  12. background="#ffffff"
  13. :interval="0"
  14. >
  15. <b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
  16. <img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
  17. </b-carousel-slide>
  18. </b-carousel>
  19. </details>
  20. </div>
  21. <div v-else>
  22. <b-carousel :id="status.id + '-carousel'"
  23. style="text-shadow: 1px 1px 2px #333;"
  24. controls
  25. indicators
  26. background="#ffffff"
  27. :interval="0"
  28. >
  29. <b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
  30. <img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
  31. </b-carousel-slide>
  32. </b-carousel>
  33. </div>
  34. </template>
  35. <script type="text/javascript">
  36. export default {
  37. props: ['status']
  38. }
  39. </script>