Commit 658e5326 authored by 神楽坂玲奈's avatar 神楽坂玲奈

主页导航下级目录

parent 25c4f0ca
...@@ -40,27 +40,28 @@ GEM ...@@ -40,27 +40,28 @@ GEM
coffee-script (2.2.0) coffee-script (2.2.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.2.0) coffee-script-source (1.3.1)
erubis (2.7.0) erubis (2.7.0)
execjs (1.3.0) execjs (1.3.1)
multi_json (~> 1.0) multi_json (~> 1.0)
hike (1.2.1) hike (1.2.1)
http_accept_language (1.0.2) http_accept_language (1.0.2)
i18n (0.6.0) i18n (0.6.0)
journey (1.0.3) journey (1.0.3)
jquery-rails (2.0.1) jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0) railties (>= 3.2.0, < 5.0)
thor (~> 0.14) thor (~> 0.14)
json (1.6.5) json (1.7.0)
mail (2.4.3) libv8 (3.3.10.4)
mail (2.4.4)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mime-types (1.17.2) mime-types (1.18)
multi_json (1.1.0) multi_json (1.3.4)
mysql2 (0.3.11) mysql2 (0.3.11)
mysql2 (0.3.11-x86-mingw32) mysql2 (0.3.11-x86-mingw32)
paperclip (3.0.1) paperclip (3.0.2)
activemodel (>= 3.0.0) activemodel (>= 3.0.0)
activerecord (>= 3.0.0) activerecord (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
...@@ -92,25 +93,27 @@ GEM ...@@ -92,25 +93,27 @@ GEM
rake (0.9.2.2) rake (0.9.2.2)
rdoc (3.12) rdoc (3.12)
json (~> 1.4) json (~> 1.4)
sass (3.1.15) sass (3.1.16)
sass-rails (3.2.4) sass-rails (3.2.5)
railties (~> 3.2.0) railties (~> 3.2.0)
sass (>= 3.1.10) sass (>= 3.1.10)
tilt (~> 1.3) tilt (~> 1.3)
sprockets (2.1.2) sprockets (2.1.3)
hike (~> 1.2) hike (~> 1.2)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
therubyracer (0.10.1)
libv8 (~> 3.3.10)
thor (0.14.6) thor (0.14.6)
tilt (1.3.3) tilt (1.3.3)
treetop (1.4.10) treetop (1.4.10)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.32) tzinfo (0.3.33)
uglifier (1.2.3) uglifier (1.2.4)
execjs (>= 0.3.0) execjs (>= 0.3.0)
multi_json (>= 1.0.2) multi_json (>= 1.0.2)
will-paginate-i18n (0.1.1) will-paginate-i18n (0.1.2)
will_paginate (3.0.3) will_paginate (3.0.3)
PLATFORMS PLATFORMS
...@@ -126,6 +129,7 @@ DEPENDENCIES ...@@ -126,6 +129,7 @@ DEPENDENCIES
paperclip (~> 3.0) paperclip (~> 3.0)
rails (= 3.2.2) rails (= 3.2.2)
sass-rails (~> 3.2.3) sass-rails (~> 3.2.3)
therubyracer
uglifier (>= 1.0.3) uglifier (>= 1.0.3)
will-paginate-i18n will-paginate-i18n
will_paginate will_paginate
var menu=function(){
var t=15,z=50,s=6,a;
function dd(n){this.n=n; this.h=[]; this.c=[]}
dd.prototype.init=function(p,c){
a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
for(i;i<l;i++){
var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
h.onmouseover=new Function(this.n+'.st('+i+',true)');
h.onmouseout=new Function(this.n+'.st('+i+')');
}
}
dd.prototype.st=function(x,f){
var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
clearInterval(c.t); c.style.overflow='hidden';
if(f){
p.className+=' '+a;
if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
if(c.mh==c.offsetHeight){c.style.overflow='visible'}
else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
}
function sl(c,f){
var h=c.offsetHeight;
if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
clearInterval(c.t); return
}
var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
c.style.height=h+(d*f)+'px'
}
return{dd:dd}
}();
\ No newline at end of file
# Place all the behaviors and hooks related to the matching controller here. # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js. # All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
//= require jquery.cycle.lite //= require jquery.cycle.lite
\ No newline at end of file //= require dropdown
ul.menu {list-style:none; margin:0; padding:0}
ul.menu li {position:relative; float:left; margin-right:2px}
ul.menu ul {position:absolute; top:46px; left:0; background:#d1d1d1; display:none; opacity:0; list-style:none}
ul.menu ul li {position:relative; border:1px solid #aaa; border-top:none; width:148px; margin:0}
ul.menu ul li a {display:block; padding:3px 7px 5px; background-color:#d1d1d1}
ul.menu ul li a:hover {background-color:#c5c5c5}
ul.menu ul ul {left:148px; top:-1px}
ul.menu .sub {background:#d1d1d1 image-url("dropdown/arrow.gif") 136px 8px no-repeat}
ul.menu .topline {border-top:1px solid #aaa}
/*
*= require dropdown
*/
*{ *{
margin:0; margin:0;
padding:0; padding:0;
...@@ -189,4 +192,4 @@ padding-left:10px; ...@@ -189,4 +192,4 @@ padding-left:10px;
font:12px/130% "\5FAE\8F6F\96C5\9ED1"; font:12px/130% "\5FAE\8F6F\96C5\9ED1";
color:#2a2a2a; color:#2a2a2a;
text-shadow:1px 1px 1px #dedede; text-shadow:1px 1px 1px #dedede;
} }
\ No newline at end of file
...@@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base ...@@ -56,7 +56,7 @@ class ApplicationController < ActionController::Base
Dir.foreach(Themes_Dir) do |file| Dir.foreach(Themes_Dir) do |file|
theme_config_file = File.join Themes_Dir, file, "theme.yml" theme_config_file = File.join Themes_Dir, file, "theme.yml"
if File.file? theme_config_file if File.file? theme_config_file
@site[:themes][file] = YAML.load_file(theme_config_file) @site[:themes][file] = YAML.load_file(theme_config_file) rescue {}
end end
end end
#p @site[:themes] #p @site[:themes]
......
<%= link_to image_tag(link.logo, :alt => link.name), link.url %> <%= link_to image_tag(link.logo, width: 88, height: 31, alt: link.name), link.url %>
\ No newline at end of file \ No newline at end of file
...@@ -21,11 +21,30 @@ ...@@ -21,11 +21,30 @@
<header> <header>
<nav id="nav"> <nav id="nav">
<a class="nav_logo">MyCard</a> <a class="nav_logo">MyCard</a>
<%= link_to "在线大厅", rooms_path, :class => "nav_link" %>
<%= link_to "用户排行", users_path,:class => "nav_link" %> <ul class="menu" id="menu">
<%= link_to "常用卡片", cards_path, :class => "nav_link" %> <li><%= link_to "在线大厅", rooms_path, :class => "nav_link" %></li>
<%= link_to "常用卡组", decks_path, :class => "nav_link" %> <li><%= link_to "竞技场", users_path,:class => "nav_link" %>
<%= link_to "论坛", boards_path, :class => "nav_link" %> <ul>
<li><%= link_to "排行榜", users_path, :class => "nav_sub" %></li>
<li><%= link_to "决斗记录", duels_path, :class => "nav_sub" %></li>
<li><%= link_to "我的中心", logged? ? @current_user : login_path, :class => "nav_sub" %></li>
</ul>
</li>
<li>
<%= link_to "卡组统计", decks_path, :class => "nav_link" %>
<ul>
<li><%= link_to "卡组排行", decks_path, :class => "nav_sub" %></li>
<li><%= link_to "单卡排行", cards_path, :class => "nav_sub" %></li>
</ul>
</li>
<li><%= link_to "论坛", boards_path, :class => "nav_link" %></li>
</ul>
<script type="text/javascript">
var menu=new menu.dd("menu");
menu.init("menu","menuhover");
</script>
</nav> </nav>
</header> </header>
...@@ -56,6 +75,8 @@ ...@@ -56,6 +75,8 @@
<a href="/api">API</a> <a href="/api">API</a>
</div> </div>
<div id="footer2"> <div id="footer2">
<h2>合作伙伴</h2>
<%= render Link.all %>
</div> </div>
<div id="footer3"> <div id="footer3">
<h2>版权申明</h2> <h2>版权申明</h2>
......
This diff is collapsed.
This diff is collapsed.
---
!binary "cmFpbHMucG5n": rails-782b548cc1ba7f898cdad2d9eb8420d2.png
!binary "YXBwbGljYXRpb24uanM=": application-d9c9265f37866dabd92089f4c4f7dd97.js
!binary "YXBwbGljYXRpb24uY3Nz": application-95bd4fe1de99c1cd91ec8e6f348a44bd.css
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