Commit 5d83e6fa authored by Jens-Christian Fischer's avatar Jens-Christian Fischer
Browse files

Set custom play layout without the logos

parent 259fce0f
...@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do ...@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do def project do
[app: :grains, [app: :grains,
version: "0.0.79", version: "0.0.80",
elixir: "~> 1.2", elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env), elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers, compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
...@@ -18,17 +18,25 @@ defmodule Grains.Router do ...@@ -18,17 +18,25 @@ defmodule Grains.Router do
plug :put_layout, {Grains.LayoutView, :conductor} plug :put_layout, {Grains.LayoutView, :conductor}
end end
pipeline :play_layout do
plug :put_layout, {Grains.LayoutView, :play}
end
scope "/", Grains do scope "/", Grains do
pipe_through :browser # Use the default browser stack pipe_through :browser # Use the default browser stack
get "/play", GrainsController, :index
get "/play/play", GrainsController, :play
get "/grains/:grain", GrainsController, :show get "/grains/:grain", GrainsController, :show
get "/", PageController, :index get "/", PageController, :index
end end
scope "/play", Grains do
pipe_through [:browser, :play_layout]
get "/", GrainsController, :index
get "/play", GrainsController, :play
end
scope "/conductor", Grains do scope "/conductor", Grains do
pipe_through [:browser, :conductor_layout] pipe_through [:browser, :conductor_layout]
......
<h1>Play</h1> <h1>Play</h1>
P: <span id="pitch"></span><br/>
R: <span id="roll"></span>
<div id="svg-container"> <div id="svg-container">
<%= if assigns[:user_type] == 0 do %> <%= if assigns[:user_type] == 0 do %>
<svg xmlns="http://www.w3.org/2000/svg" <svg xmlns="http://www.w3.org/2000/svg"
...@@ -13,7 +10,7 @@ R: <span id="roll"></span> ...@@ -13,7 +10,7 @@ R: <span id="roll"></span>
enable-background="new 0 0 120 120" enable-background="new 0 0 120 120"
xml:space="preserve" xml:space="preserve"
> >
<circle cx="0" cy="0" r="12" <circle cx="0" cy="0" r="18"
transform="translate(50, 50)" transform="translate(50, 50)"
id="shape"/> id="shape"/>
</svg> </svg>
...@@ -26,7 +23,7 @@ R: <span id="roll"></span> ...@@ -26,7 +23,7 @@ R: <span id="roll"></span>
enable-background="new 0 0 120 120" enable-background="new 0 0 120 120"
xml:space="preserve" xml:space="preserve"
> >
<rect x="0" y="0" width="20" height="20" <rect x="0" y="0" width="24" height="20"
transform="translate(50, 50)" transform="translate(50, 50)"
id="shape"/> id="shape"/>
</svg> </svg>
...@@ -40,7 +37,7 @@ R: <span id="roll"></span> ...@@ -40,7 +37,7 @@ R: <span id="roll"></span>
xml:space="preserve" xml:space="preserve"
> >
<polygon x="0" y="0" <polygon x="0" y="0"
points="0,0 10,0 5,10" points="0,0 20,0 10,20"
transform="translate(50, 50)" transform="translate(50, 50)"
id="shape"/> id="shape"/>
</svg> </svg>
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment