Improve Katacoda button

Separate out the HTML <div> for Katacoda from the in-page button to
trigger it.
pull/29205/head
Tim Bannister 2021-08-03 14:31:38 +01:00
parent 756c2fd8bc
commit e3b6ab9579
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,6 @@
{{ if .HasShortcode "kat-button" }}
<div id="katacoda-environment" data-katacoda-ondemand="true" data-katacoda-port="30000" data-katacoda-env="minikube" data-katacoda-command="start.sh" data-katacoda-ui="panel"></div>
{{ end }}
{{ with .Site.Params.algolia_docsearch }}
<!-- scripts for algolia docsearch -->
{{ end }}

View File

@ -1,3 +1,2 @@
<div id="my-panel" data-katacoda-ondemand="true" data-katacoda-port="30000" data-katacoda-env="minikube" data-katacoda-command="start.sh" data-katacoda-ui="panel"></div>
<script src="https://katacoda.com/embed.js"></script>
<script defer src="https://katacoda.com/embed.js"></script>
<button class="button" onclick="window.katacoda.init(); ">Launch Terminal</button>