mirror of
				https://github.com/ItsDrike/itsdrike.com.git
				synced 2025-11-04 04:06:36 +00:00 
			
		
		
		
	Update mermaid shortcode
This commit is contained in:
		
							parent
							
								
									4c212e8f64
								
							
						
					
					
						commit
						8d6976467a
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,8 +1,12 @@
 | 
			
		|||
{{ $mermaidData := dict "theme" "default" }}
 | 
			
		||||
{{ $data := dict "code" .Inner "mermaid" $mermaidData }}
 | 
			
		||||
{{ $imgsrc := "https://mermain.ink/img/{{ $data | jsonify | base64Encode }}"}}
 | 
			
		||||
 | 
			
		||||
<figure class="mermaid">
 | 
			
		||||
    <img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer">
 | 
			
		||||
    <img src="{{ $imgsrc }}" referrerpolicy="no-referrer" style="object-fit: scale-down;"
 | 
			
		||||
        {{ if .Get "width" }}width='{{ .Get "width" }}' {{ end }}
 | 
			
		||||
        {{ if .Get "height" }}height='{{ .Get "height" }}' {{ end }}
 | 
			
		||||
    >
 | 
			
		||||
    <figcaption class="text-center">
 | 
			
		||||
        <small>{{ .Get "caption" }}</small>
 | 
			
		||||
    </figcaption>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue