Add a base layout.
This commit is contained in:
parent
75a386539e
commit
e7b1144301
|
@ -50,7 +50,7 @@ get "/game/:id" do |env|
|
|||
black = false
|
||||
end
|
||||
|
||||
black.try { |black| render "src/Go/views/game.ecr"} || render_404
|
||||
black.try { |black| render "src/Go/views/game.ecr", "src/Go/views/base.ecr"} || render_404
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
|
12
src/Go/views/base.ecr
Normal file
12
src/Go/views/base.ecr
Normal file
|
@ -0,0 +1,12 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/css/main.css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Indie+Flower|Raleway" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="content-wrapper">
|
||||
<h1>Go</h1>
|
||||
<%= content %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,23 +1,3 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.board-cell {
|
||||
display: inline-block;
|
||||
background-color: #eaeaea;
|
||||
padding: 20px;
|
||||
}
|
||||
.black-cell {
|
||||
background-color: black;
|
||||
}
|
||||
.white-cell {
|
||||
background-color: white;
|
||||
}
|
||||
.board {
|
||||
max-width: 360px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="elm-root"></div>
|
||||
<script src="/js/Go.js"></script>
|
||||
<script>
|
||||
|
@ -29,5 +9,3 @@
|
|||
'size' : <%= size %>
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue
Block a user