OSDN Git Service

Bootstrap: login screen
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>
Fri, 27 Jan 2012 17:58:10 +0000 (19:58 +0200)
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>
Fri, 27 Jan 2012 17:58:10 +0000 (19:58 +0200)
app/assets/stylesheets/common.scss
app/assets/stylesheets/dashboard.scss
app/assets/stylesheets/login.scss [new file with mode: 0644]
app/assets/stylesheets/projects.css.scss
app/assets/stylesheets/style.scss
app/views/dashboard/_sidebar.html.haml
app/views/devise/passwords/new.html.erb
app/views/devise/sessions/new.html.erb
app/views/devise/shared/_links.erb
app/views/layouts/devise.html.haml

index 09a12e7..1b27814 100644 (file)
@@ -120,6 +120,7 @@ $blue_link: "#2fa0bb";
 @import "issues.css.scss";
 @import "merge_requests.css.scss";
 @import "notes.css.scss";
+@import "login.scss";
 
 //@import "style.scss";
 
index bc2b902..38eb2c0 100644 (file)
@@ -1,5 +1,3 @@
-.application h2.icon span{ background-position:  9px -69px; }
-.application header{margin-bottom: 0}
 .application .news-feed{margin-left: 285px; min-height: 600px; margin-top: 20px; margin-right:2px; padding:20px;}
 .application .application-content{ position: relative; float: left; width: 100%; height: 100%; }
 .application .news-feed h2{float: left;}
@@ -7,7 +5,6 @@
 body.application aside{
   min-height: 820px; position: relative; top: 0; bottom: 0; right: 0; width: 260px;  float: left;  border-right: 1px solid $border_color; padding:20px; padding-right:0;
   h4{margin: 0; border-bottom: 1px solid #ccc; padding: 20px 20px 20px 0px; font-size: 11px; font-weight: bold; text-transform: uppercase;}
-  h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 2%; margin-top: -4px; display: block;}
   .project-list {list-style: none; margin: 0; padding: 0;}
   .project-list li a {background: white;  color: #{$blue_link}; display: block; border-bottom: 1px solid $lite_border_color; padding: 14px 6% 14px 0px;}
   .project-list li a span.project-name{font-size: 14px; display: block; margin-bottom: 8px}
diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss
new file mode 100644 (file)
index 0000000..73ba27e
--- /dev/null
@@ -0,0 +1,41 @@
+/* Login Page */
+body.login-page{ padding-top: 10%}
+
+.login-box{
+  width: 304px;
+  position: relative;
+  border-radius: 5px;
+  margin: auto;
+  padding: 20px;
+  background: white;
+}
+
+.login-box .login-logo{
+  margin: 10px 0 30px 0;
+  display: block;
+}
+
+.login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px}
+
+.login-box input.text.top{
+  -webkit-border-top-left-radius: 5px;
+  -webkit-border-top-right-radius: 5px;
+  -moz-border-radius-topleft: 5px;
+  -moz-border-radius-topright: 5px;
+  border-top-left-radius: 5px;
+  border-top-right-radius: 5px;
+}
+
+.login-box input.text.bottom{
+  -webkit-border-bottom-right-radius: 5px;
+  -webkit-border-bottom-left-radius: 5px;
+  -moz-border-radius-bottomright: 5px;
+  -moz-border-radius-bottomleft: 5px;
+  border-bottom-right-radius: 5px;
+  border-bottom-left-radius: 5px;
+  border-top: 0;
+  margin-bottom: 20px;
+}
+
+.login-box a.forgot{float: right; padding-top: 6px}
+
index e35e70b..2f83ade 100644 (file)
@@ -2,18 +2,20 @@
   margin-right:50px
 }
 
