docs.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div class="row wrap justify-center full-width mx-auto" style="width: 80vw">
  3. <!-- Left Section // "Sections" Card -->
  4. <v-card
  5. class="col-xs-12 mx-2 elevation-0"
  6. style="
  7. background: transparent;
  8. height: max-content;
  9. position: sticky;
  10. top: 5.5rem;
  11. max-width: 500px;
  12. "
  13. >
  14. <!-- <v-card-title style="padding-bottom: 0 !important; color: #aaa">
  15. Sections
  16. </v-card-title> -->
  17. <v-list style="background: transparent">
  18. <!-- Dynamically Generate Links From Below -->
  19. <v-list-item
  20. v-for="(item, i) in links"
  21. :key="i"
  22. :to="item.to"
  23. router
  24. class="mt-4"
  25. color="primary"
  26. style="overflow: hidden; border-radius: 0.75rem"
  27. >
  28. <v-list-item-title style="text-align: right">
  29. <v-list-item-title v-text="item.text" />
  30. </v-list-item-title>
  31. <v-list-item-icon>
  32. <v-icon v-text="item.icon" />
  33. </v-list-item-icon>
  34. </v-list-item>
  35. </v-list>
  36. </v-card>
  37. <!-- Child Pages // Card -->
  38. <v-card
  39. class="col-xs-12 col-md-6 text-left mx-2 my-6 pa-8"
  40. style="
  41. height: max-content;
  42. background-color: #222;
  43. border-radius: 0.75rem;
  44. width: 90%;
  45. "
  46. >
  47. <NuxtChild />
  48. </v-card>
  49. </div>
  50. </template>
  51. <script>
  52. export default {
  53. transition(to, from) {
  54. if (!from) return "swoop-in";
  55. let routes = ["index", "install", "docs", "help", "faq", "donate", "links"];
  56. if (routes.indexOf(to.name) < 0) return "swoop-out";
  57. if (routes.indexOf(from.name) < 0) return "swoop-in";
  58. return routes.indexOf(to.name) > routes.indexOf(from.name)
  59. ? "swoop-left"
  60. : "swoop-right";
  61. },
  62. data() {
  63. return {
  64. //--- Links To Generate Above ---//
  65. links: [
  66. {
  67. text: "Usage Rights",
  68. icon: "mdi-book-open-variant",
  69. to: "/docs/usage-rights",
  70. },
  71. {
  72. text: "URL Information",
  73. icon: "mdi-web",
  74. to: "/docs/url",
  75. },
  76. {
  77. text: "Available Endpoints",
  78. icon: "mdi-transit-connection-variant",
  79. to: "/docs/endpoints",
  80. },
  81. {
  82. text: "Basic Fetching Tutorial",
  83. icon: "mdi-school",
  84. to: "/docs/fetching",
  85. },
  86. ],
  87. };
  88. },
  89. };
  90. </script>