Skip to content

Commit

Permalink
now formatting html response with css
Browse files Browse the repository at this point in the history
  • Loading branch information
aamyot authored and aamyot committed Jun 22, 2015
1 parent 1495982 commit 3704780
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controller/home.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

class Home
def call(env)
[200, {"Content-Type" => "text/html"}, View::Home.render]
[200, {"Content-Type" => "text/html"}, [View::Home.render]]
end
end
2 changes: 1 addition & 1 deletion app/controller/ping.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Ping
def call(env)
['200', {'Content-Type' => 'application/json'}, '{ "alive" : true }']
['200', {'Content-Type' => 'application/json'}, ['{ "alive" : true }']]
end
end
2 changes: 2 additions & 0 deletions app/view/home.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<head>
<title>YoseTheGame</title>
<link href="http://fonts.googleapis.com/css?family=Play" rel="stylesheet" type="text/css">
<link href="/css/main.css" rel="stylesheet" type="text/css">
</head>

<body>
Expand Down
2 changes: 2 additions & 0 deletions app/yose.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
class Yose
def initialize
@app = Rack::Builder.new do
use Rack::Static, :urls => ["/css"], :root => "public"

map '/' do
run Home.new
end
Expand Down
8 changes: 8 additions & 0 deletions public/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
html {
font-family: "Play";
line-height: 1.5;
}

body {
background-color: #fff;
}

0 comments on commit 3704780

Please sign in to comment.