-
-
-
-
- {{ CoreApp.ServicesCount }}
- Total Services
-
-
-
- {{ CoreApp.Count24HFailures }}
- Failures last 24 Hours
-
-
-
- {{ CoreApp.CountOnline }}
- Online Services
-
-
-
-
-
-
-
-
Services
-
-
- {{ range Services }}
-
-
-
{{.Name}}
- {{if .Online}} ONLINE {{else}} OFFLINE {{end}}
-
- {{.SmallText}}
-
- {{ end }}
+
+
+ {{ CoreApp.ServicesCount }}
+ Total Services
+
+
+ {{ CoreApp.Count24HFailures }}
+ Failures last 24 Hours
+
+
+ {{ CoreApp.CountOnline }}
+ Online Services
+
+
+
+
+
Services
+
+
+ {{ range Services }}
+ {{ if .LimitedFailures }}
+
{{.Name}} Failures
+
+ {{ end }}
+ {{ end }}
+
+
-
- {{ range Services }}
- {{ if .LimitedFailures }}
-
{{.Name}} Failures
-
- {{ end }}
- {{ end }}
-
-
-
-
-{{template "footer"}}
-
-{{if USE_CDN}}
-
-
-
-{{ else }}
-
-
-
{{end}}
-
-
-
diff --git a/source/tmpl/error_404.html b/source/tmpl/error_404.html
index 0ead8898..86b90624 100644
--- a/source/tmpl/error_404.html
+++ b/source/tmpl/error_404.html
@@ -1,44 +1,10 @@
-
-
-
-
-
-{{if USE_CDN}}
-
-
-{{ else }}
-
-
-{{end}}
-
-
Statup | Page Not Found
-
-
-
-
+{{define "title"}}Statup Page Not Found{{end}}
+{{define "content"}}
-
-
-
- Sorry, this page doesn't seem to exist.
+
+ Sorry, this page doesn't seem to exist.
+
-
-
-
-
-{{template "footer"}}
-
-{{if USE_CDN}}
-
-
-
-{{ else }}
-
-
-
{{end}}
-
-
-
\ No newline at end of file
diff --git a/source/tmpl/footer.html b/source/tmpl/footer.html
index 95056d1b..e93201d2 100644
--- a/source/tmpl/footer.html
+++ b/source/tmpl/footer.html
@@ -1,9 +1,9 @@
{{ define "footer"}}
-
+
{{ end }}
diff --git a/source/tmpl/form_notifier.html b/source/tmpl/form_notifier.html
new file mode 100644
index 00000000..9daf56f0
--- /dev/null
+++ b/source/tmpl/form_notifier.html
@@ -0,0 +1,65 @@
+{{define "form_notifier"}}
+{{$n := .Select}}
+
+{{end}}
diff --git a/source/tmpl/form_service.html b/source/tmpl/form_service.html
new file mode 100644
index 00000000..a268e1a6
--- /dev/null
+++ b/source/tmpl/form_service.html
@@ -0,0 +1,93 @@
+{{define "form_service"}}
+{{$url := "/service"}}
+{{if .}}
+ {{$url = "/service/{{.Id}}"}}
+{{end}}
+
+{{end}}
diff --git a/source/tmpl/form_user.html b/source/tmpl/form_user.html
new file mode 100644
index 00000000..e96ad8ca
--- /dev/null
+++ b/source/tmpl/form_user.html
@@ -0,0 +1,43 @@
+{{define "form_user"}}
+{{$url := "/user"}}
+{{if .}}
+ {{$url = "/user/{{.Id}}"}}
+{{end}}
+
+
+
+
+
+
+
+{{end}}
diff --git a/source/tmpl/head.html b/source/tmpl/head.html
new file mode 100644
index 00000000..477f36b0
--- /dev/null
+++ b/source/tmpl/head.html
@@ -0,0 +1,17 @@
+{{ define "head"}}
+
+
+
+{{if USE_CDN}}
+
+
+
+{{ else }}
+
+
+
+{{end}}
+{{block "extra_css" .}} {{end}}
+
{{block "title" .}} {{end}}
+
+{{end}}
diff --git a/source/tmpl/help.html b/source/tmpl/help.html
index c2058256..5b4510fa 100644
--- a/source/tmpl/help.html
+++ b/source/tmpl/help.html
@@ -1,31 +1,15 @@
-
-
-
-
-
-{{if USE_CDN}}
-
-
-{{ else }}
-
-
-{{end}}
-
Statup | Help
-
-
-
+{{define "title"}}Statup | Help{{end}}
+{{define "content"}}
-
{{if Auth}}
{{template "nav"}}
{{end}}
-
-
- {{ safe . }}
-
-
+
+ {{ safe . }}
+
-
+{{end}}
+{{define "extra_css"}}
-
-{{template "footer"}}
-
-{{if USE_CDN}}
-
-
-
-{{ else }}
-
-
-
{{end}}
-
-
-
diff --git a/source/tmpl/index.html b/source/tmpl/index.html
index 88ea3224..a8ba2649 100644
--- a/source/tmpl/index.html
+++ b/source/tmpl/index.html
@@ -1,29 +1,11 @@
-
-
-
-
-
- {{if USE_CDN}}
-
-
-
- {{ else }}
-
-
-
- {{end}}
-
-
{{.Name}} Status
-
-
-
+{{define "title"}}{{CoreApp.Name}} Status{{end}}
+{{define "content"}}
-
- {{ if .Description }}
-
- {{ end }}
+{{ if .Description }}
+
+{{ end }}
-
-
+
{{ if not Services }}
No Services to Monitor!
@@ -50,79 +31,58 @@
If this is a bug, please make an issue in the Statup Github Repo. Statup Github Repo
{{end}}
- {{ range Services }}
-
-
-
-
-
{{ .Name }}
- {{if .Online}}
- ONLINE
- {{ else }}
- OFFLINE
- {{end}}
+{{ range Services }}
+
+
+
+
+
{{ .Name }}
+ {{if .Online}}
+ ONLINE
+ {{ else }}
+ OFFLINE
+ {{end}}
-
-
- {{.Online24}}%
- Online last 24 Hours
-
-
- {{.AvgTime}}ms
- Average Response
-
-
- {{.AvgUptime24}}%
- Uptime last 24 Hours
-
+
+
+ {{.Online24}}%
+ Online last 24 Hours
+
+ {{.AvgTime}}ms
+ Average Response
+
+
+ {{.AvgUptime24}}%
+ Uptime last 24 Hours
+
+
-
-
- {{ if .AvgUptime24 }}
-
-
-
- {{ end }}
-
+ {{ if .AvgUptime24 }}
+
+
+
{{ end }}
+
+
-
-
-{{template "footer"}}
-
-{{if USE_CDN}}
-
-
-
-
-{{ else }}
-
-
-
-
-{{end}}
-
-{{ if .Style }}
-
{{ end }}
-
+
+
+{{end}}
+{{define "extra_scripts"}}
-
-
-
+{{end}}
diff --git a/source/tmpl/login.html b/source/tmpl/login.html
index 5fea4b59..9db0ed79 100644
--- a/source/tmpl/login.html
+++ b/source/tmpl/login.html
@@ -1,69 +1,34 @@
-
-
-
-
-
-{{if USE_CDN}}
-
-
-{{ else }}
-
-
-{{end}}
-
Statup | Login
-
-
-
-
+{{define "title"}}Statup Login{{end}}
+{{define "content"}}
-
-
-
-
-
-
-
- {{ if .Error }}
-
- Incorrect login information submitted, try again.
-
- {{ end }}
-
-
-
-
-
-
-
+
+
+
-
+ {{ if .Error }}
+
+ Incorrect login information submitted, try again.
+
+ {{ end }}
+
+
+
+
+
+
-
-{{template "footer"}}
-
-{{if USE_CDN}}
-
-
-
-{{ else }}
-
-
-
{{end}}
-
-
-
\ No newline at end of file
diff --git a/source/tmpl/logs.html b/source/tmpl/logs.html
index e9b1640d..94c2b6f2 100644
--- a/source/tmpl/logs.html
+++ b/source/tmpl/logs.html
@@ -1,45 +1,15 @@
-
-
-
-
-
-{{if USE_CDN}}
-
-
-{{ else }}
-
-
-{{end}}
-
Statup | Logs
-
-
-
+{{define "title"}}Statup | Logs{{end}}
+{{define "content"}}
-
{{if Auth}}
{{template "nav"}}
{{end}}
-
-
-
- {{range .}}{{.}}{{end}}
-
-
-
+
+ {{range .}}{{.}}{{end}}
+
-
-{{template "footer"}}
-
-{{if USE_CDN}}
-
-
-
-{{ else }}
-
-
-
{{end}}
-
+{{define "extra_css"}}
-
-
-
\ No newline at end of file
+{{end}}
diff --git a/source/tmpl/scripts.html b/source/tmpl/scripts.html
new file mode 100644
index 00000000..d198df88
--- /dev/null
+++ b/source/tmpl/scripts.html
@@ -0,0 +1,14 @@
+{{define "scripts"}}
+{{if USE_CDN}}
+
+
+
+
+{{ else }}
+
+
+
+
+{{end}}
+{{block "extra_scripts" .}} {{end}}
+{{end}}
diff --git a/source/tmpl/service.html b/source/tmpl/service.html
index 58de3f60..4adc134e 100644
--- a/source/tmpl/service.html
+++ b/source/tmpl/service.html
@@ -1,22 +1,6 @@
+{{define "title"}}{{.Service.Name}} Status{{end}}
+{{ define "content" }}
{{$s := .Service}}
-
-
-
-
-
-{{if USE_CDN}}
-
-
-
-{{ else }}
-
-
-
-{{end}}
-
-
Statup | {{$s.Name}} Service
-
-
@@ -24,228 +8,130 @@
{{template "nav"}}
{{end}}
-
+
- {{if $s.Online }}
-
ONLINE
- {{ else }}
-
OFFLINE
- {{end}}
+ {{if $s.Online }}
+
ONLINE
+ {{ else }}
+
OFFLINE
+ {{end}}
-
{{ $s.Name }}
- {{if $s.Online }}
- ONLINE
- {{ else }}
- OFFLINE
- {{end}}
+
{{ $s.Name }}
+ {{if $s.Online }}
+ ONLINE
+ {{ else }}
+ OFFLINE
+ {{end}}
-
-
-
- {{$s.Online24}}%
- Online last 24 Hours
-
-
-
- {{$s.AvgTime}}ms
- Average Response
-
-
-
- {{$s.TotalUptime}}%
- Total Uptime
-
-
-
-
-
-
-
-
- {{FromUnix .Start}}
- {{FromUnix .End}}
-
-
- Set Timeframe
-
-
-
-
- {{if not $s.Online}}
-
{{$s.DowntimeText}}
- {{end}}
-
- {{ if $s.LimitedFailures }}
-
- {{ end }}
+
+
+ {{$s.Online24}}%
+ Online last 24 Hours
+
+ {{$s.AvgTime}}ms
+ Average Response
+
+
+
+ {{$s.TotalUptime}}%
+ Total Uptime
+
+
+
+
+
+
+
+
+ {{FromUnix .Start}}
+ {{FromUnix .End}}
+
+
+ Set Timeframe
+
+
+
+
+ {{if not $s.Online}}
+
{{$s.DowntimeText}}
+ {{end}}
+
+ {{ if $s.LimitedFailures }}
+
+ {{ end }}
+
+
{{if Auth}}
-
+
-
Edit Service
+
Edit Service
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {{template "form_service" $s}}
-
+
-
-
Last Response
-
{{ $s.LastResponse }}
-