Skip to content

Commit 5efe3e7

Browse files
committed
Initial commit with basic layout.
0 parents  commit 5efe3e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+22809
-0
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.swp
2+
3+
test-results/
4+
tmp/
5+
routes/
6+
public/node_modules
7+
public/dist

app/controllers/app.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package controllers
2+
3+
import "github.com/robfig/revel"
4+
5+
type App struct {
6+
*revel.Controller
7+
}
8+
9+
func (c App) Index() revel.Result {
10+
return c.RenderTemplate("index.html")
11+
}

app/init.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package app
2+
3+
import "github.com/robfig/revel"
4+
5+
func init() {
6+
// Filters is the default set of global filters.
7+
revel.Filters = []revel.Filter{
8+
revel.PanicFilter, // Recover from panics and display an error page instead.
9+
revel.RouterFilter, // Use the routing table to select the right Action
10+
revel.FilterConfiguringFilter, // A hook for adding or removing per-Action filters.
11+
revel.ParamsFilter, // Parse parameters into Controller.Params.
12+
revel.SessionFilter, // Restore and write the session cookie.
13+
revel.FlashFilter, // Restore and write the flash cookie.
14+
revel.ValidationFilter, // Restore kept validation errors and save new ones from cookie.
15+
revel.I18nFilter, // Resolve the requested language
16+
revel.InterceptorFilter, // Run interceptors around the action.
17+
revel.ActionInvoker, // Invoke the action.
18+
}
19+
}

app/views/footer.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<footer>
2+
<ul class="footer-links">
3+
<li>MIT License</li>
4+
<li class="muted">&middot;</li>
5+
<li>Powered by <a href="http://robfig.github.io/revel/" target="_blank">Revel</a></li>
6+
<li class="muted">&middot;</li>
7+
<li><a href="http://memcached.org" target="_blank">Memcached.org</a></li>
8+
<li class="muted">&middot;</li>
9+
<li><a href="http://github.com/codeb2cc/gmcadmin" target="_blank">Github</a></li>
10+
</ul>
11+
</footer>

app/views/header.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="navbar navbar-inverse navbar-fixed-top">
2+
<div class="container">
3+
<div class="navbar-header">
4+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
5+
<span class="icon-bar"></span>
6+
<span class="icon-bar"></span>
7+
<span class="icon-bar"></span>
8+
</button>
9+
<a class="navbar-brand" href="/">Go Memcached Admin</a>
10+
</div>
11+
<div class="collapse navbar-collapse navbar-right">
12+
<ul class="nav navbar-nav">
13+
</ul>
14+
</div>
15+
</div>
16+
</div>

app/views/index.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
3+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
4+
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
5+
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
6+
<head>
7+
<meta charset="utf-8">
8+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9+
<title>Go Memcached Admin</title>
10+
11+
<link rel="stylesheet" href="/public/css/bootstrap.css">
12+
<link rel="stylesheet" href="/public/css/app.css">
13+
14+
<script src="/public/js/modernizr.js"></script>
15+
</head>
16+
<body class="gmca">
17+
{{template "header.html" .}}
18+
<div class="container">
19+
<div class="row">
20+
<h1>Hello World!</h1>
21+
</div>
22+
<hr>
23+
{{template "footer.html" .}}
24+
</div>
25+
<script src="/public/js/jquery.js"></script>
26+
<script src="/public/js/bootstrap.js"></script>
27+
<script src="/public/js/app.js"></script>
28+
</body>
29+
</html>

