From 8ffbdf73058c76149cf831e52025187561300b10 Mon Sep 17 00:00:00 2001 From: Thibaut Rousseau Date: Sat, 1 Apr 2017 22:34:29 +0200 Subject: [PATCH] style: Fix indentation of the theme --- default.go | 218 +++++++++++++++++++++++++++-------------------------- hermes.go | 2 +- 2 files changed, 112 insertions(+), 108 deletions(-) diff --git a/default.go b/default.go index e6e4218..9208cab 100644 --- a/default.go +++ b/default.go @@ -227,6 +227,7 @@ func (dt *Default) HTMLTemplate() string { + @@ -235,121 +236,124 @@ func (dt *Default) HTMLTemplate() string {

{{if .Email.Body.Title }}{{ .Email.Body.Title }}{{ else }}{{ .Email.Body.Greeting }} {{ .Email.Body.Name }},{{ end }}

- {{ with .Email.Body.Intros }} - {{ if gt (len .) 0 }} - {{ range $line := . }} -

{{ $line }}

- {{ end }} - {{ end }} - {{ end }} + {{ with .Email.Body.Intros }} + {{ if gt (len .) 0 }} + {{ range $line := . }} +

{{ $line }}

+ {{ end }} + {{ end }} + {{ end }} - {{ with .Email.Body.Dictionary }} - {{ if gt (len .) 0 }} -
- {{ range $entry := . }} -
{{ $entry.Key }}:
-
{{ $entry.Value }}
- {{ end }} -
- {{ end }} - {{ end }} + {{ with .Email.Body.Dictionary }} + {{ if gt (len .) 0 }} +
+ {{ range $entry := . }} +
{{ $entry.Key }}:
+
{{ $entry.Value }}
+ {{ end }} +
+ {{ end }} + {{ end }} - - {{ with .Email.Body.Table }} - {{ $data := .Data }} - {{ $columns := .Columns }} - {{ if gt (len $data) 0 }} - - - - -
- + + {{ with .Email.Body.Table }} + {{ $data := .Data }} + {{ $columns := .Columns }} + {{ if gt (len $data) 0 }} +
+ + + +
+ + + {{ $col := index $data 0 }} + {{ range $entry := $col }} + + {{ end }} + + {{ range $row := $data }} + + {{ range $cell := $row }} + + {{ end }} + + {{ end }} +
+

{{ $entry.Key }}

+
+ {{ $cell.Value }} +
+
+ {{ end }} + {{ end }} + + + {{ with .Email.Body.Actions }} + {{ if gt (len .) 0 }} + {{ range $action := . }} +

{{ $action.Instructions }}

+ - {{ $col := index $data 0 }} - {{ range $entry := $col }} - - {{ end }} + - {{ range $row := $data }} - - {{ range $cell := $row }} - - {{ end }} - - {{ end }}
-

{{ $entry.Key }}

-
+ +
- {{ $cell.Value }} -
-
- {{ end }} - {{ end }} + {{ end }} + {{ end }} + {{ end }} - - {{ with .Email.Body.Actions }} - {{ if gt (len .) 0 }} - {{ range $action := . }} -

{{ $action.Instructions }}

- - - - -
- -
- {{ end }} - {{ end }} - {{ end }} + {{ with .Email.Body.Outros }} + {{ if gt (len .) 0 }} + {{ range $line := . }} +

{{ $line }}

+ {{ end }} + {{ end }} + {{ end }} - {{ with .Email.Body.Outros }} - {{ if gt (len .) 0 }} - {{ range $line := . }} -

{{ $line }}

- {{ end }} - {{ end }} - {{ end }} +

+ {{.Email.Body.Signature}}, +
+ {{.Hermes.Product.Name}} +

-

- {{.Email.Body.Signature}}, -
- {{.Hermes.Product.Name}} -

- - {{ with .Email.Body.Actions }} - - - {{ range $action := . }} - - {{ end }} - - -
-

If you’re having trouble with the button '{{ $action.Button.Text }}', copy and paste the URL below into your web browser.

-

{{ $action.Button.Link }}

-
- {{ end }} + {{ with .Email.Body.Actions }} + + + + {{ range $action := . }} + + {{ end }} + + +
+

If you’re having trouble with the button '{{ $action.Button.Text }}', copy and paste the URL below into your web browser.

+

{{ $action.Button.Link }}

+
+ {{ end }} diff --git a/hermes.go b/hermes.go index 49cad10..374ca20 100644 --- a/hermes.go +++ b/hermes.go @@ -124,7 +124,7 @@ func setDefaultHermesValues(h *Hermes) error { Copyright: "Copyright © 2017 Hermes. All rights reserved.", }, } - // Merge the given hermes engine coniguration with default one + // Merge the given hermes engine configuration with default one // Default one overrides all zero values err := mergo.Merge(h, defaultHermes) if err != nil {