index.vue 4.7 KB

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