docs.vue 2.3 KB

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