Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

472 rader
14 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="n in marqueenames" :key="n">
  17. {{n}} ///
  18. </span>
  19. <span v-for="n in marqueenames" :key="n">
  20. {{n}} ///
  21. </span>
  22. <span v-for="n in marqueenames" :key="n">
  23. {{n}} ///
  24. </span>
  25. </div>
  26. </div>
  27. </div>
  28. <!-- <div class="form-wrapper">
  29. </div> -->
  30. <template v-if="status && status.open">
  31. <div class="ignaz-form">
  32. <form v-if="!success" class="input-form" @submit.prevent="onClickTheButton" style="margin-top: 5vh">
  33. <div class="input-headline">rsvp</div>
  34. <div class="input-fields" style="display: flex; flex-direction: column;">
  35. <input class="input-text" v-model="anzeigename" placeholder="nickname (public)" size="1" />
  36. <input class="input-text" v-model="name" placeholder="full name (for orga reasons)" size="1" />
  37. <input class="input-text" v-model="email" placeholder="email (for self service)" size="1" />
  38. </div>
  39. <input class="input-btn" type="submit" :value="(sending ? 'sending ...' : 'join')" :disabled="(sending ? true : false)" />
  40. <div v-if="error">
  41. oh no something went wrong!<br>
  42. {{errorReason.detail}}
  43. </div>
  44. </form>
  45. <div v-if="showHelp" style="margin-bottom: 1em;">
  46. *robot voice* give us your data for the reservation!
  47. </div>
  48. <div v-if="success">
  49. <p style="font-size: 6vw; text-align: center;">
  50. thanks!
  51. </p>
  52. <button @click="resetForm" class="input-btn">✓ see you there!</button>
  53. </div>
  54. </div>
  55. </template>
  56. <template v-if="status && !status.open">
  57. {{status.reason}}
  58. </template>
  59. <!-- {{words}} -->
  60. <video autoplay muted loop class="beinchen">
  61. <source src="/ignaz-bg.mp4" type="video/mp4">
  62. </video>
  63. <!-- <vue-word-cloud class="wordcloud" style="height: 70vh; width: 80%" :words="words"
  64. font-family="'Barlow Condensed'" /> -->
  65. <div v-if="status && status.open" class="details" ref="details">
  66. <div class="details-date">
  67. 25. nov. // 22 - 06 h
  68. </div>
  69. <div class="details-address">
  70. hockegasse 37 // haus 4
  71. </div>
  72. <div class="details-location">
  73. semmelweissklinik
  74. </div>
  75. <small>
  76. </small>
  77. </div>
  78. <div class="share">
  79. <div
  80. v-if="canShare"
  81. @click="share"
  82. style="cursor: pointer; margin-top: 5em;"
  83. >
  84. <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>
  85. </div>
  86. <a
  87. v-else
  88. href="mailto:?subject=25.%20november%202022%20at%20semmelweisklinik&body=https%3A%2F%2Freservation.ck.si%2F%23%2Fevent%2Fignaz "
  89. style="cursor: pointer; margin-top: 5em;"
  90. >
  91. <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>
  92. </a>
  93. </div>
  94. </div>
  95. <!-- :color="() => { return nameColors[Math.floor(Math.random() * nameColors.length)] }" -->
  96. </div>
  97. </template>
  98. <script>
  99. // import VueWordCloud from 'vuewordcloud';
  100. export default {
  101. name: 'Invitation',
  102. data() {
  103. return {
  104. anzeigename: '',
  105. name: '',
  106. email: '',
  107. status: null,
  108. newsletter: false,
  109. guests: [],
  110. sending: false,
  111. showHelp: false,
  112. selection: null,
  113. selectionText: null,
  114. success: false,
  115. error: false,
  116. errorReason: null,
  117. }
  118. },
  119. components: {
  120. // [VueWordCloud.name]: VueWordCloud,
  121. },
  122. computed: {
  123. nameColors() {
  124. return ['White']
  125. },
  126. marqueenames() {
  127. return this.guests.map(guest => {
  128. return guest.anzeigename
  129. })
  130. },
  131. words() {
  132. const names = this.guests.map(guest => {
  133. return guest.anzeigename
  134. })
  135. const nameLengths = names.map(name => {
  136. return name.length
  137. })
  138. const maxNameLength = Math.max(...nameLengths)
  139. return this.guests.map(guest => {
  140. const nameLength = guest.anzeigename.length
  141. let size = maxNameLength - nameLength + 12
  142. return [` ${guest.anzeigename} `, size]
  143. })
  144. },
  145. canShare () {
  146. return !!navigator.share
  147. },
  148. // guestlist() {
  149. // return this.guests.map( (g) => {
  150. // g.name = g.anzeigename
  151. // return g
  152. // })
  153. // }
  154. },
  155. methods: {
  156. async fetchStatus() {
  157. const response = await fetch(`${process.env.VUE_APP_API_URL}status`)
  158. const data = await response.json()
  159. this.status = data
  160. },
  161. async fetchGuests() {
  162. const response = await fetch(`${process.env.VUE_APP_API_URL}guest`)
  163. const data = await response.json()
  164. this.guests = data
  165. },
  166. async onClickTheButton() {
  167. if (this.name.length == 0) {
  168. this.showHelp = true
  169. return false
  170. }
  171. this.showHelp = false
  172. this.sending = true
  173. let data = {
  174. anzeigename: this.anzeigename,
  175. name: this.name,
  176. email: this.email,
  177. newsletter: false,
  178. }
  179. const response = await fetch(
  180. `${process.env.VUE_APP_API_URL}guest`, {
  181. method: 'POST',
  182. headers: {
  183. 'Content-Type': 'application/json',
  184. },
  185. body: JSON.stringify(data),
  186. }
  187. )
  188. if (response.status === 200) {
  189. this.anzeigename = ''
  190. this.name = ''
  191. this.email = ''
  192. this.success = true
  193. this.fetchGuests()
  194. } else {
  195. this.success = false
  196. this.fetchGuests()
  197. this.error = true
  198. this.errorReason = await response.json()
  199. }
  200. this.sending = false
  201. return false
  202. },
  203. resetForm () {
  204. this.anzeigename = ''
  205. this.name = ''
  206. this.email = ''
  207. this.success = false
  208. },
  209. },
  210. mounted() {
  211. this.fetchStatus()
  212. this.fetchGuests()
  213. document.addEventListener('selectionchange', () => {
  214. this.selection = document.getSelection()
  215. // console.log(this.selection)
  216. if (this.selection) {
  217. this.selectionText = this.selection.toString()
  218. }
  219. });
  220. // this.$refs.details.$el
  221. },
  222. }
  223. </script>
  224. <style>
  225. :root {
  226. --primary-color: #ff8c00;
  227. cursor: url('cursor.png'), auto;
  228. }
  229. body {
  230. margin: 0;
  231. background-image: url('/ignaz-background.jpg');
  232. background-size: cover;
  233. background-attachment: fixed;
  234. background-position: bottom;
  235. }
  236. #ignaz {
  237. border: 3px solid #fff;
  238. padding-bottom: 200px;
  239. margin: 20px;
  240. }
  241. .ignaz-header {
  242. position: relative;
  243. z-index: 1;
  244. text-align: center;
  245. }
  246. .ignaz-header > img {
  247. max-width: 90%;
  248. }
  249. .beinchen {
  250. position: fixed;
  251. margin-top: calc(50vh - 400px);
  252. /* margin-bottom: 80px; */
  253. max-width: 100%;
  254. max-height: 100vh;
  255. width: 40em;
  256. z-index: 0;
  257. mix-blend-mode: screen;
  258. }
  259. a {
  260. color: inherit;
  261. cursor: inherit;
  262. }
  263. .otf {
  264. width: 100%;
  265. /* background-color: rgb(167, 204, 247); */
  266. /* background-image: url('bg.gif'); */
  267. background-size: cover;
  268. display: flex;
  269. flex-direction: column;
  270. align-items: center;
  271. min-height: 100vh;
  272. position: relative;
  273. }
  274. .input-headline {
  275. color: var(--primary-color);
  276. /* mix-blend-mode: multiply; */
  277. font-size: 4vh;
  278. margin-bottom: .8vh;
  279. text-align: center;
  280. }
  281. .input-form {
  282. display: flex;
  283. flex-direction: column;
  284. max-width: 90%;
  285. width: 500px;
  286. margin-top: 4vh;
  287. mix-blend-mode: hard-light;
  288. }
  289. .ignaz-form {
  290. z-index: 9;
  291. position: relative;
  292. display: flex;
  293. align-items: center;
  294. flex-direction: column;
  295. }
  296. .input-fields {
  297. }
  298. .input-text,
  299. .input-btn,
  300. .input-cb {
  301. color: #000;
  302. background: rgba(255, 255, 255, 0.9);
  303. font-size: 2.8vh;
  304. font-family: 'Barlow Condensed', sans-serif;
  305. border: 0;
  306. padding: .5em 1em;
  307. line-height: 1.4;
  308. max-width: 100%;
  309. cursor: inherit;
  310. }
  311. .input-btn {
  312. color: #000;
  313. background-color: var(--primary-color);
  314. }
  315. .input-btn:hover {
  316. background: #ffbb00;
  317. }
  318. .input-checkbox {
  319. margin: 0 1em 0 0;
  320. }
  321. @media screen and (max-width: 1000px) {
  322. .form-wrapper {
  323. margin-top: 4em;
  324. }
  325. .input-text,
  326. .input-btn {
  327. width: 100%;
  328. max-width: 100%;
  329. min-width: 0;
  330. text-align: center;
  331. }
  332. /* .input-form {
  333. position: absolute;
  334. bottom: 0;
  335. display: flex;
  336. flex-direction: column;
  337. } */
  338. }
  339. @media screen and (max-width: 700px) {
  340. .beinchen {
  341. margin-top: 20em;
  342. }
  343. }
  344. .input-text {
  345. width: auto;
  346. flex-grow: 1;
  347. }
  348. .wordcloud {
  349. mix-blend-mode: overlay;
  350. }
  351. .details {
  352. color: var(--primary-color);
  353. font-size: 30px;
  354. text-shadow: #000 1px -1px 0;
  355. max-width: 80em;
  356. margin: 16% 3% 200px;
  357. padding: 3%;
  358. display: flex;
  359. white-space: nowrap;
  360. }
  361. .details-address,
  362. .details-location,
  363. .details-date {
  364. max-width: 20vw;
  365. }
  366. .details-address {
  367. transform: rotateZ(90deg);
  368. }
  369. .details-location {
  370. transform: rotateZ(80deg);
  371. }
  372. .details-date {
  373. transform: rotateZ(83deg);
  374. }
  375. .share {
  376. max-width: 30em;
  377. width: 80%;
  378. z-index: 99;
  379. position: relative;
  380. }
  381. .share:hover {
  382. mix-blend-mode: difference;
  383. }
  384. .selection-text {
  385. position: fixed;
  386. z-index: 9999;
  387. font-size: 10vh;
  388. line-height: 1em;
  389. pointer-events: none;
  390. color: #fff;
  391. mix-blend-mode: difference;
  392. top: 10%;
  393. }
  394. .marquee {
  395. position: relative;
  396. width: 100vw;
  397. max-width: 100%;
  398. height: 200px;
  399. overflow-x: hidden;
  400. font-size: 10em;
  401. z-index: 0;
  402. }
  403. .marquee {
  404. position: fixed;
  405. bottom: .5em;
  406. font-size: 5em;
  407. background: #ba0394;
  408. height: 1.3em;
  409. color: #000;
  410. transform: rotateZ(7deg) scale(1.1);
  411. }
  412. .track {
  413. position: absolute;
  414. white-space: nowrap;
  415. will-change: transform;
  416. animation: marquee 2s linear infinite;
  417. }
  418. @keyframes marquee {
  419. from { transform: translateX(0); }
  420. to { transform: translateX(-50%); }
  421. }
  422. </style>