index.vue 4.3 KB

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