ButtonUrl.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <b-button
  3. v-on="$listeners"
  4. v-bind="$attrs"
  5. variant="link"
  6. class="btn-url"
  7. :href="link.url"
  8. target="_blank"
  9. >
  10. <span class="sr-only">{{ link.title }}</span>
  11. <svg aria-hiden="true" viewBox="0 0 39 39">
  12. <path d="M 18,6 h-12 v27 h27 v-12" />
  13. <path d="M 24,6 h9 v9" />
  14. <path d="M 33,6 13.5,25.5" />
  15. </svg>
  16. </b-button>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'ButtonUrl',
  21. props: {
  22. link: { type: Object, required: true }
  23. }
  24. }
  25. </script>
  26. <style lang="scss" scoped>
  27. .btn-url {
  28. padding: 0;
  29. width: 20px;
  30. height: 20px;
  31. border: 0;
  32. line-height: 0;
  33. position: relative;
  34. top: -3px;
  35. @include media-breakpoint-up($size-bp) {
  36. top: -5px;
  37. width: 40px;
  38. height: 40px;
  39. }
  40. &:hover,
  41. &:focus {
  42. path {
  43. stroke: $black;
  44. }
  45. }
  46. svg {
  47. width: 100%;
  48. height: 100%;
  49. pointer-events: none;
  50. display: inline;
  51. }
  52. path {
  53. fill: none;
  54. stroke: lighten($black, 15%);
  55. stroke-width: 4px;
  56. stroke-linecap: round;
  57. stroke-linejoin: round;
  58. }
  59. }
  60. </style>