Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grains
grains-web
Commits
5d83e6fa
Commit
5d83e6fa
authored
May 21, 2017
by
Jens-Christian Fischer
Browse files
Set custom play layout without the logos
parent
259fce0f
Changes
4
Hide whitespace changes
Inline
Side-by-side
mix.exs
View file @
5d83e6fa
...
...
@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def
project
do
[
app:
:grains
,
version:
"0.0.
79
"
,
version:
"0.0.
80
"
,
elixir:
"~> 1.2"
,
elixirc_paths:
elixirc_paths
(
Mix
.
env
),
compilers:
[
:phoenix
,
:gettext
]
++
Mix
.
compilers
,
...
...
web/router.ex
View file @
5d83e6fa
...
...
@@ -18,17 +18,25 @@ defmodule Grains.Router do
plug
:put_layout
,
{
Grains
.
LayoutView
,
:conductor
}
end
pipeline
:play_layout
do
plug
:put_layout
,
{
Grains
.
LayoutView
,
:play
}
end
scope
"/"
,
Grains
do
pipe_through
:browser
# Use the default browser stack
get
"/play"
,
GrainsController
,
:index
get
"/play/play"
,
GrainsController
,
:play
get
"/grains/:grain"
,
GrainsController
,
:show
get
"/"
,
PageController
,
:index
end
scope
"/play"
,
Grains
do
pipe_through
[
:browser
,
:play_layout
]
get
"/"
,
GrainsController
,
:index
get
"/play"
,
GrainsController
,
:play
end
scope
"/conductor"
,
Grains
do
pipe_through
[
:browser
,
:conductor_layout
]
...
...
web/templates/grains/play.html.eex
View file @
5d83e6fa
<h1>
Play
</h1>
P:
<span
id=
"pitch"
></span><br/>
R:
<span
id=
"roll"
></span>
<div
id=
"svg-container"
>
<%=
if
assigns
[
:user_type
]
==
0
do
%>
<svg
xmlns=
"http://www.w3.org/2000/svg"
...
...
@@ -13,7 +10,7 @@ R: <span id="roll"></span>
enable-background=
"new 0 0 120 120"
xml:space=
"preserve"
>
<circle
cx=
"0"
cy=
"0"
r=
"1
2
"
<circle
cx=
"0"
cy=
"0"
r=
"1
8
"
transform=
"translate(50, 50)"
id=
"shape"
/>
</svg>
...
...
@@ -26,7 +23,7 @@ R: <span id="roll"></span>
enable-background=
"new 0 0 120 120"
xml:space=
"preserve"
>
<rect
x=
"0"
y=
"0"
width=
"2
0
"
height=
"20"
<rect
x=
"0"
y=
"0"
width=
"2
4
"
height=
"20"
transform=
"translate(50, 50)"
id=
"shape"
/>
</svg>
...
...
@@ -40,7 +37,7 @@ R: <span id="roll"></span>
xml:space=
"preserve"
>
<polygon
x=
"0"
y=
"0"
points=
"0,0
1
0,0
5,1
0"
points=
"0,0
2
0,0
10,2
0"
transform=
"translate(50, 50)"
id=
"shape"
/>
</svg>
...
...
web/templates/layout/conductor.html.eex
View file @
5d83e6fa
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment