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.

137 lines
2.5 KiB

3 years ago
  1. <template>
  2. <main>
  3. <nav>
  4. <button>home</button>
  5. <button>links 'n stuff</button>
  6. </nav>
  7. <div class="test-links">
  8. <nuxt-link to="/wrongo-and-peanut"> test 1 </nuxt-link>
  9. <nuxt-link to="/rayray-and-becs"> test 2 </nuxt-link>
  10. <nuxt-link to="/brimame"> test 3 </nuxt-link>
  11. </div>
  12. <!-- <div class="names">{{ guests.Names }}</div> -->
  13. <!-- <img
  14. class="img--bkg"
  15. :src="require(`@/assets/images/bkgs/${this.$route.params.code}.gif`)"
  16. alt="wrongo-and-peanut"
  17. /> -->
  18. <video
  19. class="img--bkg"
  20. playsinline
  21. autoplay
  22. muted
  23. loop
  24. poster="polina.jpg"
  25. id="bgvid"
  26. >
  27. <!-- <source src="polina.webm" type="video/webm"> -->
  28. <source
  29. :src="require(`@/assets/images/bkgs/${this.$route.params.code}.mp4`)"
  30. type="video/mp4"
  31. />
  32. </video>
  33. </main>
  34. </template>
  35. <script>
  36. export default {
  37. data: () => ({
  38. guests: {}
  39. }),
  40. async fetch () {
  41. const res = await fetch(`https://api.airtable.com/v0/appR5dwqGUe1vBaa9/Guest?filterByFormula=(Code='${this.$route.params.code}')`, {
  42. method: 'GET',
  43. headers: {
  44. 'Content-Type': 'application/x-www-form-urlencoded',
  45. Authorization: 'Bearer key8ZVBxVZJL2Wp7y'
  46. }
  47. })
  48. const json = await res.json()
  49. console.log(json)
  50. this.guests = { ...await json && json.records && json.records[0] && json.records[0].fields }
  51. }
  52. }
  53. </script>
  54. <style>
  55. html {
  56. font-size: 2vmin;
  57. }
  58. body {
  59. margin: 0;
  60. }
  61. main {
  62. width: 100vw;
  63. height: 100vh;
  64. background: tan;
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. justify-content: center;
  69. }
  70. .img--bkg {
  71. width: 100vw;
  72. object-fit: cover;
  73. height: 100vh;
  74. }
  75. .names {
  76. position: fixed;
  77. padding: 2rem;
  78. aspect-ratio: 1;
  79. background: white;
  80. color: blue;
  81. font-size: 2rem;
  82. border-radius: 999px;
  83. display: flex;
  84. flex-direction: column;
  85. align-items: center;
  86. justify-content: center;
  87. }
  88. .names::before {
  89. content: "";
  90. border: 5px dotted blue;
  91. position: absolute;
  92. border-radius: 999px;
  93. width: 90%;
  94. aspect-ratio: 1;
  95. }
  96. .names::after {
  97. content: "";
  98. border: 5px dashed blue;
  99. position: absolute;
  100. border-radius: 999px;
  101. width: 80%;
  102. aspect-ratio: 1;
  103. }
  104. .test-links {
  105. position: fixed;
  106. top: 1rem;
  107. left: 1rem;
  108. }
  109. nav {
  110. /* sex */
  111. position: fixed;
  112. right: 2rem;
  113. top: 2rem;
  114. display: flex;
  115. gap: 1rem;
  116. }
  117. button {
  118. color: white;
  119. background: teal;
  120. padding: 0.5rem 1rem;
  121. font-size: 1rem;
  122. border-radius: 999px;
  123. border: 0;
  124. }
  125. </style>