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.

709 lines
21 KiB

  1. <template>
  2. <div>
  3. <div class="sidebar-buttons">
  4. <!-- {{ $cookies.get('email') }}
  5. {{ userEmail }} -->
  6. <button
  7. class="btn btn--primary"
  8. v-if="isSidebarVisible && userEmail"
  9. @click="logout"
  10. >
  11. <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-logout" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
  12. <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  13. <path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" />
  14. <path d="M7 12h14l-3 -3m0 6l3 -3" />
  15. </svg>
  16. logout
  17. </button>
  18. <a
  19. :href="$BASE_URL() + '/login'"
  20. class="btn btn--primary"
  21. v-if="isSidebarVisible && !userEmail"
  22. >
  23. <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-login" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">
  24. <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  25. <path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" />
  26. <path d="M20 12h-13l3 -3m0 6l-3 -3" />
  27. </svg>
  28. login
  29. </a>
  30. <button class="btn btn--primary" @click="showSidebar">
  31. <svg
  32. v-if="!isSidebarVisible"
  33. xmlns="http://www.w3.org/2000/svg"
  34. class="icon icon-tabler icon-tabler-user-circle"
  35. width="24"
  36. height="24"
  37. viewBox="0 0 24 24"
  38. stroke-width="1.5"
  39. stroke="#ffffff"
  40. fill="none"
  41. stroke-linecap="round"
  42. stroke-linejoin="round"
  43. >
  44. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  45. <circle cx="12" cy="12" r="9" />
  46. <circle cx="12" cy="10" r="3" />
  47. <path
  48. d="M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855"
  49. />
  50. </svg>
  51. <svg
  52. v-if="!isSidebarVisible"
  53. xmlns="http://www.w3.org/2000/svg"
  54. class="icon icon-tabler icon-tabler-menu"
  55. width="24"
  56. height="24"
  57. viewBox="0 0 24 24"
  58. stroke-width="3"
  59. stroke="#ffffff"
  60. fill="none"
  61. stroke-linecap="round"
  62. stroke-linejoin="round"
  63. >
  64. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  65. <line x1="4" y1="8" x2="20" y2="8" />
  66. <line x1="4" y1="16" x2="20" y2="16" />
  67. </svg>
  68. <svg
  69. v-if="isSidebarVisible"
  70. xmlns="http://www.w3.org/2000/svg"
  71. class="icon icon-tabler icon-tabler-arrow-bar-to-right"
  72. width="24"
  73. height="24"
  74. viewBox="0 0 24 24"
  75. stroke-width="3"
  76. stroke="#ffffff"
  77. fill="none"
  78. stroke-linecap="round"
  79. stroke-linejoin="round"
  80. >
  81. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  82. <line x1="14" y1="12" x2="4" y2="12" />
  83. <line x1="14" y1="12" x2="10" y2="16" />
  84. <line x1="14" y1="12" x2="10" y2="8" />
  85. <line x1="20" y1="4" x2="20" y2="20" />
  86. </svg>
  87. </button>
  88. </div>
  89. <aside
  90. :class="[
  91. 'sidebar-container',
  92. { 'sidebar-container--hide': !isSidebarVisible },
  93. { 'sidebar-container--show': isSidebarVisible },
  94. ]"
  95. >
  96. <div class="sidebar">
  97. <div class="sidebar-content">
  98. <h1 class="h1--about">What is<br />FlyLocal Alaska?</h1>
  99. <iframe
  100. id="lbry-iframe"
  101. src="https://odysee.com/$/embed/What-is-FlyLocal-%28fall%2C2021%2Cdesktop%29/4b6d3c94ef05cd3609a22df6b2b0d45c174957a8?r=29V3nQLvAKT88DXBMViaBRypn3iWW5WM"
  102. allowfullscreen
  103. ></iframe>
  104. <iframe
  105. v-if="false"
  106. id="lbry-iframe-mobile"
  107. src="https://odysee.com/$/embed/What-is-FlyLocal-%28fall%2C2021%2Cmobile%29/9af5d6ac694a83b95a5763dc74b87f76e6503b0e?r=Ct8Uk1dFJb5UoQzJN7ASdkypiqzkqqez"
  108. allowfullscreen
  109. ></iframe>
  110. <div class="img-divider">
  111. <img
  112. class="img--about"
  113. src="https://openmoji.org/data/black/svg/1F3D4.svg"
  114. alt=""
  115. srcset=""
  116. />
  117. <img
  118. class="img--about"
  119. src="https://openmoji.org/data/black/svg/1F4C5.svg"
  120. alt=""
  121. srcset=""
  122. />
  123. <img
  124. class="img--about"
  125. src="https://openmoji.org/data/black/svg/1F601.svg"
  126. alt=""
  127. srcset=""
  128. />
  129. </div>
  130. <p class="text--about">
  131. <strong>FlyLocal-Alaska</strong> is an easy way to view the
  132. schedules for your favorite Alaskan airlines - all in one place.
  133. </p>
  134. <h1 class="h1--about">Why FlyLocal<br />in Alaska?</h1>
  135. <div class="img-divider">
  136. <img
  137. class="img--about"
  138. src="https://openmoji.org/data/black/svg/1F6AB.svg"
  139. alt=""
  140. srcset=""
  141. />
  142. <img
  143. class="img--about"
  144. src="https://openmoji.org/data/black/svg/1F697.svg"
  145. alt=""
  146. srcset=""
  147. />
  148. <img
  149. class="img--about"
  150. src="https://openmoji.org/data/black/svg/1F6E3.svg"
  151. alt=""
  152. srcset=""
  153. />
  154. </div>
  155. <p class="text--about">
  156. <strong
  157. >80% of Alaskan communities are not connected to the road
  158. system.</strong
  159. >
  160. Therefore, they rely heavily on local airlines for transportation.
  161. </p>
  162. <div class="img-divider">
  163. <img
  164. class="img--about"
  165. src="https://openmoji.org/data/black/svg/1F6A3.svg"
  166. alt=""
  167. srcset=""
  168. />
  169. <img
  170. class="img--about"
  171. src="https://openmoji.org/data/black/svg/1F3D5.svg"
  172. alt=""
  173. srcset=""
  174. />
  175. <img
  176. class="img--about"
  177. src="https://openmoji.org/data/black/svg/1F43B.svg"
  178. alt=""
  179. srcset=""
  180. />
  181. </div>
  182. <p class="text--about">
  183. <strong>See new places.</strong> There are ~400 public airports in
  184. Alaska, but only 20 (or 5%) with service from major US carriers.
  185. </p>
  186. <div class="img-divider">
  187. <img
  188. class="img--about"
  189. src="https://openmoji.org/data/black/svg/1F6E9.svg"
  190. alt=""
  191. srcset=""
  192. />
  193. <img
  194. class="img--about"
  195. src="https://openmoji.org/data/black/svg/1F681.svg"
  196. alt=""
  197. srcset=""
  198. />
  199. <img
  200. class="img--about"
  201. src="https://openmoji.org/data/black/svg/1F6F8.svg"
  202. alt=""
  203. srcset=""
  204. />
  205. </div>
  206. <p class="text--about">
  207. Enjoy a completely <strong>unique flying experience</strong>. Have
  208. you ever landed on a lake in a seaplane? Now is your chance to check
  209. it off the bucket-list.
  210. </p>
  211. <h1 class="h1--about">Up-to-date<br />Travel Info</h1>
  212. <ul class="about-carriers list-lrg">
  213. <li @click="clickedLink('alaska-travel-info')">
  214. <a href="https://covid19.alaska.gov/travelers/" target="_blank">
  215. <img
  216. class="img--carrier-logo"
  217. :src="require(`@/assets/images/orgs/alaska-travel-info.png`)"
  218. alt="Alaska Travel Info"
  219. title="Alaska Travel Info"
  220. />
  221. </a>
  222. </li>
  223. </ul>
  224. <h1 class="h1--about">
  225. Explore Alaska<br />on these great local airlines
  226. </h1>
  227. <ul class="about-carriers">
  228. <li
  229. v-for="carrier in carriers"
  230. :key="carrier.id"
  231. @click="clickedCarrier(carrier.fields.Slug)"
  232. >
  233. <a :href="carrier.fields.BookingLink" target="_blank">
  234. <img
  235. class="img--carrier-logo"
  236. :src="
  237. require(`@/assets/images/carriers/${carrier.fields.Slug}.png`)
  238. "
  239. :alt="carrier.fields.Name"
  240. :title="carrier.fields.Name"
  241. />
  242. </a>
  243. </li>
  244. </ul>
  245. <h1 class="h1--about">Proud Member of</h1>
  246. <ul class="about-carriers list-med">
  247. <li @click="clickedLink('aaca')">
  248. <a href="https://alaskaaircarriers.org" target="_blank">
  249. <img
  250. class="img--carrier-logo"
  251. :src="require(`@/assets/images/orgs/aaca.png`)"
  252. alt="Alaska Air Carriers Association"
  253. title="Alaska Air Carriers Association"
  254. />
  255. </a>
  256. </li>
  257. <li @click="clickedLink('alaska-tia')">
  258. <a href="https://alaskatia.org" target="_blank">
  259. <img
  260. class="img--carrier-logo"
  261. :src="require(`@/assets/images/orgs/alaska-tia.png`)"
  262. alt="Alaska Travel Industry Association"
  263. title="Alaska Travel Industry Association"
  264. />
  265. </a>
  266. </li>
  267. </ul>
  268. <h1 class="h1--about">Featured on</h1>
  269. <ul class="about-carriers list-med">
  270. <li @click="clickedLink('1-million-cups')">
  271. <a
  272. href="https://www.1millioncups.com/anchorage/presentations/flylocal-alaska-35304"
  273. target="_blank"
  274. >
  275. <img
  276. class="img--carrier-logo"
  277. :src="require(`@/assets/images/orgs/1-million-cups.png`)"
  278. alt="1 Million Cups"
  279. title="1 Million Cups"
  280. />
  281. </a>
  282. </li>
  283. <li @click="clickedLink('travel-alaska')">
  284. <a
  285. href="https://www.travelalaska.com/offers/FlyLocal/Plane-Statewide.aspx"
  286. target="_blank"
  287. >
  288. <img
  289. class="img--carrier-logo"
  290. style="
  291. background: black;
  292. border-radius: 0.5rem;
  293. padding-left: 0.4rem;"
  294. :src="require(`@/assets/images/orgs/travel-alaska.png`)"
  295. alt="Travel Alaska"
  296. title="Travel Alaska"
  297. />
  298. </a>
  299. </li>
  300. </ul>
  301. <div class="company-footer">
  302. &nbsp; FlyLocal v5.0.4.2 &nbsp;&nbsp;𐄙&nbsp;&nbsp; ©2021 FlyLocal,
  303. Inc &nbsp;
  304. </div>
  305. </div>
  306. <ul class="contact">
  307. <li class="contact-item" @click="clickedLink('twitter')">
  308. <a href="https://twitter.com/fly_local" target="_blank">
  309. <svg
  310. xmlns="http://www.w3.org/2000/svg"
  311. class="icon icon-tabler icon-tabler-brand-twitter"
  312. width="40"
  313. height="40"
  314. viewBox="0 0 24 24"
  315. stroke-width="2"
  316. stroke="#007fff"
  317. fill="none"
  318. stroke-linecap="round"
  319. stroke-linejoin="round"
  320. >
  321. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  322. <path
  323. d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"
  324. />
  325. </svg>
  326. <span>@fly_local</span>
  327. </a>
  328. </li>
  329. <li class="contact-item" @click="clickedLink('facebook')">
  330. <a href="https://facebook.com/iFlyLocal" target="_blank">
  331. <svg
  332. xmlns="http://www.w3.org/2000/svg"
  333. class="icon icon-tabler icon-tabler-brand-facebook"
  334. width="40"
  335. height="40"
  336. viewBox="0 0 24 24"
  337. stroke-width="2"
  338. stroke="#007fff"
  339. fill="none"
  340. stroke-linecap="round"
  341. stroke-linejoin="round"
  342. >
  343. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  344. <path
  345. d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3"
  346. />
  347. </svg>
  348. <span>@iFlyLocal</span>
  349. </a>
  350. </li>
  351. <li class="contact-item" @click="clickedLink('instagram')">
  352. <a href="https://instagram.com/fly_local" target="_blank">
  353. <svg
  354. xmlns="http://www.w3.org/2000/svg"
  355. class="icon icon-tabler icon-tabler-brand-instagram"
  356. width="40"
  357. height="40"
  358. viewBox="0 0 24 24"
  359. stroke-width="2"
  360. stroke="#007fff"
  361. fill="none"
  362. stroke-linecap="round"
  363. stroke-linejoin="round"
  364. >
  365. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  366. <rect x="4" y="4" width="16" height="16" rx="4" />
  367. <circle cx="12" cy="12" r="3" />
  368. <line x1="16.5" y1="7.5" x2="16.5" y2="7.501" />
  369. </svg>
  370. <span>@fly_local</span>
  371. </a>
  372. </li>
  373. <li class="contact-item" @click="clickedLink('team-email')">
  374. <a href="mailto:team@iflylocal.com" target="_blank">
  375. <svg
  376. xmlns="http://www.w3.org/2000/svg"
  377. class="icon icon-tabler icon-tabler-user"
  378. width="40"
  379. height="40"
  380. viewBox="0 0 24 24"
  381. stroke-width="2"
  382. stroke="#007fff"
  383. fill="none"
  384. stroke-linecap="round"
  385. stroke-linejoin="round"
  386. >
  387. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  388. <circle cx="12" cy="7" r="4" />
  389. <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />
  390. </svg>
  391. <span>contact us</span>
  392. </a>
  393. </li>
  394. <li class="contact-item" @click="clickedLink('partners-email')">
  395. <a href="mailto:partners@iflylocal.com" target="_blank">
  396. <svg
  397. xmlns="http://www.w3.org/2000/svg"
  398. class="icon icon-tabler icon-tabler-briefcase"
  399. width="40"
  400. height="40"
  401. viewBox="0 0 24 24"
  402. stroke-width="2"
  403. stroke="#007fff"
  404. fill="none"
  405. stroke-linecap="round"
  406. stroke-linejoin="round"
  407. >
  408. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  409. <rect x="3" y="7" width="18" height="13" rx="2" />
  410. <path d="M8 7v-2a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v2" />
  411. <line x1="12" y1="12" x2="12" y2="12.01" />
  412. <path d="M3 13a20 20 0 0 0 18 0" />
  413. </svg>
  414. <span>partner with us</span>
  415. </a>
  416. </li>
  417. </ul>
  418. </div>
  419. </aside>
  420. <div
  421. :class="[
  422. 'sidebar-blockui',
  423. { 'sidebar-blockui--show': isSidebarVisible },
  424. ]"
  425. />
  426. </div>
  427. </template>
  428. <script>
  429. export default {
  430. data: () => ({
  431. isSidebarVisible: false,
  432. carriers: [],
  433. userEmail: ''
  434. }),
  435. async fetch() {
  436. this.userEmail = this.$cookies.get('email');
  437. const filterFormula = 'AND(IsActive=1,FIND("Alaska",Region)>0)';
  438. const sortFormula = "&sort[0][field]=Name&sort[0][direction]=asc";
  439. let offset;
  440. let data = [];
  441. while (true) {
  442. const offsetParam = offset ? `&offset=${offset}` : "";
  443. const res = await fetch(
  444. `https://api.airtable.com/v0/appiQwfVZixRgRICe/Carriers_Alaska?filterByFormula=${filterFormula}${sortFormula}${offsetParam}`,
  445. {
  446. method: "GET",
  447. headers: {
  448. "Content-Type": "application/x-www-form-urlencoded",
  449. Authorization: "Bearer keyJ2ht64ZSN57AG1",
  450. },
  451. }
  452. );
  453. const json = await res.json();
  454. offset = await json.offset;
  455. data = [...data, ...(await json.records)];
  456. // await console.log(data.length)
  457. if (await !offset) {
  458. break;
  459. } // Were done let's stop this thing
  460. }
  461. this.carriers = [...data];
  462. },
  463. methods: {
  464. showSidebar() {
  465. this.isSidebarVisible = !this.isSidebarVisible;
  466. if (this.isSidebarVisible) {
  467. this.$segment.track("sidebar__show_sidebar");
  468. } else {
  469. this.$segment.track("sidebar__hide_sidebar");
  470. }
  471. },
  472. clickedCarrier(slug) {
  473. this.$segment.track("sidebar__open_carrier", {
  474. carrier: slug,
  475. });
  476. },
  477. clickedLink(slug) {
  478. this.$segment.track("sidebar__open_link", {
  479. carrier: slug,
  480. });
  481. },
  482. logout() {
  483. this.$cookies.remove('email');
  484. this.userEmail = '';
  485. }
  486. },
  487. };
  488. </script>
  489. <style>
  490. :root {
  491. --sidebar-width: 50ch;
  492. }
  493. .sidebar-container {
  494. z-index: 1002;
  495. position: fixed;
  496. top: 0;
  497. right: 0;
  498. display: flex;
  499. justify-content: flex-start;
  500. height: 100vh;
  501. transition: all 0.3s;
  502. pointer-events: none;
  503. }
  504. .sidebar-container.sidebar-container--hide {
  505. transform: translateX(calc(var(--sidebar-width) + 6rem));
  506. }
  507. .sidebar-container.sidebar-container--show {
  508. transform: translateX(0);
  509. }
  510. .sidebar {
  511. background: white;
  512. padding: 3rem 0 3rem 3rem;
  513. border-radius: 3rem 0 0 3rem;
  514. pointer-events: all;
  515. display: flex;
  516. flex-direction: column;
  517. align-items: flex-end;
  518. }
  519. .sidebar-content {
  520. overflow: auto;
  521. max-width: var(--sidebar-width);
  522. height: calc(100vh - 11rem);
  523. padding-right: 3rem;
  524. display: flex;
  525. flex-direction: column;
  526. align-items: center;
  527. }
  528. .img--about {
  529. height: min(3rem, 60px);
  530. display: inline-block;
  531. }
  532. div.img-divider {
  533. display: flex;
  534. justify-content: space-around;
  535. padding: 0 25%;
  536. }
  537. .img--carrier-logo {
  538. max-width: 6rem;
  539. max-height: 6rem;
  540. }
  541. .list-med .img--carrier-logo {
  542. max-width: 9rem;
  543. max-height: 9rem;
  544. }
  545. .list-lrg .img--carrier-logo {
  546. max-width: 15rem;
  547. max-height: 15rem;
  548. }
  549. h1.h1--about {
  550. font-weight: 200;
  551. text-transform: uppercase;
  552. color: #007fff;
  553. font-size: min(2.7rem, 50px);
  554. line-height: 1;
  555. text-align: center;
  556. margin-bottom: 1rem;
  557. }
  558. .text--about {
  559. margin-top: 1rem;
  560. margin-bottom: 1rem;
  561. max-width: 40ch;
  562. font-size: min(1rem, 18px);
  563. }
  564. .text--about:nth-of-type(1),
  565. .text--about:nth-of-type(4) {
  566. margin-bottom: 5rem;
  567. }
  568. #lbry-iframe {
  569. width: calc(var(--sidebar-width) - 4rem);
  570. aspect-ratio: 560/315;
  571. margin-bottom: 2rem;
  572. border-radius: 2rem;
  573. }
  574. #lbry-iframe-mobile {
  575. width: calc(var(--sidebar-width) - 4rem);
  576. aspect-ratio: 315/560;
  577. margin-bottom: 2rem;
  578. border-radius: 2rem;
  579. }
  580. .about-carriers {
  581. display: flex;
  582. flex-direction: row;
  583. flex-wrap: wrap;
  584. gap: 2rem;
  585. align-items: center;
  586. justify-content: space-around;
  587. margin-bottom: 5rem;
  588. }
  589. .about-carriers li {
  590. filter: saturate(0%);
  591. transition: 0.3s all;
  592. position: relative;
  593. }
  594. /* .about-carriers li::after {
  595. position: absolute;
  596. top: 0;
  597. right: 0;
  598. bottom: 0;
  599. left: 0;
  600. background-color: red;
  601. content: '';
  602. } */
  603. .about-carriers li:hover {
  604. filter: saturate(100%);
  605. transform: scale(1.05);
  606. }
  607. .sidebar-buttons {
  608. position: fixed;
  609. top: 1rem;
  610. right: 1rem;
  611. z-index: 1003;
  612. display: flex;
  613. align-content: flex-end;
  614. gap: 1rem;
  615. }
  616. .sidebar-blockui {
  617. position: fixed;
  618. top: 0;
  619. right: 0;
  620. bottom: 0;
  621. left: 0;
  622. opacity: 0;
  623. filter: blur(0.5);
  624. background-color: #007fff;
  625. transition: all 0.3s;
  626. pointer-events: none;
  627. z-index: 1001;
  628. }
  629. .sidebar-blockui.sidebar-blockui--show {
  630. opacity: 0.8;
  631. pointer-events: all;
  632. }
  633. ul.contact {
  634. display: flex;
  635. flex-direction: row;
  636. align-items: center;
  637. justify-content: center;
  638. gap: 1rem;
  639. flex-wrap: wrap;
  640. margin: 3rem 3rem 0 0;
  641. max-width: var(--sidebar-width);
  642. }
  643. li.contact-item a span {
  644. color: #007fff;
  645. transition: all 0.3s;
  646. }
  647. ul.contact li.contact-item a {
  648. display: flex;
  649. flex-direction: row;
  650. align-items: center;
  651. transition: all 0.3s;
  652. }
  653. ul.contact li.contact-item a:hover span {
  654. color: #00ca00;
  655. }
  656. ul.contact li.contact-item a svg {
  657. max-height: 2rem;
  658. max-width: 2rem;
  659. stroke-width: 1;
  660. transition: all 0.3s;
  661. }
  662. ul.contact li.contact-item a:hover svg {
  663. stroke: #00ca00;
  664. }
  665. .company-footer {
  666. font-family: monospace;
  667. font-size: 0.8rem;
  668. text-transform: uppercase;
  669. color: gray;
  670. }
  671. </style>