diff --git a/_embed/templates/editor.tmpl b/_embed/templates/editor.tmpl index d54ddd58..4ab6bcd8 100644 --- a/_embed/templates/editor.tmpl +++ b/_embed/templates/editor.tmpl @@ -1,34 +1,33 @@ {{ define "content" }} {{ with .Data }}
-
-{{ if or (eq .Class "frontmatter-only") (eq .Class "complete") }} -
-{{ template "blocks" .FrontMatter }} -
Add field
-
-{{ end }} + + {{- if or (eq .Class "frontmatter-only") (eq .Class "complete") }} +
+ {{- template "blocks" .FrontMatter }} +
Add field
+
+ {{- end }} -{{ if or (eq .Class "content-only") (eq .Class "complete") }} + {{ if or (eq .Class "content-only") (eq .Class "complete") }} + {{ if (eq .Class "complete")}} +

Body

+ {{ end }} +
+
+ +
+ {{ end }} -{{ if (eq .Class "complete")}} -

Body

-{{ end }} -
-
- -
-{{ end }} - -
- -
-
+
+ +
+
{{ end }} diff --git a/_embed/templates/frontmatter.tmpl b/_embed/templates/frontmatter.tmpl index 2eba94a1..3f7fe91d 100644 --- a/_embed/templates/frontmatter.tmpl +++ b/_embed/templates/frontmatter.tmpl @@ -1,60 +1,56 @@ {{ define "blocks" }} - {{ if .Fields }} -
- {{ end }} - {{ range $key, $value := .Fields }} - {{ if eq $value.Parent.Type "array" }} -
- {{ template "value" $value }} -
- close -
-
- {{ else }} -
- - {{ template "value" $value }} -
- close -
-
- {{ end }} - {{ end }} - {{ if .Fields }} -
- {{ end }} +{{ if .Fields }}
{{ end }} +{{- range $key, $value := .Fields }} + {{- if eq $value.Parent.Type "array" }} +
+ {{- template "value" $value }} +
+ close +
+
+ {{- else }} +
+ + {{ template "value" $value }} +
+ close +
+
+ {{- end }} +{{- end }} +{{- if .Fields }}
{{ end }} - {{ range $key, $value := .Arrays }} - {{ template "fielset" $value }} - {{ end }} +{{- range $key, $value := .Arrays }} +{{- template "fielset" $value }} +{{- end }} - {{ range $key, $value := .Objects }} - {{ template "fielset" $value }} - {{ end }} +{{- range $key, $value := .Objects }} +{{- template "fielset" $value }} +{{- end }} {{ end }} {{ define "value" }} - {{ if eq .HTMLType "textarea" }} - - {{ else if eq .HTMLType "datetime" }} - - {{ else }} - - {{ end }} +{{- if eq .HTMLType "textarea" }} + +{{- else if eq .HTMLType "datetime" }} + +{{- else }} + +{{- end }} {{ end }} {{ define "fielset" }} -
- {{ if not (eq .Title "") }} -

{{ .Title }}

- {{ end }} -
- add -
-
- close -
- {{ template "blocks" .Content }} -
+
+ {{- if not (eq .Title "") }} +

{{ .Title }}

+ {{- end }} +
+ add +
+
+ close +
+ {{- template "blocks" .Content }} +
{{ end }}