default.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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: 100%; height: 100%"
  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: "Help", path: "/help" },
  34. { name: "FAQ", path: "/faq" },
  35. { name: "Donate", path: "/donate" },
  36. { name: "Links", path: "/links" },
  37. { name: "API", path: "/documentation" },
  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: #ff4444; /* 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. .debug {
  63. /* usage: add class="debug" to the element */
  64. outline: 2px solid red;
  65. }
  66. .mainAltButton {
  67. margin: 0.25em;
  68. }
  69. .topBar {
  70. padding: 0 3rem;
  71. width: fit-content !important;
  72. background-color: #222 !important;
  73. border-radius: 1rem !important;
  74. border-radius: 0.75rem;
  75. overflow: hidden;
  76. }
  77. .title-text {
  78. font-size: 3rem;
  79. }
  80. @media (max-width: 768px) {
  81. /* mobile */
  82. .title-text {
  83. font-size: 2rem;
  84. }
  85. .topBar {
  86. width: calc(
  87. 100vw - 2rem
  88. ) !important; /* (2rem = mx-4) 1rem on left, 1rem on right */
  89. padding: 0;
  90. }
  91. }
  92. /* animations and all that */
  93. .swoop-in-enter-active,
  94. .swoop-in-leave-active,
  95. .swoop-out-enter-active,
  96. .swoop-out-leave-active,
  97. .swoop-left-enter-active,
  98. .swoop-left-leave-active,
  99. .swoop-right-enter-active,
  100. .swoop-right-leave-active {
  101. transition-duration: 0.1s;
  102. transition-property: opacity, transform;
  103. /* overflow: hidden; */
  104. }
  105. .swoop-left-enter,
  106. .swoop-right-leave-active {
  107. opacity: 0;
  108. transform: translate(1rem, 0);
  109. }
  110. .swoop-left-leave-active,
  111. .swoop-right-enter {
  112. opacity: 0;
  113. transform: translate(-1rem, 0);
  114. }
  115. .swoop-in-enter,
  116. .swoop-out-leave-active {
  117. opacity: 0;
  118. transform: scale(0.9);
  119. }
  120. .swoop-in-leave-active,
  121. .swoop-out-enter {
  122. opacity: 0;
  123. transform: scale(1.1);
  124. }
  125. .fly-in-from-top {
  126. opacity: 0;
  127. transform: scale(0.8) translateY(-12rem);
  128. animation: fly-in-from-top 0.5s 0.3s ease forwards;
  129. }
  130. @keyframes fly-in-from-top {
  131. 0% {
  132. opacity: 0;
  133. transform: scale(0.8) translateY(-12rem);
  134. }
  135. 100% {
  136. opacity: 1;
  137. transform: scale(1) translateY(0);
  138. }
  139. }
  140. /* reduced-motion animations */
  141. @media (prefers-reduced-motion) {
  142. .fly-in-from-top {
  143. opacity: 1;
  144. transform: none;
  145. animation: none;
  146. }
  147. .swoop-in-enter-active,
  148. .swoop-in-leave-active,
  149. .swoop-out-enter-active,
  150. .swoop-out-leave-active,
  151. .swoop-left-enter-active,
  152. .swoop-left-leave-active,
  153. .swoop-right-enter-active,
  154. .swoop-right-leave-active {
  155. transition-duration: 0.05s;
  156. transition-property: opacity;
  157. }
  158. .swoop-left-enter,
  159. .swoop-right-leave-active {
  160. opacity: 0;
  161. transform: none;
  162. }
  163. .swoop-left-leave-active,
  164. .swoop-right-enter {
  165. opacity: 0;
  166. transform: none;
  167. }
  168. .swoop-in-enter,
  169. .swoop-out-leave-active {
  170. opacity: 0;
  171. transform: none;
  172. }
  173. .swoop-in-leave-active,
  174. .swoop-out-enter {
  175. opacity: 0;
  176. transform: none;
  177. }
  178. }
  179. </style>