above_the_fold.neovan 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <@script>
  2. const rand = (min, max)=>{
  3. return (Math.random() * (max - min + 1)) + min;
  4. }
  5. const linkContainer = document.querySelector(".links");
  6. const links = document.querySelectorAll(".links a");
  7. for(let i = 0; i < links.length; i++){
  8. links[i].style.top = `${rand(100, linkContainer.offsetHeight-100)}px`;
  9. links[i].style.left = `${rand(100, linkContainer.offsetWidth-100)}px`;
  10. links[i].style.transform = `rotate(${rand(-55, 55)}deg)`;
  11. }
  12. <@/script>
  13. <@html>
  14. <div class="aboveTheFold">
  15. <div class="menu">
  16. <img class="menuLogo" src="/assets/logo.svg" alt="NeoVan Logo"> |
  17. <a href="#why">Why?</a> |
  18. <a href="https://git.leemorgan.dev/Lee/NeoVan">Docs</a> |
  19. <a href="/todo">TODO</a> |
  20. </div>
  21. <@ ./components/rotating_logo.neovan @>
  22. <h2>An anti-framework for building the front-end with plain HTML/CSS/JavaScript</h2>
  23. </div>
  24. <@/html>
  25. <@style>
  26. .aboveTheFold{
  27. display: flex;
  28. flex-direction: column;
  29. align-items: center;
  30. justify-content: space-around;
  31. height: 100vh;
  32. width: 100%;
  33. position: relative;
  34. overflow: hidden;
  35. }
  36. h2{
  37. text-align: center;
  38. margin: 15px;
  39. }
  40. .menu{
  41. display: flex;
  42. align-items: center;
  43. height: 55px;
  44. width: 100%;
  45. box-shadow: 0 4px 8px white;
  46. position: absolute;
  47. top: 0;
  48. left: 0;
  49. padding: 0 25px;
  50. box-sizing: border-box;
  51. }
  52. .menuLogo{
  53. max-height: 100%;
  54. }
  55. .menu a{
  56. font-size: 25px;
  57. margin: 0 15px;
  58. color: white;
  59. max-height: 100%;
  60. text-decoration: none;
  61. }
  62. <@/style>