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.

163 lines
3.2 KiB

  1. <template>
  2. <div class="chosen-wrapper">
  3. <div class="chosen-cols">
  4. <div class="chosen-col">
  5. <label for="" class="chosen-text">
  6. {{ selectedOrig.municipality }}
  7. </label>
  8. <h1 class="chosen-text">
  9. {{ selectedOrig.iata }}
  10. </h1>
  11. <span v-if="departure" class="date-badge">
  12. {{ departure }} {{ (departureTime ? '@' + departureTime : '') }}
  13. </span>
  14. </div>
  15. <div class="chosen-col">
  16. <svg
  17. xmlns="http://www.w3.org/2000/svg"
  18. class="icon icon-tabler icon-tabler-arrow-right-circle"
  19. width="100"
  20. height="100"
  21. viewBox="0 0 24 24"
  22. stroke-width="1.5"
  23. stroke="#007fff"
  24. fill="none"
  25. stroke-linecap="round"
  26. stroke-linejoin="round"
  27. >
  28. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  29. <path d="M18 15l3 -3l-3 -3" />
  30. <circle cx="5" cy="12" r="2" />
  31. <path d="M7 12h14" />
  32. </svg>
  33. </div>
  34. <div class="chosen-col">
  35. <label for="" class="chosen-text">
  36. {{ selectedDest.municipality }}
  37. </label>
  38. <h1 class="chosen-text">
  39. {{ selectedDest.iata }}
  40. </h1>
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. export default {
  47. props: {
  48. selectedOrig: {
  49. type: [Object],
  50. default () {
  51. return {}
  52. }
  53. },
  54. selectedDest: {
  55. type: [Object],
  56. default () {
  57. return {}
  58. }
  59. },
  60. departure: {
  61. type: [String],
  62. default () {
  63. return ''
  64. }
  65. },
  66. departureTime: {
  67. type: [String],
  68. default () {
  69. return ''
  70. }
  71. }
  72. }
  73. }
  74. </script>
  75. <style>
  76. .chosen-wrapper {
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. }
  81. .chosen-cols {
  82. display: flex;
  83. justify-content: center;
  84. background-color: #003c79;
  85. border-radius: 1rem;
  86. padding: 0.5rem 2rem;
  87. margin-bottom: 2rem;
  88. position: relative;
  89. max-width: 450px;
  90. --knockout-size: 0.75rem;
  91. }
  92. .chosen-col:nth-of-type(2) {
  93. display: flex;
  94. flex-direction: column;
  95. justify-content: center;
  96. align-items: center;
  97. }
  98. .chosen-col:nth-of-type(2) svg {
  99. margin-top: -0.9rem;
  100. width: 3.5rem;
  101. height: 3.5rem;
  102. }
  103. .chosen-col:nth-of-type(2)::before {
  104. content: "";
  105. height: var(--knockout-size);
  106. width: var(--knockout-size);
  107. background-color: white;
  108. border-radius: 0 0 999px 999px;
  109. display: block;
  110. position: absolute;
  111. top: 0;
  112. }
  113. .chosen-col:nth-of-type(2)::after {
  114. content: "";
  115. height: var(--knockout-size);
  116. width: var(--knockout-size);
  117. background-color: white;
  118. border-radius: 999px 999px 0 0;
  119. display: block;
  120. position: absolute;
  121. bottom: 0;
  122. }
  123. .flyout .chosen-col:nth-of-type(2)::before,
  124. .flyout .chosen-col:nth-of-type(2)::after {
  125. background-color: #007fff;
  126. }
  127. label.chosen-text {
  128. color: #007fff;
  129. line-height: 0.8;
  130. font-size: 0.8rem;
  131. font-weight: 400;
  132. }
  133. .header__col:nth-child(3) label.chosen-text {
  134. text-align: right;
  135. }
  136. h1.chosen-text {
  137. font-size: 3rem;
  138. line-height: 0.8;
  139. font-weight: 500;
  140. color: #eee;
  141. }
  142. .date-badge {
  143. background: white;
  144. border-radius: 999px;
  145. padding: 0 0.5em;
  146. line-height: 1;
  147. display: inline-block;
  148. font-size: 0.8rem;
  149. }
  150. </style>