-.sidebar { 
-  .fixed { 
-    position:fixed;
-  }
+.project {
+  .sidebar { 
+    .fixed { 
+      position:fixed;
+    }
 
-  aside a {
-    display:block;
-    position:relative;
-    padding:15px 10px;
-    margin:10px 0 0 0;
-    font-size:13px;
-    font-weight:bold;
+    aside a {
+      display:block;
+      position:relative;
+      padding:15px 10px;
+      margin:10px 0 0 0;
+      font-size:13px;
+      font-weight:bold;
+    }
   }
 }
 .file_stats {
index dbf11e5..0921b04 100644 (file)
@@ -178,47 +178,6 @@ table  thead .image{width:100px}
 
 /* eo UI Box */
 
-/* Login Page */
-body.login-page{background-color: #f1f1f1; padding-top: 10%}
-
-.login-box{
-  width: 304px;
-  position: relative;
-  border-radius: 5px;
-  margin: auto;
-  padding: 20px;
-  background: white;
-  box-shadow: rgba(0, 0, 0, 0.07) 0 1px 0,white 0 2px 0,rgba(0, 0, 0, 0.07) 0 3px 0,white 0 4px 0, rgba(0, 0, 0, 0.07) 0 5px 0;
-}
-
-.login-box .login-logo{
-  margin: 10px 0 30px 0;
-  display: block;
-}
-
-.login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px}
-
-.login-box input.text.top{
-  -webkit-border-top-left-radius: 5px;
-  -webkit-border-top-right-radius: 5px;
-  -moz-border-radius-topleft: 5px;
-  -moz-border-radius-topright: 5px;
-  border-top-left-radius: 5px;
-  border-top-right-radius: 5px;
-}
-
-.login-box input.text.bottom{
-  -webkit-border-bottom-right-radius: 5px;
-  -webkit-border-bottom-left-radius: 5px;
-  -moz-border-radius-bottomright: 5px;
-  -moz-border-radius-bottomleft: 5px;
-  border-bottom-right-radius: 5px;
-  border-bottom-left-radius: 5px;
-  border-top: 0;
-  margin-bottom: 20px;
-}
-
-.login-box a.forgot{float: right; padding-top: 6px}
 
 /* Icons */
 .directory, .file{
index dec7118..854f8c6 100644 (file)
@@ -1,8 +1,9 @@
 %aside
   %h4
-    - if current_user.can_create_project?
-      %a.button-small.button-green{:href => new_project_path} New Project
     Your Projects
+    - if current_user.can_create_project?
+      = link_to new_project_path, :class => "btn small" do 
+        New Project
   %ol.project-list
     - @projects.each do |project|
       %li
index 01cb337..76fc349 100644 (file)
@@ -3,6 +3,6 @@
   <%= devise_error_messages! %>
   <%= f.email_field :email, :placeholder => "Email",  :class => "text top" %>
   <br/>
-  <%= f.submit "Reset password", :class => "grey-button"  %>
+  <%= f.submit "Reset password", :class => "primary btn"  %>
   <div class="right"> <%= render :partial => "devise/shared/links" %></div>
 <% end %>
index c17ff3f..5dc89ba 100644 (file)
@@ -4,9 +4,9 @@
   <%= f.password_field :password, :class => "text bottom", :placeholder => "Password"  %>
 
   <% if devise_mapping.rememberable? -%>
-    <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
+    <div class="clearfix"> <%= f.label :remember_me %><%= f.check_box :remember_me %></div>
   <% end -%>
   <br/>
-  <%= f.submit "Sign in", :class => "grey-button" %>
+  <%= f.submit "Sign in", :class => "primary btn" %>
   <div class="right"> <%= render :partial => "devise/shared/links" %></div>
 <% end %>
index 33b1120..c624c2d 100644 (file)
@@ -1,5 +1,5 @@
 <%- if controller_name != 'sessions' %>
-  <%= link_to "Sign in", new_session_path(resource_name) %><br />
+  <%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %><br />
 <% end -%>
 
 <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
@@ -7,7 +7,7 @@
 <% end -%>
 
 <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
-  <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
+<%= link_to "Forgot your password?", new_password_path(resource_name), :class => "btn" %><br />
 <% end -%>
 
 <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
index 06db473..8e048f8 100644 (file)
@@ -13,4 +13,4 @@
       REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
   %body.login-page
     = render :partial => "layouts/flash"
-    = yield
+    .container-fluid= yield