above_the_fold.neovan 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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="/docs">Docs</a> |
  19. </div>
  20. <@ ./components/rotating_logo.neovan @>
  21. <h2>An anti-framework for building the front-end with plain HTML/CSS/JavaScript</h2>
  22. </div>
  23. <@/html>
  24. <@style>
  25. .aboveTheFold{
  26. display: flex;
  27. flex-direction: column;
  28. align-items: center;
  29. justify-content: space-around;
  30. height: 100vh;
  31. width: 100%;
  32. position: relative;
  33. overflow: hidden;
  34. }
  35. h2{
  36. text-align: center;
  37. margin: 15px;
  38. }
  39. .menu{
  40. display: flex;
  41. align-items: center;
  42. height: 55px;
  43. width: 100%;
  44. box-shadow: 0 4px 8px white;
  45. position: absolute;
  46. top: 0;
  47. left: 0;
  48. }
  49. .menuLogo{
  50. max-height: 100%;
  51. }
  52. .menu a{
  53. font-size: 25px;
  54. margin: 0 15px;
  55. color: white;
  56. max-height: 100%;
  57. text-decoration: none;
  58. }
  59. <@/style>