ToggleSideBarButton.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div class="sidebar-button" @click="$emit('toggle')">
  3. <svg
  4. class="icon"
  5. xmlns="http://www.w3.org/2000/svg"
  6. aria-hidden="true"
  7. role="img"
  8. viewBox="0 0 448 512"
  9. >
  10. <path
  11. fill="currentColor"
  12. d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"
  13. class
  14. />
  15. </svg>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. emits: ['toggle']
  21. }
  22. </script>
  23. <style>
  24. .sidebar-button {
  25. position: absolute;
  26. top: 0.6rem;
  27. left: 1rem;
  28. display: none;
  29. padding: 0.6rem;
  30. cursor: pointer;
  31. }
  32. .sidebar-button .icon {
  33. display: block;
  34. width: 1.25rem;
  35. height: 1.25rem;
  36. }
  37. @media screen and (max-width: 719px) {
  38. .sidebar-button {
  39. display: block;
  40. }
  41. }
  42. </style>