conf/app.conf

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
app.name=gmcadmin
2+
app.secret=bPlNFGdSC2wd8f2QnFhk5A84JJjKWZdKH9H2FHFuvUs9Jz8UvBHv3Vc5awx39ivu
3+
http.addr=
4+
http.port=5000
5+
http.ssl=false
6+
http.sslcert=
7+
http.sslkey=
8+
cookie.httponly=false
9+
cookie.prefix=GMCA
10+
cookie.secure=false
11+
format.date=01/02/2006
12+
format.datetime=01/02/2006 15:04
13+
results.chunked=false
14+
15+
log.trace.prefix = "TRACE "
16+
log.info.prefix = "INFO "
17+
log.warn.prefix = "WARN "
18+
log.error.prefix = "ERROR "
19+
20+
# The default language of this application.
21+
i18n.default_language=en
22+
23+
module.static=github.com/robfig/revel/modules/static
24+
25+
[dev]
26+
mode.dev=true
27+
results.pretty=true
28+
watch=true
29+
30+
module.testrunner = github.com/robfig/revel/modules/testrunner
31+
32+
log.trace.output = off
33+
log.info.output = stderr
34+
log.warn.output = stderr
35+
log.error.output = stderr
36+
37+
[prod]
38+
mode.dev=false
39+
results.pretty=false
40+
watch=false
41+
42+
module.testrunner =
43+
44+
log.trace.output = off
45+
log.info.output = off
46+
log.warn.output = %(app.name)s.log
47+
log.error.output = %(app.name)s.log

conf/routes

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Routes
2+
# This file defines all application routes (Higher priority routes first)
3+
# ~~~~
4+
5+
module:testrunner
6+
7+
GET / App.Index
8+
9+
# favicon
10+
GET /favicon.ico Static.Serve("public/dist/favicon.ico")
11+
12+
# Map static resources from the /app/public folder to the /public path
13+
GET /public/*filepath Static.Serve("public/dist")
14+
15+
# Catch all
16+
* /:controller/:action :controller.:action

messages/sample.en

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Sample messages file for the English language (en)
2+
# Message file extensions should be ISO 639-1 codes (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
3+
# Sections within each message file can optionally override the defaults using ISO 3166-1 alpha-2 codes (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
4+
# See also:
5+
# - http://www.rfc-editor.org/rfc/bcp/bcp47.txt
6+
# - http://www.w3.org/International/questions/qa-accept-lang-locales
7+

public/Gruntfile.js

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*global module:false*/
2+
module.exports = function(grunt) {
3+
4+
// Project configuration.
5+
grunt.initConfig({
6+
// Metadata.
7+
pkg: grunt.file.readJSON('package.json'),
8+
9+
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
10+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
11+
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
12+
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>; */\n',
13+
14+
// Task configuration.
15+
watch: {
16+
gurntfile: {
17+
files: 'Gruntfile.js',
18+
tasks: ['jshint:gruntfile'],
19+
},
20+
less: {
21+
files: ['src/css/*.less'],
22+
tasks: ['recess']
23+
},
24+
javascript: {
25+
files: ['src/js/*.js'],
26+
tasks: ['concat']
27+
}
28+
},
29+
30+
clean: ['dist'],
31+
32+
copy: {
33+
dev: {
34+
files: [
35+
{ expand: true, cwd: 'src/', src: '*.{ico,txt}', dest: 'dist/' },
36+
{ src: 'src/lib/modernizr/modernizr-2.6.2.js', dest: 'dist/js/modernizr.js' },
37+
{ src: 'src/lib/jquery/jquery-2.0.3.js', dest: 'dist/js/jquery.js' },
38+
{ expand: true, cwd: 'src/lib/bootstrap/', src: ['fonts/**'], dest: 'dist/' }
39+
]
40+
},
41+
release: {
42+
files: [
43+
{ expand: true, cwd: 'src/', src: '*.{ico,txt}', dest: 'dist/' },
44+
{ src: 'src/lib/modernizr/modernizr-2.6.2.min.js', dest: 'dist/js/modernizr.js' },
45+
{ src: 'src/lib/jquery/jquery-2.0.3.min.js', dest: 'dist/js/jquery.js' },
46+
{ src: 'src/lib/jquery/jquery-2.0.3.min.map', dest: 'dist/js/jquery.min.map' },
47+
{ expand: true, cwd: 'src/lib/bootstrap/', src: ['fonts/**'], dest: 'dist/' }
48+
]
49+
}
50+
},
51+
52+
recess: {
53+
options: {
54+
compile: true,
55+
compress: false
56+
},
57+
bootstrap: {
58+
src: ['src/lib/bootstrap/less/bootstrap.less'],
59+
dest: 'dist/css/bootstrap.css'
60+
},
61+
app: {
62+
src: ['src/css/app.less'],
63+
dest: 'dist/css/app.css'
64+
}
65+
},
66+
67+
concat: {
68+
options: {
69+
banner: '<%= banner %>',
70+
stripBanners: true
71+
},
72+
bootstrap: {
73+
src: [
74+
'src/lib/bootstrap/js/transition.js',
75+
'src/lib/bootstrap/js/button.js',
76+
'src/lib/bootstrap/js/dropdown.js',
77+
'src/lib/bootstrap/js/modal.js'
78+
],
79+
dest: 'dist/js/bootstrap.js'
80+
},
81+
app: {
82+
src: ['src/js/app.js'],
83+
dest: 'dist/js/app.js'
84+
}
85+
},
86+
87+
uglify: {
88+
options: {
89+
banner: '<%= banner %>',
90+
mangle: {
91+
except: []
92+
},
93+
preserveComments: false
94+
},
95+
bootstrap: {
96+
src: '<%= concat.bootstrap.dest %>',
97+
dest: '<%= concat.bootstrap.dest %>',
98+
},
99+
app: {
100+
src: '<%= concat.app.dest %>',
101+
dest: '<%= concat.app.dest %>',
102+
}
103+
},
104+
105+
jshint: {
106+
options: {
107+
curly: true,
108+
eqeqeq: true,
109+
immed: true,
110+
latedef: true,
111+
newcap: true,
112+
noarg: true,
113+
sub: true,
114+
undef: true,
115+
unused: true,
116+
boss: true,
117+
eqnull: true,
118+
browser: true,
119+
globals: {}
120+
},
121+
gruntfile: {
122+
src: 'Gruntfile.js'
123+
}
124+
},
125+
126+
connect: {
127+
server: {
128+
options: {
129+
keepalive: true,
130+
port: 5001,
131+
base: 'dist'
132+
}
133+
}
134+
}
135+
});
136+
137+
// These plugins provide necessary tasks.
138+
grunt.loadNpmTasks('grunt-contrib-clean');
139+
grunt.loadNpmTasks('grunt-contrib-copy');
140+
grunt.loadNpmTasks('grunt-contrib-concat');
141+
grunt.loadNpmTasks('grunt-contrib-uglify');
142+
grunt.loadNpmTasks('grunt-contrib-jshint');
143+
grunt.loadNpmTasks('grunt-contrib-watch');
144+
grunt.loadNpmTasks('grunt-contrib-connect');
145+
grunt.loadNpmTasks('grunt-recess');
146+
147+
// Default task.
148+
grunt.registerTask('default', ['jshint', 'clean', 'copy:dev', 'recess', 'concat']);
149+
grunt.registerTask('release', ['jshint', 'clean', 'copy:release', 'recess', 'concat', 'uglify']);
150+
151+
};

