djledda.de main
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 2 месеца
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { defineComponent, type VNode, Suspense } from "vue";
  2. import { useRoute, RouterLink, RouterView, type RouteRecordRaw } from 'vue-router';
  3. import GEMain from "@/generative-energy/GEMain.tsx";
  4. import DJEmail from "@/DJEmail.tsx";
  5. import GEPaypal from "@/generative-energy/GEPaypal.tsx";
  6. import GEDeutsch from "@/generative-energy/GEDeutsch.tsx";
  7. import GEDeutschArticle from "@/generative-energy/GEDeutschArticle.tsx";
  8. import GECalculator from "@/generative-energy/GECalculator.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. <main>
  44. <RouterLink class={"home-btn" + (route.name === 'GEMain' ? ' hide' : '') }
  45. to={{ name: 'GEMain' }}>
  46. Generative Energy Home
  47. </RouterLink>
  48. <RouterView>{{ default: ({ Component }: { Component: VNode }) => (Component &&
  49. <Suspense>{{
  50. default: () => Component,
  51. fallback: () => <div>Page loading...</div>,
  52. }}</Suspense>
  53. )}}</RouterView>
  54. <footer>
  55. <div class="bottom">
  56. <div>
  57. <a href="https://djledda.de/">djledda.de</a> 2023 - <DJEmail>{ () => 'Contact' }</DJEmail>
  58. </div>
  59. <GEPaypal />
  60. </div>
  61. </footer>
  62. </main>
  63. </>;
  64. },
  65. });