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'
|
||||
gem 'rails'
|
||||
gem 'rails', "~> 3.2.9"
|
||||
|
||||
gem "brakeman"
|
||||
gem 'mime-types'
|
||||
|
|
|
@ -1,28 +1,42 @@
|
|||
$(document).on('click', '.orbit-bar-search', function (){
|
||||
if ($(this).parents('.search').hasClass('visible')){
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'28px',
|
||||
},500);
|
||||
$('.navbar-search').stop().animate({
|
||||
'left':'30px',
|
||||
'opacity':'0',
|
||||
},200);
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'transparent',
|
||||
});
|
||||
$(this).parents('.search').removeClass('visible');
|
||||
}
|
||||
else{
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'265px',
|
||||
},200);
|
||||
$('.navbar-search').stop().animate({
|
||||
'left':'7px',
|
||||
'opacity':'1'
|
||||
},500);
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'rgba(0, 0, 0, 0.5)',
|
||||
});
|
||||
$(this).parents('.search').addClass('visible');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.search').tooltip({
|
||||
placement: "bottom"
|
||||
});
|
||||
});
|
||||
$(document).on('mouseenter', '.orbit-bar-search', function (){
|
||||
$(this).parents('.search').stop().animate({
|
||||
'width':'265px',
|
||||
},200);
|
||||
$('.navbar-search').stop().animate({
|
||||
'left':'4px',
|
||||
'opacity':'1'
|
||||
},500);
|
||||
$(this).parents('.search').css({
|
||||
'background-color': 'rgba(0, 0, 0, 0.5)',
|
||||
});
|
||||
$(this).parents('.search').addClass('visible');
|
||||
});
|
||||
|
||||
|
||||
$(document).on('mouseleave', '.search.visible', function (){
|
||||
$(this).stop().animate({
|
||||
'width':'28px',
|
||||
},500);
|
||||
$('.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>
|
||||
<ul class="nav">
|
||||
<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 class="nav pull-right">
|
||||
<!--
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-icons="" href="#" data-toggle="dropdown"></a>
|
||||
<ul class="dropdown-menu">
|
||||
<% t('ntu.site_names').each do |site| %>
|
||||
<li><%= link_to site[1], get_link(site[0]) %></li>
|
||||
<% end %>
|
||||
<% #t('ntu.site_names').each do |site| %>
|
||||
<li><%#= link_to site[1], get_link(site[0]) %></li>
|
||||
<%# end %>
|
||||
</ul>
|
||||
</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 %>">
|
||||
<a class="orbit-bar-search" href="#" data-icons=""></a>
|
||||
<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)}%>
|
||||
</form>
|
||||
</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? %>
|
||||
<li class="dropdown active">
|
||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||
|
|
Loading…
Reference in New Issue