Commit 2612a11a authored by 神楽坂玲奈's avatar 神楽坂玲奈

临时

parent e292d0f2
<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
......@@ -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:首部待规范化-->
......
......@@ -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>
......
......@@ -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">
......
......@@ -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>';
......
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