fix for feature state shortcode
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
|
||||
<a href="#" id="feature-state-dialog-link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>{{ .page.Title }}</a>
|
||||
<div id="feature-state-dialog" class="ui-dialog-content" title="{{ .page.Title }}">
|
||||
{{ .page.Content | markdownify }}
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$( "#feature-state-dialog" ).dialog({
|
||||
autoOpen: false,
|
||||
width: {{ .width | default "600" }},
|
||||
buttons: [
|
||||
{
|
||||
text: "Ok",
|
||||
click: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Link to open the dialog
|
||||
$( "#feature-state-dialog-link" ).click(function( event ) {
|
||||
$( "#feature-state-dialog" ).dialog( "open" );
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -1,21 +0,0 @@
|
||||
<div style="margin-top: 10px; margin-bottom: 10px;">
|
||||
{{ $for_k8s_version := .for_k8s_version | default (.page.Param "version") }}
|
||||
{{ $width := .width | default "600" }}
|
||||
{{ $state := .state }}
|
||||
<b>FEATURE STATE:</b> <code>Kubernetes {{ $for_k8s_version }}</code>
|
||||
{{/* docs/templates is a Hugo page bundle */}}
|
||||
{{ $templates_path := "docs/templates" }}
|
||||
{{ $templates := site.GetPage "page" $templates_path }}
|
||||
{{ with $templates.Resources }}
|
||||
{{ $template_path := printf "**feature-state-%s*" $state }}
|
||||
{{ $content_template := .GetMatch $template_path }}
|
||||
{{ with $content_template }}
|
||||
{{ $dialog := dict "page" $content_template "for_k8s_version" $for_k8s_version "width" $width }}
|
||||
{{ partial "templates/feature-dialog.html" $dialog }}
|
||||
{{ else }}
|
||||
{{ errorf "[%s] template not found in %s" site.Language.Lang $template_path }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "[%s] templates not found in docs/templates" site.Language.Lang }}
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user