public/package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "gmcadmin",
3+
"version": "0.0.1",
4+
"description": "Go Memcached Admin",
5+
"homepage": "http://github.com/codeb2cc/gmcadmin",
6+
"author": {
7+
"name": "Codeb Fan",
8+
"email": "[email protected]",
9+
"url": "http://codeb2cc.com"
10+
},
11+
"devDependencies": {
12+
"grunt": "~0.4.1",
13+
"grunt-contrib-jshint": "~0.6.2",
14+
"grunt-contrib-concat": "~0.3.0",
15+
"grunt-contrib-uglify": "~0.2.2",
16+
"grunt-contrib-watch": "~0.5.1",
17+
"grunt-contrib-copy": "~0.4.1",
18+
"grunt-contrib-clean": "~0.5.0",
19+
"grunt-contrib-connect": "~0.3.0",
20+
"grunt-recess": "~0.3.3"
21+
}
22+
}

public/src/css/app.less

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
body {
2+
padding-top: 80px;
3+
padding-bottom: 20px;
4+
}
5+
6+
.footer-links {
7+
margin: 10px 0;
8+
padding-left: 0;
9+
text-align: center;
10+
11+
li {
12+
display: inline;
13+
padding: 0 2px;
14+
}
15+
}
16+

public/src/favicon.ico

31.3 KB
Binary file not shown.

public/src/humans.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# humanstxt.org/
2+
# The humans responsible & technology colophon
3+
4+
# TEAM
5+
6+
Codeb Fan -- Creator --
7+
8+
# THANKS
9+
Binary file not shown.

0 commit comments

Comments
 (0)