From 19b983e103a81736b73f03b5cc30402c8abc9818 Mon Sep 17 00:00:00 2001 From: yanxd Date: Sat, 2 Nov 2013 14:17:15 +0800 Subject: [PATCH] move flash message to top on base_project --- app/views/layouts/base_projects.html.erb | 4 +-- public/stylesheets/nyan.css | 34 +++++++++++++----------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 7973201ad..1682efbff 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -7,7 +7,7 @@ <%= csrf_meta_tag %> <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> <%= heads_for_theme %> @@ -153,10 +153,10 @@
<%= render_main_menu(@project) %>
+ <%= render_flash_messages %> <%= yield %> <%= call_hook :view_layouts_base_content %>
- <%= render_flash_messages %> <%= render :partial => 'layouts/base_footer'%> diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 304f1d3ac..d22ae059f 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -1,5 +1,5 @@ /*add by nyan*/ -.whiteButton { +input[class='whiteButton'], .whiteButton { -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; @@ -32,7 +32,7 @@ text-shadow:0px 1px 0px #ffffff; } -.whiteButton:hover { +input[class='whiteButton'], .whiteButton:hover { background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff)); background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); @@ -44,9 +44,15 @@ background-color:#f6f6f6; } + + +input[class='whiteButton'], .whiteButton:active { + position:relative; + top:1px; +} /* minimal *******************************************************************************/ -.nyan-minimal { +input[class='nyan-minimal'], .nyan-minimal { background: #e3e3e3; border: 1px solid #bbb; -webkit-border-radius: 3px; @@ -61,9 +67,10 @@ padding: 8px 0 9px; text-align: center; text-shadow: 0 1px 0 #fff; - width: 150px; + padding-left:10px; + padding-right:10px; } -.nyan-minimal:hover { +input[class='nyan-minimal'], .nyan-minimal:hover { background: #d9d9d9; -webkit-box-shadow: inset 0 0 1px 1px #eaeaea; -moz-box-shadow: inset 0 0 1px 1px #eaeaea; @@ -71,7 +78,7 @@ color: #222; cursor: pointer; } -.nyan-minimal:active { +input[class='nyan-minimal'], .nyan-minimal:active { background: #d0d0d0; -webkit-box-shadow: inset 0 0 1px 1px #e3e3e3; -moz-box-shadow: inset 0 0 1px 1px #e3e3e3; @@ -81,7 +88,7 @@ /* clean gray *******************************************************************************/ -.nyan-clean-gray { +input[class='nyan-clean-gray'], .nyan-clean-gray { background-color: #eeeeee; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc)); background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); @@ -100,9 +107,10 @@ padding: 8px 0; text-align: center; text-shadow: 0 1px 0 #eee; - width: 150px; + padding-left:10px; + padding-right:10px; } -.nyan-clean-gray:hover { +input[class='nyan-clean-gray'], .nyan-clean-gray:hover { background-color: #dddddd; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dddddd), color-stop(100%, #bbbbbb)); background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); @@ -115,7 +123,7 @@ cursor: pointer; text-shadow: 0 1px 0 #ddd; } -.nyan-clean-gray:active { +input[class='nyan-clean-gray'], .nyan-clean-gray:active { border: 1px solid #aaa; border-bottom: 1px solid #888; -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; @@ -124,12 +132,6 @@ } - -.whiteButton:active { - position:relative; - top:1px; -} - #share_label { line-height: 1.4em } \ No newline at end of file