fixed orbit bar that like nccu bar now, and add rails version in Gemfile
This commit is contained in:
parent
0b18cf48e3
commit
b2bc62dadd
2
Gemfile
2
Gemfile
|
@ -1,5 +1,5 @@
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
gem 'rails'
|
gem 'rails', "~> 3.2.9"
|
||||||
|
|
||||||
gem "brakeman"
|
gem "brakeman"
|
||||||
gem 'mime-types'
|
gem 'mime-types'
|
||||||
|
|
|
@ -1,28 +1,42 @@
|
||||||
$(document).on('click', '.orbit-bar-search', function (){
|
|
||||||
if ($(this).parents('.search').hasClass('visible')){
|
$(document).ready(function(){
|
||||||
$(this).parents('.search').stop().animate({
|
$('.search').tooltip({
|
||||||
'width':'28px',
|
placement: "bottom"
|
||||||
},500);
|
});
|
||||||
$('.navbar-search').stop().animate({
|
});
|
||||||
'left':'30px',
|
$(document).on('mouseenter', '.orbit-bar-search', function (){
|
||||||
'opacity':'0',
|
$(this).parents('.search').stop().animate({
|
||||||
},200);
|
'width':'265px',
|
||||||
$(this).parents('.search').css({
|
},200);
|
||||||
'background-color': 'transparent',
|
$('.navbar-search').stop().animate({
|
||||||
});
|
'left':'4px',
|
||||||
$(this).parents('.search').removeClass('visible');
|
'opacity':'1'
|
||||||
}
|
},500);
|
||||||
else{
|
$(this).parents('.search').css({
|
||||||
$(this).parents('.search').stop().animate({
|
'background-color': 'rgba(0, 0, 0, 0.5)',
|
||||||
'width':'265px',
|
});
|
||||||
},200);
|
$(this).parents('.search').addClass('visible');
|
||||||
$('.navbar-search').stop().animate({
|
});
|
||||||
'left':'7px',
|
|
||||||
'opacity':'1'
|
|
||||||
},500);
|
$(document).on('mouseleave', '.search.visible', function (){
|
||||||
$(this).parents('.search').css({
|
$(this).stop().animate({
|
||||||
'background-color': 'rgba(0, 0, 0, 0.5)',
|
'width':'28px',
|
||||||
});
|
},500);
|
||||||
$(this).parents('.search').addClass('visible');
|
$('.navbar-search').stop().animate({
|
||||||
}
|
'left':'30px',
|
||||||
});
|
'opacity':'0',
|
||||||
|
},200);
|
||||||
|
$(this).css({
|
||||||
|
'background-color': 'transparent',
|
||||||
|
});
|
||||||
|
$(this).removeClass('visible');
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("mouseenter",".orbit-bar-language, .language-menu",function(){
|
||||||
|
$(this).parents('.language').addClass("open")
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on("mouseleave",".orbit-bar-language, .language-menu",function(){
|
||||||
|
$(this).parents('.language').removeClass("open")
|
||||||
|
})
|
||||||
|
|
|
@ -10,25 +10,19 @@
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li><a href="<%= root_path %>" data-icons=""></a></li>
|
<li><a href="<%= root_path %>" data-icons=""></a></li>
|
||||||
<!-- <li><a href="<%= desktop_path %>" data-icons=""></a></li> -->
|
<li><a href="<%= desktop_path %>" data-icons=""></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
|
<!--
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a class="dropdown-toggle" data-icons="" href="#" data-toggle="dropdown"></a>
|
<a class="dropdown-toggle" data-icons="" href="#" data-toggle="dropdown"></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<% t('ntu.site_names').each do |site| %>
|
<% #t('ntu.site_names').each do |site| %>
|
||||||
<li><%= link_to site[1], get_link(site[0]) %></li>
|
<li><%#= link_to site[1], get_link(site[0]) %></li>
|
||||||
<% end %>
|
<%# end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown language">
|
-->
|
||||||
<a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icons=""></a>
|
|
||||||
<ul class="dropdown-menu language-menu">
|
|
||||||
<% @site_in_use_locales.each do |locale| %>
|
|
||||||
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="search clear" title="<%= t :search_google %>">
|
<li class="search clear" title="<%= t :search_google %>">
|
||||||
<a class="orbit-bar-search" href="#" data-icons=""></a>
|
<a class="orbit-bar-search" href="#" data-icons=""></a>
|
||||||
<form class="navbar-search" method="get" action="http://www.google.com/custom">
|
<form class="navbar-search" method="get" action="http://www.google.com/custom">
|
||||||
|
@ -41,6 +35,14 @@
|
||||||
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
|
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="dropdown language">
|
||||||
|
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown" data-icons=""></a>
|
||||||
|
<ul class="dropdown-menu language-menu">
|
||||||
|
<% @site_in_use_locales.each do |locale| %>
|
||||||
|
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
<li class="dropdown active">
|
<li class="dropdown active">
|
||||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||||
|
|
Loading…
Reference in New Issue