djledda.de main
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
2 个月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import { defineComponent, Suspense, type VNode } from "vue";
  2. import { type RouteRecordRaw, RouterLink, RouterView, useRoute } from "vue-router";
  3. import GEMain from "@/generative-energy/GEMain.tsx";
  4. import DJEmail from "@/DJEmail.tsx";
  5. import GEDeutsch from "@/generative-energy/GEDeutsch.tsx";
  6. import GEDeutschArticle from "@/generative-energy/GEDeutschArticle.tsx";
  7. import GECalculator from "@/generative-energy/GECalculator.tsx";
  8. import DJDonate from "@/DJDonate.tsx";
  9. export const routes: RouteRecordRaw[] = [
  10. {
  11. path: "/",
  12. name: "GEMain",
  13. component: GEMain,
  14. },
  15. {
  16. path: "/calculator",
  17. name: "GECalculator",
  18. component: GECalculator,
  19. },
  20. {
  21. path: "/raypeat-deutsch",
  22. name: "GEDeutsch",
  23. component: GEDeutsch,
  24. },
  25. {
  26. path: "/raypeat-deutsch/article/:articleName",
  27. name: "GEDeutschArticle",
  28. component: GEDeutschArticle,
  29. props: ({ params }) => {
  30. if ("articleName" in params) {
  31. return { articleName: params.articleName };
  32. } else {
  33. return false;
  34. }
  35. },
  36. },
  37. ];
  38. export default defineComponent({
  39. name: "ge-root",
  40. setup() {
  41. const route = useRoute();
  42. return () => (
  43. <>
  44. <main>
  45. <RouterLink class={"home-btn" + (route.name === "GEMain" ? " hide" : "")} to={{ name: "GEMain" }}>
  46. Generative Energy Home
  47. </RouterLink>
  48. <RouterView>
  49. {{
  50. default: ({ Component }: { Component: VNode }) => (Component &&
  51. (
  52. <Suspense>
  53. {{
  54. default: () => Component,
  55. fallback: () => <div>Page loading...</div>,
  56. }}
  57. </Suspense>
  58. )),
  59. }}
  60. </RouterView>
  61. <footer>
  62. <div class="bottom">
  63. <div>
  64. <a href="/">djledda.de</a> 2023 - <DJEmail>{() => "Contact"}</DJEmail>
  65. </div>
  66. <DJDonate />
  67. </div>
  68. </footer>
  69. </main>
  70. </>
  71. );
  72. },
  73. });