index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template><NuxtLayout name="default">
  2. <div class="container mx-auto max-w-screen-xl md:px-12 sm:px-0 px-0">
  3. <h3 class="sm:text-5xl text-3xl text-center -mt-6 sm:-mt-16">
  4. I do things.
  5. </h3>
  6. <div class="grid sm:grid-cols-2 gap-6 mx-auto sm:py-8 py-6 col">
  7. <div class="aspect-w-16 aspect-h-9 shadow-lg">
  8. <a href="https://edugames.andreafranceschini.org/"><video autoplay loop muted class="rounded">
  9. <source src="/images/gneg.mp4" type="video/mp4" />
  10. Your browser does not support the video tag.
  11. </video></a>
  12. </div>
  13. <div class="aspect-w-16 aspect-h-9 shadow-lg">
  14. <a href="https://edugames.andreafranceschini.org/cash-or-card"><figure>
  15. <picture>
  16. <source srcset="/images/cash_or_card-2x.webp" type="image/webp" />
  17. <source srcset="/images/cash_or_card.jpg 1x, /images/cash_or_card-2x.jpg 2x" type="image/jpeg" />
  18. <img class="rounded" srcset="/images/cash_or_card.jpg" alt="Circular Bells" />
  19. </picture>
  20. </figure></a>
  21. </div>
  22. <!-- <div class="aspect-w-16 aspect-h-9 shadow-lg hidden sm:block">
  23. <iframe ref="video" loading="lazy" data-src="https://www.youtube-nocookie.com/embed/AszBiqrvAaU" title="How to make your computer go BOOP" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  24. </div> -->
  25. </div>
  26. <h3 class="sm:text-4xl text-3xl pb-8 text-center">
  27. <span class="scroll-down sm:hidden">
  28. <ScrollDownSVG />
  29. </span>
  30. What can I do for you?
  31. <span class="scroll-down sm:hidden">
  32. <ScrollDownSVG />
  33. </span>
  34. </h3>
  35. <div id="home_bars" class="flex flex-row sm:max-w-screen-lg mx-auto">
  36. <a href="/research" class="research flex-1"><span>Research</span></a>
  37. <a href="/development" class="development flex-1"><span>Development</span></a>
  38. <a href="/writing" class="writing flex-1"><span>Technical Writing</span></a>
  39. <a href="/contact" class="other flex-1"><span>Something else</span></a>
  40. </div>
  41. </div>
  42. </NuxtLayout></template>
  43. <style lang="pcss">
  44. @keyframes floating {
  45. 0% { transform: translate(0, -5px); }
  46. 50% { transform: translate(0, 0px); }
  47. 100% { transform: translate(0, -5px); }
  48. }
  49. .scroll-down {
  50. svg {
  51. width: 25px;
  52. height: 25px;
  53. display: inline;
  54. animation-name: floating;
  55. animation-duration: 2s;
  56. animation-iteration-count: infinite;
  57. animation-timing-function: ease-in-out;
  58. opacity: 50%;
  59. }
  60. }
  61. html.no-webp {
  62. #home_bars a {
  63. &.research {
  64. background-image: url(../images/home-research-2x.png);
  65. }
  66. &.development {
  67. background-image: url(../images/home-development-2x.png);
  68. }
  69. &.writing {
  70. background-image: url(../images/home-writing-2x.png);
  71. }
  72. &.other {
  73. background-image: url(../images/home-contact-2x.png);
  74. }
  75. }
  76. }
  77. #home_bars {
  78. a {
  79. width: 25%;
  80. height: 250px;
  81. padding: 0;
  82. margin: 0;
  83. position: relative;
  84. background: grey;
  85. &.research {
  86. background-image: url(../images/home-research-2x.webp);
  87. background-position: 100% 100%;
  88. background-size: cover;
  89. }
  90. &.development {
  91. background-image: url(../images/home-development-2x.webp);
  92. background-position: 100% 100%;
  93. background-size: cover;
  94. }
  95. &.writing {
  96. background-image: url(../images/home-writing-2x.webp);
  97. background-position: 100% 100%;
  98. background-size: cover;
  99. }
  100. &.other {
  101. background-image: url(../images/home-contact-2x.webp);
  102. background-position: 100% 100%;
  103. background-size: cover;
  104. }
  105. span {
  106. position: absolute;
  107. color: #fff;
  108. font-family: Oswald,sans-serif;
  109. font-size: 30px;
  110. white-space: nowrap;
  111. transform-origin: bottom left;
  112. transform: rotate(-90deg);
  113. display: block;
  114. bottom: 0.5em;
  115. left: 1.6667em;
  116. overflow: visible;
  117. }
  118. }
  119. }
  120. </style>
  121. <script lang="ts" setup>
  122. definePageMeta({
  123. layout: false
  124. });
  125. const title = "Hello, I'm Andrea Franceschini, PhD";
  126. const keywords = "music, learning, tabletop, research, the open university, university of cambridge, isaac physics, reactable";
  127. useState('pageClasses', () => ['index', 'page']);
  128. useState('headline', () => "Hello");
  129. useState('tagline', () => "I'm Andrea");
  130. useHead({
  131. title,
  132. meta: [
  133. { property: 'keywords', content: keywords },
  134. { property: 'DC.Title', content: title },
  135. { property: 'twitter:title', content: title },
  136. { property: 'og:title', content: title },
  137. ]
  138. });
  139. const video = ref<HTMLIFrameElement>();
  140. onMounted(() => {
  141. // @ts-ignore
  142. const src = video.value?.dataset['src'];
  143. video.value?.setAttribute('src', src || '');
  144. });
  145. </script>