File size: 2,533 Bytes
5df573e
 
 
 
c7b701f
 
f6fefb9
c7b701f
 
5e6ea56
 
c7b701f
f6fefb9
 
 
c7b701f
 
 
 
5df573e
 
 
 
 
625621e
 
97b36fc
5df573e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ba4a5a
5df573e
 
4ba4a5a
5df573e
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!doctype html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Mermaid Chart Viewer</title>

        <!--meta name="viewport" content="width=device-width" />
        <meta name="twitter:card" content="player"/>
        <meta name="twitter:site" content=""/>
        <meta name="twitter:player" content="https://omnibus-text-to-chart.hf.space/file=merm.html?mermaid=$merm"/>
        <meta name="twitter:player:stream" content="https://omnibus-text-to-chart.hf.space/file=merm.html?mermaid=$merm"/>
        <meta name="twitter:player:width" content="100%"/>
        <meta name="twitter:player:height" content="100%"/-->   
      
        <meta name="twitter:card" content="image"/>
        <meta property="og:title" content="Chart Viewer"/>
        <meta property="og:description" content="View Charts with custom links"/>
        <meta property="og:image" content="https://portal-Moondream-1.static.hf.space/card_im.png"/>
        <!--meta http-equiv="refresh" content="0; url=https://omnibus-moondream1.hf.space"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>

<style>
  #chart_box{
    text-align: center;
  }

  
</style>
	</head>
	<body>
 
     
      <div id="chart_box">
        <pre id = "chart" class="mermaid">

        </pre>
      </div>
      <script>
        const queryString = window.location.search;
        const urlParams = new URLSearchParams(queryString);
        const merm = urlParams.get("mermaid");
        console.log(merm);
        this_id=document.getElementById("chart");
        //this_id.innerHTML="graph TD\nA[Start] --> B[Task 1]\nB --> C[Task 7]\nC --> D[End]"    
        this_id.innerText=merm;    
        
      </script>      

      
    <script type="module">
      const defaultConfig = {
        startOnLoad: true,
        securityLevel: 'loose',
        flowchart: {
          useMaxWidth: 0,
        },
        gantt: {
          useMaxWidth: 0,
        },
      }
      //const mermaidConfig = merge(defaultConfig, config)
      
      import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
      mermaid.initialize(defaultConfig);
      //mermaid.initialize({ securityLevel: 'loose',startOnLoad: true, useMaxWidth: 0 });
      //mermaid.initialize({ securityLevel: 'loose',startOnLoad: true });
    </script>
	</body>
</html>