docs.vue 2.3 KB

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