default.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <v-app dark>
  3. <!-- height = 4rem, margin-y = 1rem -->
  4. <v-app-bar app flat class="topBar fly-in-from-top my-4 mx-auto">
  5. <v-tabs centered center-active color="primary" router show-arrows>
  6. <v-tab v-for="link in links" :key="link.path" :to="link.path">
  7. {{ link.name }}
  8. </v-tab>
  9. </v-tabs>
  10. </v-app-bar>
  11. <!-- abstract background -->
  12. <v-img
  13. src="/ui/abstract.svg"
  14. style="position: absolute; left: 0; right: 0; width: 100vw; height: 100vh"
  15. />
  16. <v-main style="padding-top: 4rem !important">
  17. <!-- min-height helps keep content centered, use .debug to to see it -->
  18. <center
  19. class="py-8 mx-auto d-flex flex-column justify-center items-center"
  20. style="width: 90vw; min-height: calc(100vh - 8rem)"
  21. >
  22. <nuxt />
  23. </center>
  24. </v-main>
  25. </v-app>
  26. </template>
  27. <script>
  28. export default {
  29. data: () => ({
  30. links: [
  31. { name: "Home", path: "/" },
  32. { name: "Install", path: "/install" },
  33. { name: "API", path: "/docs" },
  34. { name: "Help", path: "/help" },
  35. { name: "FAQ", path: "/faq" },
  36. { name: "Donate", path: "/donate" },
  37. { name: "Links", path: "/links" },
  38. ],
  39. }),
  40. };
  41. </script>
  42. <style>
  43. html,
  44. body {
  45. height: 100%;
  46. background: #111; /* for MacOS/iOS overscroll */
  47. height: -webkit-fill-available;
  48. background: #111;
  49. overflow: auto;
  50. }
  51. ::-webkit-scrollbar {
  52. width: 1rem;
  53. }
  54. ::-webkit-scrollbar-track {
  55. background: #111; /* color of the tracking area */
  56. }
  57. ::-webkit-scrollbar-thumb {
  58. background-color: #333; /* color of the scroll thumb */
  59. border-radius: 20px; /* roundness of the scroll thumb */
  60. border: 4px solid #111; /* creates padding around scroll thumb */
  61. }
  62. ::-webkit-scrollbar-thumb:hover {
  63. background-color: #f22; /* color of the scroll thumb */
  64. border-radius: 20px; /* roundness of the scroll thumb */
  65. border: 4px solid #111; /* creates padding around scroll thumb */
  66. }
  67. .debug {
  68. /* usage: add class="debug" to the element */
  69. outline: 2px solid red;
  70. }
  71. .mainAltButton {
  72. margin: 0.25em;
  73. }
  74. .topBar {
  75. padding: 0 3rem;
  76. width: fit-content !important;
  77. background-color: #222 !important;
  78. border-radius: 1rem !important;
  79. border-radius: 0.75rem;
  80. overflow: hidden;
  81. }
  82. .title-text {
  83. font-size: 3rem;
  84. }
  85. @media (max-width: 768px) {
  86. /* mobile */
  87. .title-text {
  88. font-size: 2rem;
  89. }
  90. .topBar {
  91. width: calc(
  92. 100vw - 2rem
  93. ) !important; /* (2rem = mx-4) 1rem on left, 1rem on right */
  94. padding: 0;
  95. }
  96. }
  97. /* animations and all that */
  98. .swoop-in-enter-active,
  99. .swoop-in-leave-active,
  100. .swoop-out-enter-active,
  101. .swoop-out-leave-active,
  102. .swoop-left-enter-active,
  103. .swoop-left-leave-active,
  104. .swoop-right-enter-active,
  105. .swoop-right-leave-active {
  106. transition-duration: 0.1s;
  107. transition-property: opacity, transform;
  108. /* overflow: hidden; */
  109. }
  110. .swoop-left-enter,
  111. .swoop-right-leave-active {
  112. opacity: 0;
  113. transform: translate(1rem, 0);
  114. }
  115. .swoop-left-leave-active,
  116. .swoop-right-enter {
  117. opacity: 0;
  118. transform: translate(-1rem, 0);
  119. }
  120. .swoop-in-enter,
  121. .swoop-out-leave-active {
  122. opacity: 0;
  123. transform: scale(0.9);
  124. }
  125. .swoop-in-leave-active,
  126. .swoop-out-enter {
  127. opacity: 0;
  128. transform: scale(1.1);
  129. }
  130. .fly-in-from-top {
  131. opacity: 0;
  132. transform: scale(0.8) translateY(-12rem);
  133. animation: fly-in-from-top 0.5s 0.3s ease forwards;
  134. }
  135. @keyframes fly-in-from-top {
  136. 0% {
  137. opacity: 0;
  138. transform: scale(0.8) translateY(-12rem);
  139. }
  140. 100% {
  141. opacity: 1;
  142. transform: scale(1) translateY(0);
  143. }
  144. }
  145. /* reduced-motion animations */
  146. @media (prefers-reduced-motion) {
  147. .fly-in-from-top {
  148. opacity: 1;
  149. transform: none;
  150. animation: none;
  151. }
  152. .swoop-in-enter-active,
  153. .swoop-in-leave-active,
  154. .swoop-out-enter-active,
  155. .swoop-out-leave-active,
  156. .swoop-left-enter-active,
  157. .swoop-left-leave-active,
  158. .swoop-right-enter-active,
  159. .swoop-right-leave-active {
  160. transition-duration: 0.05s;
  161. transition-property: opacity;
  162. }
  163. .swoop-left-enter,
  164. .swoop-right-leave-active {
  165. opacity: 0;
  166. transform: none;
  167. }
  168. .swoop-left-leave-active,
  169. .swoop-right-enter {
  170. opacity: 0;
  171. transform: none;
  172. }
  173. .swoop-in-enter,
  174. .swoop-out-leave-active {
  175. opacity: 0;
  176. transform: none;
  177. }
  178. .swoop-in-leave-active,
  179. .swoop-out-enter {
  180. opacity: 0;
  181. transform: none;
  182. }
  183. }
  184. </style>