mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
revel skeleton
This commit is contained in:
11
app/controllers/app.go
Normal file
11
app/controllers/app.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package controllers
|
||||
|
||||
import "github.com/robfig/revel"
|
||||
|
||||
type Application struct {
|
||||
*rev.Controller
|
||||
}
|
||||
|
||||
func (c Application) Index() rev.Result {
|
||||
return c.Render()
|
||||
}
|
||||
7
app/views/Application/Index.html
Normal file
7
app/views/Application/Index.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{set "title" "Home" .}}
|
||||
{{template "header.html" .}}
|
||||
|
||||
<h1>Your Application Is Ready</h1>
|
||||
|
||||
{{template "footer.html" .}}
|
||||
|
||||
20
app/views/errors/404.html
Normal file
20
app/views/errors/404.html
Normal file
@@ -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>
|
||||
16
app/views/errors/500.html
Normal file
16
app/views/errors/500.html
Normal file
@@ -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>
|
||||
2
app/views/footer.html
Normal file
2
app/views/footer.html
Normal file
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
||||
17
app/views/header.html
Normal file
17
app/views/header.html
Normal file
@@ -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" media="screen" href="/public/stylesheets/main.css">
|
||||
<link rel="shortcut icon" type="image/png" href="/public/images/favicon.png">
|
||||
<script src="/public/javascripts/jquery-1.5.2.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>
|
||||
22
conf/app.conf
Normal file
22
conf/app.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
app.name=inbucket
|
||||
app.secret=bPlNFGdSC2wd8f2QnFhk5A84JJjKWZdKH9H2FHFuvUs9Jz8UvBHv3Vc5awx39ivu
|
||||
http.addr=
|
||||
http.port=9000
|
||||
|
||||
[dev]
|
||||
results.pretty=true
|
||||
server.watcher=true
|
||||
|
||||
log.trace.output = off
|
||||
log.info.output = stderr
|
||||
log.warn.output = stderr
|
||||
log.error.output = stderr
|
||||
|
||||
[prod]
|
||||
results.pretty=false
|
||||
server.watcher=false
|
||||
|
||||
log.trace.output = off
|
||||
log.info.output = off
|
||||
log.warn.output = %(app.name)s.log
|
||||
log.error.output = %(app.name)s.log
|
||||
14
conf/routes
Normal file
14
conf/routes
Normal file
@@ -0,0 +1,14 @@
|
||||
# Routes
|
||||
# This file defines all application routes (Higher priority routes first)
|
||||
# ~~~~
|
||||
|
||||
GET / Application.Index
|
||||
|
||||
# Ignore favicon requests
|
||||
GET /favicon.ico 404
|
||||
|
||||
# Map static resources from the /app/public folder to the /public path
|
||||
GET /public/ staticDir:public
|
||||
|
||||
# Catch all
|
||||
* /{controller}/{action} {controller}.{action}
|
||||
BIN
public/images/favicon.png
Normal file
BIN
public/images/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
16
public/js/jquery-1.5.2.min.js
vendored
Normal file
16
public/js/jquery-1.5.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user