|
1 | 1 | import Container from "@/app/_components/preference/container"; |
2 | | -import { loadPost } from "@/lib/share/api"; |
3 | | -import { PostBody } from "@/app/_components/post_gen/post-body"; |
4 | | - |
5 | | -import Mermaid from "@/app/_components/post_gen/render-mermaid"; |
6 | | - |
7 | 2 | // import MyTest from "@/app/_components/mytest"; |
8 | 3 | // import MyTest2 from "@/app/_components/mytest2"; |
9 | 4 |
|
10 | 5 | export default function Index() { |
11 | 6 |
|
12 | | - const ImportComponents = { |
13 | | - Mermaid, |
14 | | - }; |
15 | | - |
16 | | - const diagram = ` |
17 | | - flowchart LR |
18 | | - A[User] --> B[Gateway] |
19 | | - B --> C[Application] |
20 | | - C --> D[(Database)] |
21 | | - `; |
22 | | - |
23 | | - const dfdiagram = ` |
24 | | - %%{init: { |
25 | | - "theme": "default", |
26 | | - "themeVariables": { |
27 | | - "background": "#ffffff", |
28 | | - "primaryTextColor": "#000000", |
29 | | - "primaryBorderColor": "#444444", |
30 | | - "lineColor": "#444444", |
31 | | - "fontFamily": "Arial, Helvetica, sans-serif" |
32 | | - } |
33 | | - }}%% |
34 | | -
|
35 | | - flowchart TB |
36 | | -
|
37 | | - subgraph Internet |
38 | | - U[User] |
39 | | - end |
40 | | -
|
41 | | - subgraph Cloud_Environment |
42 | | - CA[Cloud Application] |
43 | | - CD[(Cloud Database)] |
44 | | - end |
45 | | -
|
46 | | - subgraph Hybrid_Connectivity |
47 | | - HC[VPN / Direct Connect] |
48 | | - end |
49 | | -
|
50 | | - subgraph Secure_Intermediary |
51 | | - HG[Hybrid Gateway] |
52 | | - end |
53 | | -
|
54 | | - subgraph On_Premises |
55 | | - OP[On-Premises Application] |
56 | | - OD[(On-Premises Database)] |
57 | | - end |
58 | | -
|
59 | | - U -->|1 Login Request| CA |
60 | | - CA -->|2 Read / Write| CD |
61 | | - CA -->|3 API Request| HC |
62 | | - HC -->|4 Secure Gateway| HG |
63 | | - HG -->|5 Internal Call| OP |
64 | | - OP -->|6 Query| OD |
65 | | -
|
66 | | - %% focus node |
67 | | - classDef focus fill:#ffffff,stroke:#ff0000,stroke-width:3px,color:#000000; |
68 | | -
|
69 | | - %% dim nodes |
70 | | - classDef dim fill:#f5f5f5,stroke:#cccccc,color:#999999; |
71 | | -
|
72 | | - class HG focus; |
73 | | - class U,CA dim; |
74 | | -
|
75 | | - %% trust zone styling |
76 | | - style Internet fill:#ffffff,stroke:#999999,stroke-dasharray: 5 5 |
77 | | - style Cloud_Environment fill:#eef5ff,stroke:#5b8bd9 |
78 | | - style Hybrid_Connectivity fill:#fff7e6,stroke:#d69e2e |
79 | | - style Secure_Intermediary fill:#ffeaea,stroke:#ff0000 |
80 | | - style On_Premises fill:#f0fff4,stroke:#38a169 |
81 | | - `; |
82 | | - |
83 | | - const readmermaid = loadPost("mermaid.md","_blog_post/_blogs") |
84 | | - // const readmermaidmdx = loadPost("test_mermaid.mdx","_blog_post/_blogs") |
85 | 7 | return ( |
86 | 8 | <main> |
87 | 9 | <Container> |
88 | 10 | <h1> This page is for logic testing only...</h1> |
89 | | - <h1> - - - - </h1> |
90 | | - <h2> Mermaid Server-side WORK!...</h2> |
91 | | - <p> - PostBody content=readmermaid </p> |
92 | | - |
93 | | - <PostBody content={readmermaid} components={ImportComponents}/> |
94 | | - <br /> |
95 | | - <p> - PostBody content=readmermaidmdx </p> |
96 | | - {/* <PostBody content={readmermaidmdx} components={ImportComponents}/> */} |
97 | | - |
98 | | - <h2> Mermaid `const diagram` script directly at <code>page.tsx</code> WORK and font is NOT gray out!...</h2> |
99 | | - <br /> |
100 | | - <h3>diagram</h3> |
101 | | - <Mermaid chart={diagram} /> |
| 11 | + {/* <MyTest /> |
| 12 | + <MyTest2 /> */} |
102 | 13 |
|
103 | | - <h3>dfdiagram</h3> |
104 | | - <Mermaid chart={dfdiagram} /> |
105 | 14 | </Container> |
106 | 15 | </main> |
107 | 16 | ); |
108 | 17 | } |
109 | | - |
110 | | - |
111 | | -// |
112 | | -// |
113 | | -// |
114 | | - |
115 | | -// import Container from "@/app/_components/preference/container"; |
116 | | -// // import MyTest from "@/app/_components/mytest"; |
117 | | -// // import MyTest2 from "@/app/_components/mytest2"; |
118 | | - |
119 | | -// export default function Index() { |
120 | | - |
121 | | -// return ( |
122 | | -// <main> |
123 | | -// <Container> |
124 | | -// <h1> This page is for logic testing only...</h1> |
125 | | -// {/* <MyTest /> |
126 | | -// <MyTest2 /> */} |
127 | | - |
128 | | -// </Container> |
129 | | -// </main> |
130 | | -// ); |
131 | | -// } |
0 commit comments