Compare commits

..
Author SHA1 Message Date
chris 18b36df573 Change colour for mobile sa 2013-09-13 15:10:46 +08:00
4 changed files with 35 additions and 31 deletions

No files matched your search

@@ -100,9 +100,8 @@ div[data-role="page"] {
padding: 0;
border: none;
z-index: 50;
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
background-image: -webkit-linear-gradient(top, #e35479, #cb2d56);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.8),inset 0 1px 0 #7f95a5,0 -1px 0 #1f2024 inset;
}
.header h1.ui-title {
margin: 8px 30%;
@@ -115,14 +114,12 @@ div[data-role="page"] {
left: 50%;
margin-left: -15px;
font-size: 20px;
/*color: #727272;*/
color: #7CA6C5;
/*background-color: #252525;*/
background-color: #144366;
color: #ffc8e7;
background-color: #cb2d56;
border-radius: 0 0 5px 5px;
height: 15px;
line-height: 16px;
box-shadow: 1px 2px 2px rgba(0, 0, 0, .5);
box-shadow: 1px 2px 2px rgba(0,0,0,0.5);
}
.header .language .ui-btn-text {
left: 0;
@@ -135,14 +132,14 @@ div[data-role="page"] {
background-image: none;
}
.header .ui-btn-up-a {
border: 1px solid #133547;
background-color: #0C4C64;
background-image: -webkit-gradient(linear, left top, left bottom, from( #0D6691 ), to( #0E3A4B ));
background-image: -webkit-linear-gradient( #0D6691 , #0E3A4B );
background-image: -moz-linear-gradient( #0D6691 , #0E3A4B );
background-image: -ms-linear-gradient( #0D6691 , #0E3A4B );
background-image: -o-linear-gradient( #0D6691 , #0E3A4B );
background-image: linear-gradient( #0D6691 , #0E3A4B );
border: 1px solid #a21050;
background-color: #cb2d56;
background-image: -webkit-gradient(linear, left top, left bottom, from(#e35479), to(#cb2d56));
background-image: -webkit-linear-gradient(#e35479, #cb2d56);
background-image: -moz-linear-gradient(#e35479, #cb2d56);
background-image: -ms-linear-gradient(#e35479, #cb2d56);
background-image: -o-linear-gradient(#e35479, #cb2d56);
background-image: linear-gradient(#e35479, #cb2d56);
}
.header h1 img {
height: 30px;
+13 -14
View File
@@ -137,20 +137,19 @@ class ApplicationController < ActionController::Base
# Set I18n.locale
def set_locale
# # update session if passed
# session[:locale] = params[:locale] if params[:locale]
# browser_locale = condition = nil
# # check if locale is valid for non site pages
# if LIST[:forbidden_item_names].include?(env['PATH_INFO'].split('/')[1].to_s)
# condition = VALID_LOCALES.include?(session[:locale])
# elsif session[:locale]
# condition = @site_in_use_locales.include?(session[:locale])
# else
# browser_locale = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first rescue nil
# condition = @site_in_use_locales.include?(browser_locale)
# end
# session[:locale] = condition ? (browser_locale || session[:locale]) : I18n.default_locale.to_s
session[:locale] = 'en'
# update session if passed
session[:locale] = params[:locale] if params[:locale]
browser_locale = condition = nil
# check if locale is valid for non site pages
if LIST[:forbidden_item_names].include?(env['PATH_INFO'].split('/')[1].to_s)
condition = VALID_LOCALES.include?(session[:locale])
elsif session[:locale]
condition = @site_in_use_locales.include?(session[:locale])
else
browser_locale = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first rescue nil
condition = @site_in_use_locales.include?(browser_locale)
end
session[:locale] = condition ? (browser_locale || session[:locale]) : I18n.default_locale.to_s
I18n.locale = session[:locale].to_sym
end
+8
View File
@@ -35,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="&#xe054;"></a>
<ul class="dropdown-menu language-menu">
<% @site_in_use_locales.compact.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">
+1 -1
View File
@@ -54,7 +54,7 @@ module Orbit
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.i18n.load_path += Dir[Rails.root.join('vendor', 'built_in_modules', '*', 'config', 'locales', '*.{rb,yml}').to_s]
config.i18n.default_locale = :en
config.i18n.default_locale = :zh_tw
# JavaScript files you want as :defaults (application.js is always included).
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)