index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 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/"><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. @reference '../assets/css/main.css';
  45. @keyframes floating {
  46. 0% { transform: translate(0, -5px); }
  47. 50% { transform: translate(0, 0px); }
  48. 100% { transform: translate(0, -5px); }
  49. }
  50. .scroll-down {
  51. svg {
  52. width: 25px;
  53. height: 25px;
  54. display: inline;
  55. animation-name: floating;
  56. animation-duration: 2s;
  57. animation-iteration-count: infinite;
  58. animation-timing-function: ease-in-out;
  59. opacity: 50%;
  60. }
  61. }
  62. html.no-webp {
  63. #home_bars a {
  64. &.research {
  65. background-image: url(../images/home-research-2x.png);
  66. }
  67. &.development {
  68. background-image: url(../images/home-development-2x.png);
  69. }
  70. &.writing {
  71. background-image: url(../images/home-writing-2x.png);
  72. }
  73. &.other {
  74. background-image: url(../images/home-contact-2x.png);
  75. }
  76. }
  77. }
  78. #home_bars {
  79. a {
  80. width: 25%;
  81. height: 250px;
  82. padding: 0;
  83. margin: 0;
  84. position: relative;
  85. background: grey;
  86. &.research {
  87. background-image: url(../images/home-research-2x.webp);
  88. background-position: 100% 100%;
  89. background-size: cover;
  90. }
  91. &.development {
  92. background-image: url(../images/home-development-2x.webp);
  93. background-position: 100% 100%;
  94. background-size: cover;
  95. }
  96. &.writing {
  97. background-image: url(../images/home-writing-2x.webp);
  98. background-position: 100% 100%;
  99. background-size: cover;
  100. }
  101. &.other {
  102. background-image: url(../images/home-contact-2x.webp);
  103. background-position: 100% 100%;
  104. background-size: cover;
  105. }
  106. span {
  107. position: absolute;
  108. color: #fff;
  109. font-family: Oswald,sans-serif;
  110. font-size: 30px;
  111. white-space: nowrap;
  112. transform-origin: bottom left;
  113. transform: rotate(-90deg);
  114. display: block;
  115. bottom: 0.5em;
  116. left: 1.6667em;
  117. overflow: visible;
  118. }
  119. }
  120. }
  121. </style>
  122. <script lang="ts" setup>
  123. definePageMeta({
  124. layout: false
  125. });
  126. const title = "Hello, I'm Andrea Franceschini, PhD";
  127. const keywords = "music, learning, tabletop, research, the open university, university of cambridge, isaac physics, reactable";
  128. useState('pageClasses', () => ['index', 'page']);
  129. useState('headline', () => "Hello");
  130. useState('tagline', () => "I'm Andrea");
  131. useHead({
  132. title,
  133. meta: [
  134. { property: 'keywords', content: keywords },
  135. { property: 'DC.Title', content: title },
  136. { property: 'twitter:title', content: title },
  137. { property: 'og:title', content: title },
  138. ]
  139. });
  140. const video = ref<HTMLIFrameElement>();
  141. onMounted(() => {
  142. // @ts-ignore
  143. const src = video.value?.dataset['src'];
  144. video.value?.setAttribute('src', src || '');
  145. });
  146. </script>