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.
 
 
 

509 lines
15 KiB

  1. <template>
  2. <div id="ignaz">
  3. <div class="selection-text">{{selectionText}}</div>
  4. <div class="otf">
  5. <!--
  6. <video autoplay muted loop style="width: 100%; height: 200px;">
  7. <source src="/iganz-bg.mp4" type="video/mp4">
  8. </video> -->
  9. <!-- <h1 style="padding-top:1em">Party</h1> -->
  10. <h1 class="ignaz-header">
  11. <img src="/IGNAZbunt.png" alt="">
  12. </h1>
  13. <div class="marquee">
  14. <div class="track">
  15. <div class="content">
  16. <span v-for="dj in djs" :key="dj">
  17. {{dj}} ///
  18. </span>
  19. <span v-for="dj in djs" :key="`${dj}1`">
  20. {{dj}} ///
  21. </span>
  22. </div>
  23. </div>
  24. </div>
  25. <!-- <div class="form-wrapper">
  26. </div> -->
  27. <template v-if="status && status.open">
  28. <div class="ignaz-form">
  29. <form v-if="!success" class="input-form" @submit.prevent="onClickTheButton" style="margin-top: 5vh">
  30. <div class="input-headline">rsvp</div>
  31. <div class="input-fields" style="display: flex; flex-direction: column;">
  32. <input class="input-text" v-model="anzeigename" placeholder="nickname (public)" size="1" />
  33. <input class="input-text" v-model="name" placeholder="full name (for orga reasons)" size="1" />
  34. <input class="input-text" v-model="email" placeholder="email (for self service)" size="1" />
  35. </div>
  36. <input class="input-btn" type="submit" :value="(sending ? 'sending ...' : 'join')" :disabled="(sending ? true : false)" />
  37. <div v-if="error">
  38. oh no something went wrong!<br>
  39. {{errorReason.detail}}
  40. </div>
  41. </form>
  42. <div v-if="showHelp" style="margin-bottom: 1em;">
  43. *robot voice* give us your data for the reservation!
  44. </div>
  45. <div v-if="success" style="text-align: center;">
  46. <p style="font-size: 6vw; text-align: center;">
  47. thanks!
  48. </p>
  49. <button @click="resetForm" class="input-btn">✓ see you there!</button>
  50. </div>
  51. </div>
  52. </template>
  53. <template v-if="status && !status.open">
  54. {{status.reason}}
  55. </template>
  56. <!-- {{words}} -->
  57. <div class="misch">
  58. <vue-word-cloud
  59. class="wordcloud"
  60. style="min-height: 60vh; width: 100%;"
  61. :words="words"
  62. :color="() => { return nameColors[Math.floor(Math.random() * nameColors.length)] }"
  63. font-family="'Barlow Condensed'"
  64. />
  65. <img src="/ignaz-tanzt.gif" class="beinchen" alt="">
  66. <!-- <video autoplay loop muted playsinline class="beinchen">
  67. <source src="/ignaz-tanz.mp4" type="video/mp4">
  68. </video> -->
  69. </div>
  70. <div v-if="status && status.open" class="details" ref="details">
  71. <div class="details-date">
  72. 25. nov. // 22 - 06 h
  73. </div>
  74. <div class="details-address">
  75. hockegasse 37 // haus 4
  76. </div>
  77. <div class="details-location">
  78. semmelweisklinik
  79. </div>
  80. <small>
  81. </small>
  82. </div>
  83. <div class="share">
  84. <div
  85. v-if="canShare"
  86. @click="share"
  87. style="cursor: pointer; margin-top: 5em;"
  88. >
  89. <svg class="share" fill="#ff8c00" version="1.1" viewBox="0 0 350.22 180.68" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-622.81 -392.3)"><path d="m659.49 392.3v16.427h-16.299v19.182h-20.385v50.605h21.942v18.918h17.175v19.63h55.254l-37.054 55.916h30.57l37.054-55.916h190.84v-16.06h15.991v-18.048h18.443v-50.605h-19.999v-20.05h-16.867v-19.998zm6.9343 23.419h263.37v19.998h19.999v41.866h-18.443v16.06h-263.37v-19.63h-21.942v-41.866h20.385z" stroke-width="0" style="paint-order:stroke fill markers"/><g transform="matrix(.42673 0 0 .42673 457.43 276.68)" aria-label="WILLTEILEN"><path d="m590.71 451.07h-21.891l-6.5625-29.859q-0.46875-1.875-1.5-7.4531-0.98437-5.5781-1.4531-9.3281-0.375 3.0469-1.2188 7.5938-0.84375 4.5-1.6875 8.2969-0.79688 3.7969-6.7969 30.75h-21.891l-16.969-68.531h17.859l7.4531 34.359q2.5312 11.391 3.4688 18.141 0.60937-4.7812 2.1562-12.984 1.5938-8.2031 2.9531-13.594l6.0469-25.922h17.156l5.8594 25.922q1.5 6.2344 3.0469 14.391 1.5469 8.1562 2.0625 12.188 0.60937-5.2031 3.3281-18.047l7.5938-34.453h17.859z"/><path d="m616.44 451.07v-68.531h18.609v68.531z"/><path d="m649.86 451.07v-68.531h18.516v53.578h26.391v14.953z"/><path d="m705.74 451.07v-68.531h18.516v53.578h26.391v14.953z"/><path d="m791.85 451.07h-18.516v-53.391h-16.734v-15.141h51.938v15.141h-16.688z"/><path d="m859.02 451.07h-40.688v-68.531h40.688v14.859h-22.172v10.781h20.531v14.859h-20.531v12.938h22.172z"/><path d="m871.02 451.07v-68.531h18.609v68.531z"/><path d="m904.44 451.07v-68.531h18.516v53.578h26.391v14.953z"/><path d="m1001 451.07h-40.687v-68.531h40.687v14.859h-22.172v10.781h20.531v14.859h-20.531v12.938h22.172z"/><path d="m1078.3 451.07h-24.281l-25.031-48.281h-0.4218q0.8906 11.391 0.8906 17.391v30.891h-16.406v-68.531h24.188l24.938 47.625h0.2813q-0.6563-10.359-0.6563-16.641v-30.984h16.5z"/></g></g></svg>
  90. </div>
  91. <a
  92. v-else
  93. href="mailto:?subject=25.%20november%202022%20at%20semmelweisklinik&body=reservation.ck.si%2F%23%2Fevent%2Fignaz "
  94. style="cursor: pointer; margin-top: 5em;"
  95. >
  96. <svg class="share" fill="#ff8c00" version="1.1" viewBox="0 0 350.22 180.68" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-622.81 -392.3)"><path d="m659.49 392.3v16.427h-16.299v19.182h-20.385v50.605h21.942v18.918h17.175v19.63h55.254l-37.054 55.916h30.57l37.054-55.916h190.84v-16.06h15.991v-18.048h18.443v-50.605h-19.999v-20.05h-16.867v-19.998zm6.9343 23.419h263.37v19.998h19.999v41.866h-18.443v16.06h-263.37v-19.63h-21.942v-41.866h20.385z" stroke-width="0" style="paint-order:stroke fill markers"/><g transform="matrix(.42673 0 0 .42673 457.43 276.68)" aria-label="WILLTEILEN"><path d="m590.71 451.07h-21.891l-6.5625-29.859q-0.46875-1.875-1.5-7.4531-0.98437-5.5781-1.4531-9.3281-0.375 3.0469-1.2188 7.5938-0.84375 4.5-1.6875 8.2969-0.79688 3.7969-6.7969 30.75h-21.891l-16.969-68.531h17.859l7.4531 34.359q2.5312 11.391 3.4688 18.141 0.60937-4.7812 2.1562-12.984 1.5938-8.2031 2.9531-13.594l6.0469-25.922h17.156l5.8594 25.922q1.5 6.2344 3.0469 14.391 1.5469 8.1562 2.0625 12.188 0.60937-5.2031 3.3281-18.047l7.5938-34.453h17.859z"/><path d="m616.44 451.07v-68.531h18.609v68.531z"/><path d="m649.86 451.07v-68.531h18.516v53.578h26.391v14.953z"/><path d="m705.74 451.07v-68.531h18.516v53.578h26.391v14.953z"/><path d="m791.85 451.07h-18.516v-53.391h-16.734v-15.141h51.938v15.141h-16.688z"/><path d="m859.02 451.07h-40.688v-68.531h40.688v14.859h-22.172v10.781h20.531v14.859h-20.531v12.938h22.172z"/><path d="m871.02 451.07v-68.531h18.609v68.531z"/><path d="m904.44 451.07v-68.531h18.516v53.578h26.391v14.953z"/><path d="m1001 451.07h-40.687v-68.531h40.687v14.859h-22.172v10.781h20.531v14.859h-20.531v12.938h22.172z"/><path d="m1078.3 451.07h-24.281l-25.031-48.281h-0.4218q0.8906 11.391 0.8906 17.391v30.891h-16.406v-68.531h24.188l24.938 47.625h0.2813q-0.6563-10.359-0.6563-16.641v-30.984h16.5z"/></g></g></svg>
  97. </a>
  98. </div>
  99. </div>
  100. <!-- :color="() => { return nameColors[Math.floor(Math.random() * nameColors.length)] }" -->
  101. </div>
  102. </template>
  103. <script>
  104. import VueWordCloud from 'vuewordcloud';
  105. export default {
  106. name: 'Invitation',
  107. data() {
  108. return {
  109. anzeigename: '',
  110. name: '',
  111. email: '',
  112. status: null,
  113. newsletter: false,
  114. guests: [],
  115. sending: false,
  116. showHelp: false,
  117. selection: null,
  118. selectionText: null,
  119. success: false,
  120. error: false,
  121. errorReason: null,
  122. }
  123. },
  124. components: {
  125. [VueWordCloud.name]: VueWordCloud,
  126. },
  127. computed: {
  128. djs () {
  129. return [
  130. 'Lenia [Gassen aus Zucker]',
  131. 'Tilard Kraeftbauer [Semmelweisklinik]',
  132. 'Marcell Wallet [Untere Willkyr]',
  133. 'Flocker Lockig [Taborama]',
  134. 'TBA',
  135. 'TBA',
  136. 'TBA'
  137. ]
  138. },
  139. nameColors() {
  140. return ['#ff8c00']
  141. },
  142. marqueenames() {
  143. return this.guests.map(guest => {
  144. return guest.anzeigename
  145. })
  146. },
  147. words() {
  148. const names = this.guests.map(guest => {
  149. return guest.anzeigename
  150. })
  151. const nameLengths = names.map(name => {
  152. return name.length
  153. })
  154. const maxNameLength = Math.max(...nameLengths)
  155. return this.guests.map(guest => {
  156. const nameLength = guest.anzeigename.length
  157. let size = maxNameLength - nameLength + 12
  158. return [` ${guest.anzeigename} `, size]
  159. })
  160. },
  161. canShare () {
  162. return navigator && !!navigator.share
  163. },
  164. // guestlist() {
  165. // return this.guests.map( (g) => {
  166. // g.name = g.anzeigename
  167. // return g
  168. // })
  169. // }
  170. },
  171. methods: {
  172. async fetchStatus() {
  173. const response = await fetch(`${process.env.VUE_APP_API_URL}status`)
  174. const data = await response.json()
  175. this.status = data
  176. },
  177. async fetchGuests() {
  178. const response = await fetch(`${process.env.VUE_APP_API_URL}guest`)
  179. const data = await response.json()
  180. this.guests = data
  181. },
  182. async onClickTheButton() {
  183. if (this.name.length == 0) {
  184. this.showHelp = true
  185. return false
  186. }
  187. this.showHelp = false
  188. this.sending = true
  189. let data = {
  190. anzeigename: this.anzeigename,
  191. name: this.name,
  192. email: this.email,
  193. newsletter: false,
  194. }
  195. const response = await fetch(
  196. `${process.env.VUE_APP_API_URL}guest`, {
  197. method: 'POST',
  198. headers: {
  199. 'Content-Type': 'application/json',
  200. },
  201. body: JSON.stringify(data),
  202. }
  203. )
  204. if (response.status === 200) {
  205. this.anzeigename = ''
  206. this.name = ''
  207. this.email = ''
  208. this.success = true
  209. this.fetchGuests()
  210. } else {
  211. this.success = false
  212. this.fetchGuests()
  213. this.error = true
  214. this.errorReason = await response.json()
  215. }
  216. this.sending = false
  217. return false
  218. },
  219. resetForm () {
  220. this.anzeigename = ''
  221. this.name = ''
  222. this.email = ''
  223. this.success = false
  224. },
  225. async share () {
  226. // location.href = "#";
  227. try {
  228. await navigator.share({ url:"https://reservation.ck.si/#/event/ignaz" })
  229. } catch (err) {
  230. console.log(`Error: ${err}`)
  231. }
  232. },
  233. },
  234. mounted() {
  235. this.fetchStatus()
  236. this.fetchGuests()
  237. document.addEventListener('selectionchange', () => {
  238. this.selection = document.getSelection()
  239. // console.log(this.selection)
  240. if (this.selection) {
  241. this.selectionText = this.selection.toString()
  242. }
  243. });
  244. // this.$refs.details.$el
  245. },
  246. }
  247. </script>
  248. <style>
  249. :root {
  250. --primary-color: #ff8c00;
  251. cursor: url('cursor.png'), auto;
  252. }
  253. html {
  254. background-image: url('/ignaz-background.jpg');
  255. background-size: cover;
  256. background-attachment: fixed;
  257. background-position: bottom;
  258. background-color: #000;
  259. }
  260. body {
  261. margin: 0;
  262. }
  263. #ignaz {
  264. border: 3px solid #fff;
  265. padding-bottom: 200px;
  266. margin: 20px;
  267. }
  268. .ignaz-header {
  269. position: relative;
  270. z-index: 1;
  271. text-align: center;
  272. }
  273. .ignaz-header > img {
  274. max-width: 90%;
  275. }
  276. .beinchen {
  277. /* position: fixed; */
  278. margin-top: -500px;
  279. /* margin-bottom: 80px; */
  280. max-width: 100%;
  281. max-height: 100vh;
  282. width: 40em;
  283. z-index: 0;
  284. mix-blend-mode: screen;
  285. }
  286. a {
  287. color: inherit;
  288. cursor: inherit;
  289. }
  290. .otf {
  291. width: 100%;
  292. /* background-color: rgb(167, 204, 247); */
  293. /* background-image: url('bg.gif'); */
  294. background-size: cover;
  295. display: flex;
  296. flex-direction: column;
  297. align-items: center;
  298. min-height: 100vh;
  299. position: relative;
  300. }
  301. .input-headline {
  302. color: var(--primary-color);
  303. /* mix-blend-mode: multiply; */
  304. font-size: 4vh;
  305. margin-bottom: .8vh;
  306. text-align: center;
  307. }
  308. .input-form {
  309. display: flex;
  310. flex-direction: column;
  311. max-width: 90%;
  312. width: 500px;
  313. margin-top: 4vh;
  314. mix-blend-mode: hard-light;
  315. }
  316. .ignaz-form {
  317. z-index: 9;
  318. position: relative;
  319. display: flex;
  320. align-items: center;
  321. flex-direction: column;
  322. max-width: 100%;
  323. }
  324. .input-fields {
  325. }
  326. .input-text,
  327. .input-btn,
  328. .input-cb {
  329. color: #000;
  330. background: rgba(255, 255, 255, 0.9);
  331. font-size: 2.8vh;
  332. font-family: 'Barlow Condensed', sans-serif;
  333. border: 0;
  334. padding: .5em 1em;
  335. line-height: 1.4;
  336. max-width: 100%;
  337. cursor: inherit;
  338. }
  339. .input-btn {
  340. color: #000;
  341. background-color: var(--primary-color);
  342. }
  343. .input-btn:hover {
  344. background: #ffbb00;
  345. }
  346. .input-checkbox {
  347. margin: 0 1em 0 0;
  348. }
  349. @media screen and (max-width: 1000px) {
  350. .form-wrapper {
  351. margin-top: 4em;
  352. }
  353. .input-text,
  354. .input-btn {
  355. width: 100%;
  356. max-width: 100%;
  357. min-width: 0;
  358. text-align: center;
  359. }
  360. /* .input-form {
  361. position: absolute;
  362. bottom: 0;
  363. display: flex;
  364. flex-direction: column;
  365. } */
  366. }
  367. @media screen and (max-width: 700px) {
  368. /* .beinchen {
  369. margin-top: 20em;
  370. } */
  371. }
  372. .input-text {
  373. width: auto;
  374. flex-grow: 1;
  375. }
  376. .misch {
  377. position: relative;
  378. display: flex;
  379. flex-direction: column;
  380. align-items: center;
  381. }
  382. .wordcloud {
  383. /* mix-blend-mode: overlay; */
  384. color: var(--primary-color);
  385. margin-bottom: 10em;
  386. }
  387. .details {
  388. color: var(--primary-color);
  389. font-size: 30px;
  390. text-shadow: #000 1px -1px 0;
  391. max-width: 80em;
  392. margin: 16% 3% 200px;
  393. padding: 3%;
  394. display: flex;
  395. white-space: nowrap;
  396. }
  397. .details-address,
  398. .details-location,
  399. .details-date {
  400. max-width: 20vw;
  401. }
  402. .details-address {
  403. transform: rotateZ(90deg);
  404. }
  405. .details-location {
  406. transform: rotateZ(80deg);
  407. }
  408. .details-date {
  409. transform: rotateZ(83deg);
  410. }
  411. .share {
  412. max-width: 30em;
  413. width: 80%;
  414. z-index: 99;
  415. position: relative;
  416. text-align: center;
  417. }
  418. .share:hover {
  419. mix-blend-mode: difference;
  420. }
  421. .selection-text {
  422. position: fixed;
  423. z-index: 9999;
  424. font-size: 10vh;
  425. line-height: 1em;
  426. pointer-events: none;
  427. color: #fff;
  428. mix-blend-mode: difference;
  429. top: 10%;
  430. }
  431. .marquee {
  432. position: relative;
  433. width: 100vw;
  434. max-width: 100%;
  435. height: 200px;
  436. overflow-x: hidden;
  437. font-size: 10em;
  438. z-index: 0;
  439. }
  440. .marquee {
  441. position: fixed;
  442. bottom: .5em;
  443. font-size: 5em;
  444. background: #ba0394;
  445. height: 1.3em;
  446. color: #000;
  447. transform: rotateZ(7deg) scale(1.1);
  448. mix-blend-mode: lighten;
  449. }
  450. .track {
  451. position: absolute;
  452. white-space: nowrap;
  453. will-change: transform;
  454. animation: marquee 10s linear infinite;
  455. }
  456. @keyframes marquee {
  457. from { transform: translateX(0); }
  458. to { transform: translateX(-50%); }
  459. }
  460. </style>