docs.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div>
  3. <!-- Top Section // "Sections" Card -->
  4. <v-card max-width="600px" class="rounded-lg">
  5. <v-card-title style="padding-bottom: 0">Sections</v-card-title>
  6. <v-list>
  7. <!-- Dynamically Generate Links From Below -->
  8. <v-list-item v-for="(item, i) in links" :key="i" router :to="item.to">
  9. <v-list-item-icon>
  10. <v-icon v-text="item.icon" />
  11. </v-list-item-icon>
  12. <v-list-item-title style="text-align: left">
  13. <v-list-item-title v-text="item.text" />
  14. </v-list-item-title>
  15. </v-list-item>
  16. </v-list>
  17. </v-card>
  18. <!-- Child Pages // Card -->
  19. <v-card
  20. max-width="600px"
  21. class="rounded-lg"
  22. style="margin: 1em; padding: 0.75em; text-align: left"
  23. >
  24. <NuxtChild />
  25. </v-card>
  26. </div>
  27. </template>
  28. <script>
  29. export default {
  30. transition(to, from) {
  31. if (!from) return "swoop-in";
  32. let routes = ["index", "install", "docs", "help", "faq", "donate", "links"];
  33. if (routes.indexOf(to.name) < 0) return "swoop-out";
  34. if (routes.indexOf(from.name) < 0) return "swoop-in";
  35. return routes.indexOf(to.name) > routes.indexOf(from.name)
  36. ? "swoop-left"
  37. : "swoop-right";
  38. },
  39. data() {
  40. return {
  41. //--- Links To Generate Above ---//
  42. links: [
  43. {
  44. text: "Usage Rights",
  45. icon: "mdi-book-open-variant",
  46. to: "/docs/usage-rights",
  47. },
  48. {
  49. text: "URL Information",
  50. icon: "mdi-web",
  51. to: "/docs/url",
  52. },
  53. {
  54. text: "Available Endpoints",
  55. icon: "mdi-transit-connection-variant",
  56. to: "/docs/endpoints",
  57. },
  58. {
  59. text: "Basic Fetching Tutorial",
  60. icon: "mdi-school",
  61. to: "/docs/fetching",
  62. },
  63. ],
  64. };
  65. },
  66. };
  67. </script>