Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Ygopro Arena Web
Commits
2612a11a
Commit
2612a11a
authored
May 30, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时
parent
e292d0f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
82 deletions
+131
-82
app/views/duels/show.html.erb
app/views/duels/show.html.erb
+125
-80
app/views/layouts/application.html.erb
app/views/layouts/application.html.erb
+1
-1
app/views/layouts/losses.html.erb
app/views/layouts/losses.html.erb
+1
-0
app/views/layouts/ygo.html.erb
app/views/layouts/ygo.html.erb
+1
-0
app/views/rooms/index.html.erb
app/views/rooms/index.html.erb
+3
-1
No files found.
app/views/duels/show.html.erb
View file @
2612a11a
<div
id=
"replay"
>
<%=
link_to
'录像下载'
,
@duel
.
replay
%>
<%=
link_to
'(test)'
,
'mycard://'
+
@duel
.
replay
[
7
,
@duel
.
replay
.
size
-
7
]
%>
<%=
link_to
'(test)'
,
'mycard://'
+
URI
.
escape
(
URI
.
escape
(
@duel
.
replay
[
7
,
@duel
.
replay
.
size
-
7
]))
%>
</div>
<style
type=
"text/css"
>
<!
--
<!
--
.STYLE3
{
color
:
#00FF00
;
font-size
:
12px
;}
.STYLE4
{
color
:
#990000
;
font-size
:
12px
;}
.STYLE6
{
color
:
#CCCCCC
}
--
>
.card
{
float
:
left
;
padding-left
:
10px
;
padding-bottom
:
9px
;
}
.card
img
{
width
:
40px
;
height
:
50px
;
border
:
0px
;
}
.user
{
width
:
330px
;
font-size
:
20px
;
color
:
#ffcc66
;
float
:
left
;
cursor
:
pointer
;
line-height
:
40px
;
padding-left
:
12px
;
font-weight
:
bold
;}
.user_act
{
width
:
330px
;
font-size
:
20px
;
color
:
#ffcc66
;
float
:
left
;
cursor
:
pointer
;
background-color
:
#111111
;
line-height
:
40px
;
padding-left
:
12px
;
font-weight
:
bold
;}
#cards1
{
background-color
:
#111111
;
overflow
:
hidden
;
padding
:
12px
;}
#cards2
{
background-color
:
#111111
;
overflow
:
hidden
;
padding
:
12px
;
display
:
none
}
.STYLE3
{
color
:
#00FF00
;
font-size
:
12px
;
}
.STYLE4
{
color
:
#990000
;
font-size
:
12px
;
}
.STYLE6
{
color
:
#CCCCCC
}
--
>
.card
{
float
:
left
;
padding-left
:
10px
;
padding-bottom
:
9px
;
}
.card
img
{
width
:
40px
;
height
:
50px
;
border
:
0px
;
}
.user
{
width
:
330px
;
font-size
:
20px
;
color
:
#ffcc66
;
float
:
left
;
cursor
:
pointer
;
line-height
:
40px
;
padding-left
:
12px
;
font-weight
:
bold
;
}
.user_act
{
width
:
330px
;
font-size
:
20px
;
color
:
#ffcc66
;
float
:
left
;
cursor
:
pointer
;
background-color
:
#111111
;
line-height
:
40px
;
padding-left
:
12px
;
font-weight
:
bold
;
}
#cards1
{
background-color
:
#111111
;
overflow
:
hidden
;
padding
:
12px
;
}
#cards2
{
background-color
:
#111111
;
overflow
:
hidden
;
padding
:
12px
;
display
:
none
}
</style>
<script>
function
show
(
i
){
if
(
i
==
1
)
{
$
(
'
#cards2
'
).
hide
(
500
);
$
(
'
#cards1
'
).
show
(
500
);
$
(
'
#user2
'
).
attr
(
"
class
"
,
"
user
"
);
$
(
'
#user1
'
).
attr
(
"
class
"
,
"
user_act
"
);
function
show
(
i
)
{
if
(
i
==
1
)
{
$
(
'
#cards2
'
).
hide
(
500
);
$
(
'
#cards1
'
).
show
(
500
);
$
(
'
#user2
'
).
attr
(
"
class
"
,
"
user
"
);
$
(
'
#user1
'
).
attr
(
"
class
"
,
"
user_act
"
);
}
else
{
$
(
'
#cards1
'
).
hide
(
500
);
$
(
'
#cards2
'
).
show
(
500
);
$
(
'
#user1
'
).
attr
(
"
class
"
,
"
user
"
);
$
(
'
#user2
'
).
attr
(
"
class
"
,
"
user_act
"
);
}
}
else
{
$
(
'
#cards1
'
).
hide
(
500
);
$
(
'
#cards2
'
).
show
(
500
);
$
(
'
#user1
'
).
attr
(
"
class
"
,
"
user
"
);
$
(
'
#user2
'
).
attr
(
"
class
"
,
"
user_act
"
);
}
}
</script>
<div
style=
"color: white; width:750px;"
align=
"left"
>
<div
class=
"user_act"
id=
"user1"
onClick=
"show(1)"
>
<%=
@duel
.
user1
.
name
%>
<%=
@duel
.
user1
.
name
%>
<%
if
@duel
.
winner
==
@duel
.
user1
%>
<span
class=
"STYLE3"
>
WINNER
</span>
<span
class=
"STYLE3"
>
WINNER
</span>
<%
else
%>
<span
class=
"STYLE4"
>
LOSER
</span>
<span
class=
"STYLE4"
>
LOSER
</span>
<%
end
%>
<span
class=
"STYLE2"
>
<%
if
@duel
.
user1_public
or
@current_user
==
@duel
.
user1
%>
<%=
link_to
image_tag
(
'deck_download.png'
,
:border
=>
false
,
:style
=>
'float:right;padding:12px 12px 0 0'
),
"/duels/
#{
@duel
.
id
}
/user1_deck.ydk"
%>
<%=
link_to
'(test)'
,
"mycard://card.touhou.cc/duels/
#{
@duel
.
id
}
/user1_deck.ydk"
,
:style
=>
'font-size:9px'
%>
<%=
link_to
image_tag
(
'deck_download.png'
,
:border
=>
false
,
:style
=>
'float:right;padding:12px 12px 0 0'
),
"/duels/
#{
@duel
.
id
}
/user1_deck.ydk"
%>
<%=
link_to
'(test)'
,
URI
.
escape
(
URI
.
escape
(
"mycard://card.touhou.cc/duels/
#{
@duel
.
id
}
/user1_deck.ydk"
)),
:style
=>
'font-size:9px'
%>
<%
end
%>
</span>
<%
if
@current_user
==
@duel
.
user1
%>
<%=
form_for
(
@duel
,
:html
=>
{
:style
=>
"display:inline"
})
do
|
f
|
%>
<span
style=
"font-size:12px;color:white;float:right;padding-right:24px"
>
公开卡组
<%=
f
.
check_box
:user1_public
,
:onclick
=>
"submit()"
%>
</span>
<%
end
%>
<%
end
%>
<%=
form_for
(
@duel
,
:html
=>
{
:style
=>
"display:inline"
})
do
|
f
|
%>
<span
style=
"font-size:12px;color:white;float:right;padding-right:24px"
>
公开卡组
<%=
f
.
check_box
:user1_public
,
:onclick
=>
"submit()"
%>
</span>
<%
end
%>
<%
end
%>
</div>
<div
class=
"user"
id=
"user2"
onClick=
"show(2)"
>
<%=
@duel
.
user2
.
name
%>
<div
class=
"user"
id=
"user2"
onClick=
"show(2)"
>
<%=
@duel
.
user2
.
name
%>
<%
if
@duel
.
winner
==
@duel
.
user2
%>
<span
class=
"STYLE3"
>
WINNER
</span>
<span
class=
"STYLE3"
>
WINNER
</span>
<%
else
%>
<span
class=
"STYLE4"
>
LOSER
</span>
<span
class=
"STYLE4"
>
LOSER
</span>
<%
end
%>
<%
if
@duel
.
user2_public
or
@current_user
==
@duel
.
user2
%>
<%=
link_to
image_tag
(
'deck_download.png'
,
:border
=>
false
,
:style
=>
'float:right;padding:12px 12px 0 0'
),
"/duels/
#{
@duel
.
id
}
/user2_deck.ydk"
%>
<%=
link_to
'(test)'
,
"mycard://card.touhou.cc/duels/
#{
@duel
.
id
}
/user2_deck.ydk"
,
:style
=>
'font-size:9px'
%>
<%=
link_to
image_tag
(
'deck_download.png'
,
:border
=>
false
,
:style
=>
'float:right;padding:12px 12px 0 0'
),
"/duels/
#{
@duel
.
id
}
/user2_deck.ydk"
%>
<%=
link_to
'(test)'
,
URI
.
escape
(
URI
.
escape
(
"mycard://card.touhou.cc/duels/
#{
@duel
.
id
}
/user2_deck.ydk"
))
,
:style
=>
'font-size:9px'
%>
<%
end
%>
<%
if
@current_user
==
@duel
.
user2
%>
<%=
form_for
(
@duel
,
:html
=>
{
:style
=>
"display:inline"
})
do
|
f
|
%>
<%=
f
.
check_box
:user2_public
,
:onclick
=>
"submit()"
%>
<span
style=
"font-size:12px;color:white"
>
公开卡组
</span>
<%
end
%>
<%
end
%>
<%=
form_for
(
@duel
,
:html
=>
{
:style
=>
"display:inline"
})
do
|
f
|
%>
<%=
f
.
check_box
:user2_public
,
:onclick
=>
"submit()"
%>
<span
style=
"font-size:12px;color:white"
>
公开卡组
</span>
<%
end
%>
<%
end
%>
</div>
<div
style=
"clear:both"
/>
<div
id=
"cards1"
>
<%
if
@duel
.
user1_public
or
@current_user
==
@duel
.
user1
%>
<p><b>
主卡组:
</b>
</p>
<%
@duel
.
user1_main
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
),
card
%>
</div>
<%
end
%>
<p><b>
主卡组:
</b>
</p>
<%
@duel
.
user1_main
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
),
card
%>
</div>
<%
end
%>
<div
style=
"clear:both"
/>
<p><b>
额外:
</b>
</p>
<%
@duel
.
user1_extra
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
),
card
%>
</div>
<%
end
%>
<div
style=
"clear:both"
/>
<p><b>
额外:
</b>
</p>
<%
@duel
.
user1_extra
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
),
card
%>
</div>
<%
end
%>
<%
else
%>
卡组未公开
卡组未公开
<%
end
%>
</div>
</div>
...
...
@@ -102,21 +147,21 @@
<div
style=
"color: white; width:700px; "
align=
"left"
>
<div
id=
"cards2"
>
<%
if
@duel
.
user2_public
or
@current_user
==
@duel
.
user2
%>
<p><b>
主卡组:
</b>
</p>
<%
@duel
.
user2_main
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
,
:width
=>
54
,
:height
=>
81
),
card
%>
</div>
<%
end
%>
<div
style=
"clear:both"
/>
<p><b>
额外:
</b>
</p>
<%
@duel
.
user2_extra
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
,
:width
=>
54
,
:height
=>
81
),
card
%>
</div>
<%
end
%>
<p><b>
主卡组:
</b>
</p>
<%
@duel
.
user2_main
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
,
:width
=>
54
,
:height
=>
81
),
card
%>
</div>
<%
end
%>
<div
style=
"clear:both"
/>
<p><b>
额外:
</b>
</p>
<%
@duel
.
user2_extra
.
each
do
|
card
|
%>
<div
class=
"card"
>
<%=
link_to
image_tag
(
card
.
image
,
:title
=>
card
.
name
,
:width
=>
54
,
:height
=>
81
),
card
%>
</div>
<%
end
%>
<%
else
%>
卡组未公开
卡组未公开
<%
end
%>
</div>
</div>
\ No newline at end of file
app/views/layouts/application.html.erb
View file @
2612a11a
...
...
@@ -10,7 +10,7 @@
<%=
javascript_include_tag
'common'
%>
<%=
javascript_include_tag
params
[
:controller
]
%>
<%=
csrf_meta_tags
%>
<meta
http-equiv=
"
content-type"
content=
"text/html; charset=UTF
-8"
/>
<meta
http-equiv=
"
Content-Type"
content=
"text/html; charset=utf
-8"
/>
</head>
<body>
<!--TODO:首部待规范化-->
...
...
app/views/layouts/losses.html.erb
View file @
2612a11a
...
...
@@ -9,6 +9,7 @@
<%=
javascript_include_tag
'losses'
%>
<%=
javascript_include_tag
params
[
:controller
]
%>
<%=
csrf_meta_tags
%>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
</head>
<body>
<HEADER>
...
...
app/views/layouts/ygo.html.erb
View file @
2612a11a
...
...
@@ -10,6 +10,7 @@
<%=
javascript_include_tag
'ygo'
%>
<%=
javascript_include_tag
params
[
:controller
]
%>
<%=
csrf_meta_tags
%>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
</head>
<body>
<header
id=
"header"
>
...
...
app/views/rooms/index.html.erb
View file @
2612a11a
...
...
@@ -10,7 +10,9 @@
rooms
+=
'
<div class="room"><div style="float:left;position:absolute;margin-left:8px;font-size:16px;
'
if
(
room
.
status
==
'
wait
'
){
rooms
+=
'
color:#33CCFF;">等待中
'
;
rooms
+=
'
</div><a class="roomname" href="mycard://
<%=
"
#{
@current_user
.
name
}
:
#{
@current_user
.
password
}
@"
if
logged?
%>
122.0.65.71:7911/
'
+
room
.
name
+
'
">
'
+
room
.
name
+
'
</a>
'
;
rooms
+=
'
</div><a class="roomname" href="
'
;
rooms
+=
encodeURI
(
'
mycard://
<%=
"
#{
URI
.
escape
@current_user
.
name
}
:
#{
URI
.
escape
@current_user
.
password
}
@"
if
logged?
%>
122.0.65.71:7911/
'
+
encodeURIComponent
(
room
.
name
));
rooms
+=
'
">
'
+
room
.
name
+
'
</a>
'
;
}
else
{
rooms
+=
'
;">决斗中
'
;
rooms
+=
'
</div><a class="roomname">
'
+
room
.
name
+
'
</a>
'
;
...
...
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