docs.vue 2.4 KB

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