Skip to content

Commit

Permalink
fix box widths in small modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Contra committed May 3, 2012
1 parent c1187f4 commit 6ee05ec
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
.DS_Store
*.log
node_modules
*.node
*.node
2 changes: 1 addition & 1 deletion .npmignore
@@ -1,4 +1,4 @@
.DS_Store
*.log
node_modules
*.node
*.node
4 changes: 4 additions & 0 deletions bin/smog
@@ -0,0 +1,4 @@
#!/usr/bin/env node

require('coffee-script');
require('../start.coffee');
3 changes: 3 additions & 0 deletions client/css/styles.css
Expand Up @@ -11,6 +11,9 @@ code {
.small-modal {
width: 330px;
}
.small-modal-box {
width: 280px;
}
.big-modal {
width: 900px;
height: 700px;
Expand Down
6 changes: 3 additions & 3 deletions client/templates/connect.jade
Expand Up @@ -3,9 +3,9 @@
h3 Connect

.modal-body
input#host.span3(type="text", placeholder="Host")
input#port.span3(type="text", placeholder="Port")
input#database.span3(type="text", placeholder="Database")
input#host.small-modal-box(type="text", placeholder="Host")
input#port.small-modal-box(type="text", placeholder="Port")
input#database.small-modal-box(type="text", placeholder="Database")

.modal-footer
a#connect-button.btn.btn-primary Connect
2 changes: 1 addition & 1 deletion client/templates/new.jade
Expand Up @@ -3,7 +3,7 @@
h3 Create

.modal-body
input#name.span3(type="text", placeholder="Name")
input#name.small-modal-box(type="text", placeholder="Name")

.modal-footer
a#new-button.btn.btn-primary Create
2 changes: 1 addition & 1 deletion client/templates/rename.jade
Expand Up @@ -3,7 +3,7 @@
h3 Rename

.modal-body
input#newname.span3(type="text", placeholder="New name")
input#newname.small-modal-box(type="text", placeholder="New name")

.modal-footer
a#rename-button.btn.btn-primary Rename
6 changes: 3 additions & 3 deletions lib/router.coffee
Expand Up @@ -4,13 +4,13 @@ async = require 'async'
{join, basename, extname} = require 'path'

module.exports =
initialize: (server, base, servicesDir, cb) ->
initialize: (server, servicesDir, cb) ->
vein = new Vein server
readdir join(base, servicesDir), (err, files) ->
readdir servicesDir, (err, files) ->
return cb err if err?
loadService = (file, cb) ->
serviceName = basename file, extname file
service = require join base, servicesDir, file
service = require join servicesDir, file
vein.add serviceName, service
cb()
async.forEach files, loadService, cb
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -5,6 +5,9 @@
"homepage":"http://github.com/wearefractal/smog",
"repository":"git://github.com/wearefractal/smog.git",
"author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
"bin":{
"smog":"./bin/smog"
},

"dependencies":{
"coffee-script":"*",
Expand Down
3 changes: 3 additions & 0 deletions public/css/styles.css
Expand Up @@ -11,6 +11,9 @@ code {
.small-modal {
width: 330px;
}
.small-modal-box {
width: 280px;
}
.big-modal {
width: 900px;
height: 700px;
Expand Down
2 changes: 1 addition & 1 deletion public/templates/connect.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/templates/new.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/templates/rename.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions start.coffee
@@ -1,13 +1,14 @@
connect = require "connect"
router = require "./lib/router"
{join} = require "path"

# Web server
app = connect()
app.use connect.staticCache()
app.use connect.static './public/'
app.use connect.static join __dirname, './public/'
server = app.listen 8080

# Vein
router.initialize server, __dirname, './lib/services/', (err) ->
router.initialize server, join(__dirname, './lib/services/'), (err) ->
return console.log err if err?
console.log "Server started on 8080"

0 comments on commit 6ee05ec

Please sign in to comment.