-
\ No newline at end of file
+
+{{- end -}}
+{{- template "index" . -}}
\ No newline at end of file
diff --git a/dict/templates/definition.html b/dict/templates/partials/definition.html
similarity index 100%
rename from dict/templates/definition.html
rename to dict/templates/partials/definition.html
diff --git a/dict/templates/partials/entry.html b/dict/templates/partials/entry.html
new file mode 100644
index 0000000..9d74569
--- /dev/null
+++ b/dict/templates/partials/entry.html
@@ -0,0 +1,23 @@
+{{ define "entry" }}
+
+ {{- else if ne $count 0 -}}
+
+ {{- range .Definitions }}
+
+ {{ template "definition" . }}
+
+ {{- end }}
+
+ {{- end }}
+
+{{ end }}
\ No newline at end of file
diff --git a/dict/templates/partials/entryfull.html b/dict/templates/partials/entryfull.html
new file mode 100644
index 0000000..8488cbc
--- /dev/null
+++ b/dict/templates/partials/entryfull.html
@@ -0,0 +1,23 @@
+{{ define "entryfull" }}
+
+ {{- else if ne $count 0 -}}
+
+ {{- range .Definitions }}
+
+ {{ template "definition" . }}
+
+ {{- end }}
+
+ {{- end }}
+
+{{ end }}
\ No newline at end of file
diff --git a/dict/templates/partials/search.html b/dict/templates/partials/search.html
new file mode 100644
index 0000000..2c6b809
--- /dev/null
+++ b/dict/templates/partials/search.html
@@ -0,0 +1,11 @@
+{{- define "search" -}}
+
{{ if .Truncated }}Truncated results, showing first {{ .Count }}{{ else }}{{ if eq .Count 0 }}No results{{ else }}{{ .Count }} result{{ if ne .Count 1}}s{{ end }}{{ end }}{{ end }}.
+{{ range .ExactResults -}}
+{{- template "entry" . -}}
+{{- end }}
+{{ if and (ne (len .ExactResults) 0) (ne (len .OtherResults) 0) }}{{ end }}
+{{ range .OtherResults -}}
+{{ template "entry" . }}
+{{- end -}}
+{{- end -}}
+{{- template "search" . -}}
\ No newline at end of file
diff --git a/dict/templates/partials/sitetitle.html b/dict/templates/partials/sitetitle.html
new file mode 100644
index 0000000..67e6c0a
--- /dev/null
+++ b/dict/templates/partials/sitetitle.html
@@ -0,0 +1 @@
+{{ define "sitetitle" }}jidict{{ end }}
\ No newline at end of file
diff --git a/dict/templates/search.html b/dict/templates/search.html
index 94524e4..ffa8680 100644
--- a/dict/templates/search.html
+++ b/dict/templates/search.html
@@ -1,11 +1,9 @@
-{{- define "search" -}}
-
{{ if .Truncated }}Truncated results, showing first {{ .Count }}{{ else }}{{ if eq .Count 0 }}No results{{ else }}{{ .Count }} result{{ if ne .Count 1}}s{{ end }}{{ end }}{{ end }}.
-{{ range .ExactResults -}}
-{{- template "word" . -}}
-{{- end }}
-{{ if and (ne (len .ExactResults) 0) (ne (len .OtherResults) 0) }}{{ end }}
-{{ range .OtherResults -}}
-{{ template "word" . }}
+{{- define "title" }}{{ .Query }} search - {{ template "sitetitle" . }}{{- end -}}
+
+{{- define "value" }}{{ .Query }}{{- end -}}
+
+{{- define "results" -}}
+{{- template "entryfull" .Entry -}}
{{- end -}}
-{{- end -}}
-{{- template "search" . -}}
\ No newline at end of file
+
+{{- template "index" . -}}
\ No newline at end of file
diff --git a/dict/templates/word.html b/dict/templates/word.html
index 40d56f8..245c10b 100644
--- a/dict/templates/word.html
+++ b/dict/templates/word.html
@@ -1,22 +1,5 @@
-{{ define "word" }}
-