File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 2828-->
2929{{ $id := .Get "id" }}
3030
31+ <!-- get the design id from the id , the id contains embedded-design- as prefix -->
32+ {{ $designId := replace $id "embedded-design-" "" }}
33+
34+
35+ <!-- get the hostname for provider -->
36+ {{ $remoteProviderHost := .Get "host" | default "https://cloud.layer5.io" }}
37+ <!-- create design link -->
38+ {{ $designLink := printf "%s/catalog/content/design/%s" $remoteProviderHost $designId }}
39+
3140<!--
3241 Retrieve the size for the embedding container.
3342 If not provided, "full" is used as default.
3443-->
3544{{ $size := .Get "size" | default "full" }}
3645{{ $style := .Get "style" }}
46+ {{ $showOpenLink := .Get "showOpenLink" | default "true" }}
3747
3848< style >
3949.meshery-embed-container {
5464 width : 100% ;
5565 height : 100% ;
5666}
67+
5768</ style >
5869
5970<!--
6677 - Width: 100% (responsive to container width)
6778 - Border: 1px solid #eee (light border for visibility)
6879-->
80+ < div style ="display: flex; flex-direction: column; align-items: center; gap: 0.5rem; ">
6981< div
7082 id ="{{ $id }} "
7183 {{- if $style -}}
7587 {{- end -}}
7688> </ div >
7789
90+ < a href ="{{ $designLink }} " target ="_blank " rel ="noopener noreferrer ">
91+ Open Design
92+ </ a >
93+
94+ </ div >
95+
7896<!--
7997 Embed Script:
8098 The JavaScript file (retrieved from the `src` attribute) is included here.
You can’t perform that action at this time.
0 commit comments