Skip to content

Commit

Permalink
first init
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-tang committed Jul 28, 2014
0 parents commit 5605222
Show file tree
Hide file tree
Showing 58 changed files with 1,521 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
node_modules
bower_components
app.sublime-workspace
40 changes: 40 additions & 0 deletions app.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process.env.NODE_ENV = 'development'

nobone = require 'nobone'

data = require './data'

port = 8457



# All modules use default options to init.
# If you want don't init a specific module,
# for example 'db' and 'service' module, just exclude it:
# nobone {
# renderer: {}
# }
# By default it load two module: service, renderer
nb = nobone {
proxy: {}
renderer: {}
service: {}
}

# Server
nb.service.get '/', (req, res) ->
# Renderer
# You can also render coffee, stylus, less, markdown, or define custom handlers.
nb.renderer.render('index.ejs')
.done (tpl_func) ->
res.send tpl_func( { members: data.members } )

# Launch socket.io and express.js
nb.service.listen port

# Kit
# Print out time, log message, time span between two log.
nb.kit.log 'Listen port ' + port

# Static folder to automatically serve coffeescript and stylus.
nb.service.use nb.renderer.static()
21 changes: 21 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "mfe-www",
"version": "0.1.0",
"authors": [
"SY.Tang"
],
"description": "Baidu Music FE Website",
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.1.1",
"lodash": "~2.4.1"
}
}
39 changes: 39 additions & 0 deletions css/font.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@font-face {
font-family: 's';
src: url("../fonts/Roboto-Light.ttf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'n';
src: url("../fonts/Roboto-Light.ttf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'n';
src: url("../fonts/Roboto-Regular.ttf");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'l';
src: url("../fonts/Roboto-Thin.ttf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'l';
src: url("../fonts/Roboto-Light.ttf");
font-weight: bold;
font-style: normal;
}
.font-s {
font-family: s, '微软雅黑';
}
.font-n {
font-family: n, '微软雅黑';
}
.font-l {
font-family: l, '微软雅黑';
}
Loading

0 comments on commit 5605222

Please sign in to comment.