diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/App/Index.html | 23 | ||||
| -rw-r--r-- | app/views/debug.html | 64 | ||||
| -rw-r--r-- | app/views/errors/404.html | 20 | ||||
| -rw-r--r-- | app/views/errors/500.html | 16 | ||||
| -rw-r--r-- | app/views/flash.html | 18 | ||||
| -rw-r--r-- | app/views/footer.html | 5 | ||||
| -rw-r--r-- | app/views/header.html | 17 |
7 files changed, 163 insertions, 0 deletions
diff --git a/app/views/App/Index.html b/app/views/App/Index.html new file mode 100644 index 0000000..deb2304 --- /dev/null +++ b/app/views/App/Index.html @@ -0,0 +1,23 @@ +{{set . "title" "Home"}} +{{template "header.html" .}} + +<header class="hero-unit" style="background-color:#A9F16C"> + <div class="container"> + <div class="row"> + <div class="hero-text"> + <h1>It works!</h1> + <p></p> + </div> + </div> + </div> +</header> + +<div class="container"> + <div class="row"> + <div class="span6"> + {{template "flash.html" .}} + </div> + </div> +</div> + +{{template "footer.html" .}} diff --git a/app/views/debug.html b/app/views/debug.html new file mode 100644 index 0000000..f3975b7 --- /dev/null +++ b/app/views/debug.html @@ -0,0 +1,64 @@ +<style type="text/css"> + #sidebar { + position: absolute; + right: 0px; + top:69px; + max-width: 75%; + z-index: 1000; + background-color: #fee; + border: thin solid grey; + padding: 10px; + } + #toggleSidebar { + position: absolute; + right: 0px; + top: 50px; + background-color: #fee; + } + +</style> +<div id="sidebar" style="display:none;"> + <h4>Available pipelines</h4> + <dl> + {{ range $index, $value := .}} + <dt>{{$index}}</dt> + <dd>{{$value}}</dd> + {{end}} + </dl> + <h4>Flash</h4> + <dl> + {{ range $index, $value := .flash}} + <dt>{{$index}}</dt> + <dd>{{$value}}</dd> + {{end}} + </dl> + + <h4>Errors</h4> + <dl> + {{ range $index, $value := .errors}} + <dt>{{$index}}</dt> + <dd>{{$value}}</dd> + {{end}} + </dl> +</div> +<a id="toggleSidebar" href="#" class="toggles"><i class="icon-chevron-left"></i></a> + +<script> + $sidebar = 0; + $('#toggleSidebar').click(function() { + if ($sidebar === 1) { + $('#sidebar').hide(); + $('#toggleSidebar i').addClass('icon-chevron-left'); + $('#toggleSidebar i').removeClass('icon-chevron-right'); + $sidebar = 0; + } + else { + $('#sidebar').show(); + $('#toggleSidebar i').addClass('icon-chevron-right'); + $('#toggleSidebar i').removeClass('icon-chevron-left'); + $sidebar = 1; + } + + return false; + }); +</script> diff --git a/app/views/errors/404.html b/app/views/errors/404.html new file mode 100644 index 0000000..ebdfe10 --- /dev/null +++ b/app/views/errors/404.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Not found</title> + </head> + <body> +{{if eq .RunMode "dev"}} +{{template "errors/404-dev.html" .}} +{{else}} + {{with .Error}} + <h1> + {{.Title}} + </h1> + <p> + {{.Description}} + </p> + {{end}} +{{end}} + </body> +</html> diff --git a/app/views/errors/500.html b/app/views/errors/500.html new file mode 100644 index 0000000..0cef4de --- /dev/null +++ b/app/views/errors/500.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + <head> + <title>Application error</title> + </head> + <body> + {{if eq .RunMode "dev"}} + {{template "errors/500-dev.html" .}} + {{else}} + <h1>Oops, an error occured</h1> + <p> + This exception has been logged. + </p> + {{end}} + </body> +</html> diff --git a/app/views/flash.html b/app/views/flash.html new file mode 100644 index 0000000..9c9ade9 --- /dev/null +++ b/app/views/flash.html @@ -0,0 +1,18 @@ +{{if .flash.success}} +<div class="alert alert-success"> + {{.flash.success}} +</div> +{{end}} + +{{if or .errors .flash.error}} +<div class="alert alert-error"> + {{if .flash.error}} + {{.flash.error}} + {{end}} + <ul style="margin-top:10px;"> + {{range .errors}} + <li>{{.}}</li> + {{end}} + </ul> +</div> +{{end}} diff --git a/app/views/footer.html b/app/views/footer.html new file mode 100644 index 0000000..8db95e5 --- /dev/null +++ b/app/views/footer.html @@ -0,0 +1,5 @@ + {{if eq .RunMode "dev"}} + {{template "debug.html" .}} + {{end}} + </body> +</html> diff --git a/app/views/header.html b/app/views/header.html new file mode 100644 index 0000000..01637f4 --- /dev/null +++ b/app/views/header.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> + +<html> + <head> + <title>{{.title}}</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.css"> + <link rel="shortcut icon" type="image/png" href="/public/img/favicon.png"> + <script src="/public/js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script> + {{range .moreStyles}} + <link rel="stylesheet" type="text/css" href="/public/{{.}}"> + {{end}} + {{range .moreScripts}} + <script src="/public/{{.}}" type="text/javascript" charset="utf-8"></script> + {{end}} + </head> + <body> |
