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

临时

parent e292d0f2
<div id="replay"> <div id="replay">
<%= link_to '录像下载', @duel.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> </div>
<style type="text/css"> <style type="text/css">
<!-- <!--
.STYLE3 {color: #00FF00; font-size:12px;} .STYLE3 {
.STYLE4 {color: #990000; font-size:12px;} color: #00FF00;
.STYLE6 {color: #CCCCCC} font-size: 12px;
--> }
.card
{ .STYLE4 {
float:left; padding-left:10px; padding-bottom:9px; color: #990000;
} font-size: 12px;
.card img }
{
width:40px; height:50px; border:0px; .STYLE6 {
} color: #CCCCCC
.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} .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> </style>
<script> <script>
function show(i){ function show(i) {
if (i==1) if (i == 1) {
{ $('#cards2').hide(500);
$('#cards2').hide(500); $('#cards1').show(500);
$('#cards1').show(500); $('#user2').attr("class", "user");
$('#user2').attr("class","user"); $('#user1').attr("class", "user_act");
$('#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> </script>
<div style="color: white; width:750px;" align="left"> <div style="color: white; width:750px;" align="left">
<div class="user_act" id="user1" onClick="show(1)"> <div class="user_act" id="user1" onClick="show(1)">
<%= @duel.user1.name %> <%= @duel.user1.name %>
<% if @duel.winner == @duel.user1 %> <% if @duel.winner == @duel.user1 %>
<span class="STYLE3">WINNER</span> <span class="STYLE3">WINNER</span>
<% else %> <% else %>
<span class="STYLE4">LOSER</span> <span class="STYLE4">LOSER</span>
<% end %> <% end %>
<span class="STYLE2"><% if @duel.user1_public or @current_user == @duel.user1 %> <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 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 '(test)', URI.escape(URI.escape("mycard://card.touhou.cc/duels/#{@duel.id}/user1_deck.ydk")), :style => 'font-size:9px' %>
<% end %> <% end %>
</span> </span>
<% if @current_user == @duel.user1 %> <% if @current_user == @duel.user1 %>
<%= form_for(@duel, :html => {:style => "display:inline"}) do |f| %> <%= 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> <span style="font-size:12px;color:white;float:right;padding-right:24px">公开卡组<%= f.check_box :user1_public, :onclick => "submit()" %></span>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<div class="user" id="user2" onClick="show(2)" > <div class="user" id="user2" onClick="show(2)">
<%= @duel.user2.name %> <%= @duel.user2.name %>
<% if @duel.winner == @duel.user2 %> <% if @duel.winner == @duel.user2 %>
<span class="STYLE3">WINNER</span> <span class="STYLE3">WINNER</span>
<% else %> <% else %>
<span class="STYLE4">LOSER</span> <span class="STYLE4">LOSER</span>
<% end %> <% end %>
<% if @duel.user2_public or @current_user == @duel.user2 %> <% 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 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 '(test)', URI.escape(URI.escape("mycard://card.touhou.cc/duels/#{@duel.id}/user2_deck.ydk")), :style => 'font-size:9px' %>
<% end %> <% end %>
<% if @current_user == @duel.user2 %> <% if @current_user == @duel.user2 %>
<%= form_for(@duel, :html => {:style => "display:inline"}) do |f| %> <%= form_for(@duel, :html => {:style => "display:inline"}) do |f| %>
<%= f.check_box :user2_public, :onclick=>"submit()" %> <span style="font-size:12px;color:white">公开卡组</span> <%= f.check_box :user2_public, :onclick => "submit()" %>
<% end %> <span style="font-size:12px;color:white">公开卡组</span>
<% end %> <% end %>
<% end %>
</div> </div>
<div style="clear:both"/> <div style="clear:both"/>
<div id="cards1"> <div id="cards1">
<% if @duel.user1_public or @current_user == @duel.user1 %> <% if @duel.user1_public or @current_user == @duel.user1 %>
<p><b>主卡组:</b> </p> <p><b>主卡组:</b></p>
<% @duel.user1_main.each do |card| %> <% @duel.user1_main.each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %> <%= link_to image_tag(card.image, :title => card.name), card %>
</div> </div>
<% end %> <% end %>
<div style="clear:both"/> <div style="clear:both"/>
<p><b>额外:</b> </p> <p><b>额外:</b></p>
<% @duel.user1_extra.each do |card| %> <% @duel.user1_extra.each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name), card %> <%= link_to image_tag(card.image, :title => card.name), card %>
</div> </div>
<% end %> <% end %>
<% else %> <% else %>
卡组未公开 卡组未公开
<% end %> <% end %>
</div> </div>
</div> </div>
...@@ -102,21 +147,21 @@ ...@@ -102,21 +147,21 @@
<div style="color: white; width:700px; " align="left"> <div style="color: white; width:700px; " align="left">
<div id="cards2"> <div id="cards2">
<% if @duel.user2_public or @current_user == @duel.user2 %> <% if @duel.user2_public or @current_user == @duel.user2 %>
<p><b>主卡组:</b> </p> <p><b>主卡组:</b></p>
<% @duel.user2_main.each do |card| %> <% @duel.user2_main.each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name, :width => 54, :height => 81), card %> <%= link_to image_tag(card.image, :title => card.name, :width => 54, :height => 81), card %>
</div> </div>
<% end %> <% end %>
<div style="clear:both"/> <div style="clear:both"/>
<p><b>额外:</b> </p> <p><b>额外:</b></p>
<% @duel.user2_extra.each do |card| %> <% @duel.user2_extra.each do |card| %>
<div class="card"> <div class="card">
<%= link_to image_tag(card.image, :title => card.name, :width => 54, :height => 81), card %> <%= link_to image_tag(card.image, :title => card.name, :width => 54, :height => 81), card %>
</div> </div>
<% end %> <% end %>
<% else %> <% else %>
卡组未公开 卡组未公开
<% end %> <% end %>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<%= javascript_include_tag 'common' %> <%= javascript_include_tag 'common' %>
<%= javascript_include_tag params[:controller] %> <%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %> <%= 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> </head>
<body> <body>
<!--TODO:首部待规范化--> <!--TODO:首部待规范化-->
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<%= javascript_include_tag 'losses' %> <%= javascript_include_tag 'losses' %>
<%= javascript_include_tag params[:controller] %> <%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head> </head>
<body> <body>
<HEADER> <HEADER>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<%= javascript_include_tag 'ygo' %> <%= javascript_include_tag 'ygo' %>
<%= javascript_include_tag params[:controller] %> <%= javascript_include_tag params[:controller] %>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head> </head>
<body> <body>
<header id="header"> <header id="header">
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
rooms += '<div class="room"><div style="float:left;position:absolute;margin-left:8px;font-size:16px;' rooms += '<div class="room"><div style="float:left;position:absolute;margin-left:8px;font-size:16px;'
if(room.status == 'wait'){ if(room.status == 'wait'){
rooms += 'color:#33CCFF;">等待中'; 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{ }else{
rooms += ';">决斗中'; rooms += ';">决斗中';
rooms += '</div><a class="roomname">' + room.name + '</a>'; 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