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.

198 lines
3.8 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 scoped>
  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: #eee;
  85. border-radius: 1rem;
  86. padding: 0 1rem;
  87. margin-bottom: 2rem;
  88. position: relative;
  89. max-width: 450px;
  90. --knockout-size: 0.75rem;
  91. --color: #ccc;
  92. /* border: 0.1rem solid var(--color); */
  93. box-shadow: 0 0.5rem 0 0 var(--color);
  94. }
  95. .chosen-col {
  96. display: flex;
  97. flex-direction: column;
  98. align-items: flex-start;
  99. padding: 0.5rem 0;
  100. }
  101. .chosen-col:nth-of-type(2) {
  102. display: flex;
  103. flex-direction: column;
  104. justify-content: center;
  105. align-items: center;
  106. }
  107. .chosen-col:nth-of-type(2) svg {
  108. width: 3.5rem;
  109. height: 3.5rem;
  110. }
  111. .chosen-col:nth-of-type(2)::before {
  112. content: "";
  113. height: var(--knockout-size);
  114. width: var(--knockout-size);
  115. background-color: white;
  116. border-radius: 0 0 999px 999px;
  117. display: block;
  118. position: absolute;
  119. top: 0;
  120. }
  121. .chosen-col:nth-of-type(2)::after {
  122. content: "";
  123. height: var(--knockout-size);
  124. width: var(--knockout-size);
  125. background-color: var(--color);
  126. border-radius: 999px 999px 0 0;
  127. display: block;
  128. position: absolute;
  129. bottom: 0;
  130. }
  131. .flyout .chosen-col:nth-of-type(2)::before,
  132. .flyout .chosen-col:nth-of-type(2)::after {
  133. background-color: #007fff;
  134. }
  135. label.chosen-text {
  136. color: #007fff88;
  137. line-height: 1;
  138. font-size: 0.8rem;
  139. font-weight: 400;
  140. }
  141. .header__col:nth-child(3) label.chosen-text {
  142. text-align: right;
  143. }
  144. h1.chosen-text {
  145. font-size: 3rem;
  146. line-height: 0.8;
  147. font-weight: 500;
  148. color: #aaa;
  149. }
  150. .date-badge {
  151. background: white;
  152. border-radius: 999px;
  153. padding: 0 0.5em;
  154. line-height: 1;
  155. display: inline-block;
  156. font-size: 0.8rem;
  157. color: #aaa;
  158. }
  159. .flyout .chosen-cols {
  160. background: none !important;
  161. padding: 0 !important;
  162. box-shadow: none !important;
  163. margin: 0 !important;
  164. }
  165. .flyout .chosen-col {
  166. padding: 0 !important;
  167. }
  168. .flyout .chosen-cols h1 {
  169. color: white !important;
  170. font-size: 2.7rem !important;
  171. }
  172. .flyout .chosen-cols label {
  173. color: white !important;
  174. }
  175. .flyout .chosen-cols svg {
  176. stroke: white !important;
  177. }
  178. </style>