diff --git a/handler/app/web.go b/handler/app/web.go index ef691d72..9a5f75d2 100644 --- a/handler/app/web.go +++ b/handler/app/web.go @@ -511,6 +511,7 @@ func artifactTmpls(lock bool, files ...string) []string { } return append(files, GlobTo("artifact_editor.tmpl"), + GlobTo("artifact_editorHtmx.tmpl"), GlobTo("artifact_editor_table.tmpl"), GlobTo("artifact_table_switch.tmpl")) } diff --git a/view/app/artifact.tmpl b/view/app/artifact.tmpl index 3d3583cf..1598ebaf 100644 --- a/view/app/artifact.tmpl +++ b/view/app/artifact.tmpl @@ -74,4 +74,5 @@ {{- template "artifactJSDOS6" . }} {{- template "artifactEditor" . }} +{{- template "artifactEditorHtmx" . }} {{- end}} \ No newline at end of file diff --git a/view/app/artifact_editorHtmx.tmpl b/view/app/artifact_editorHtmx.tmpl new file mode 100644 index 00000000..73e9d849 --- /dev/null +++ b/view/app/artifact_editorHtmx.tmpl @@ -0,0 +1,472 @@ +{{- /* artifact_editorHtmx.tmpl */}} +{{- define "artifactEditorHtmx" -}} +{{- if eq false (index . "editor")}}{{/* render nothing */}}{{else}} +{{- $faSize := "fa-fw fa-2x" -}} +{{- $id := index . "modID"}} +{{- $previewImg := recordImgSample (index . "uuid")}} +{{- $thumbImg := recordThumbSample (index . "uuid")}} +{{- $replace := "refresh the page to see the changes"}} +{{- $delay := "500ms" }} +{{- /* Artifact metadata editor */}} +
+{{- end}} +{{- end}} \ No newline at end of file diff --git a/view/app/artifact_editor_null.tmpl b/view/app/artifact_editor_null.tmpl index b5573308..6dc32504 100644 --- a/view/app/artifact_editor_null.tmpl +++ b/view/app/artifact_editor_null.tmpl @@ -1,2 +1,3 @@ {{- /* artifact_editor_null.tmpl */}} -{{- define "artifactEditor" }}{{end}} \ No newline at end of file +{{- define "artifactEditor" }}{{end}} +{{- define "artifactEditorHtmx" . }}{{end}} \ No newline at end of file diff --git a/view/app/artifact_editor_table.tmpl b/view/app/artifact_editor_table.tmpl index 5b7d7f47..dcd5e179 100644 --- a/view/app/artifact_editor_table.tmpl +++ b/view/app/artifact_editor_table.tmpl @@ -2,6 +2,7 @@ {{- define "artifactTableEditor" }} {{- if eq true (index . "editor")}} diff --git a/view/app/layout_editor.tmpl b/view/app/layout_editor.tmpl index 0d419d96..b0ed8ebb 100644 --- a/view/app/layout_editor.tmpl +++ b/view/app/layout_editor.tmpl @@ -1,28 +1,24 @@ {{- /* layout_editor.tmpl */}} {{- define "layoutEditor" }} -{{- if eq true (index . "editor")}} - -{{- end}} +{{- if eq false (index . "editor")}}{{/* render nothing */}}{{end}} +