index.vue 5.5 KB

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