index.vue 5.6 KB

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