Browse Source

Merge remote-tracking branch 'knu/font-awesome'

Akinori MUSHA 10 years ago
parent
commit
7ca5d7db80

+ 1 - 0
Gemfile

@@ -42,6 +42,7 @@ gem 'em-http-request', '~> 1.1.2'
 gem 'faraday', '~> 0.9.0'
 gem 'faraday_middleware'
 gem 'feed-normalizer'
+gem 'font-awesome-sass'
 gem 'foreman', '~> 0.63.0'
 # geokit-rails doesn't work with geokit 1.8.X but it specifies ~> 1.5
 # in its own Gemfile.

+ 3 - 0
Gemfile.lock

@@ -120,6 +120,8 @@ GEM
       hpricot (>= 0.6)
       simple-rss (>= 1.1)
     ffi (1.9.4)
+    font-awesome-sass (4.2.0)
+      sass (~> 3.2)
     forecast_io (2.0.0)
       faraday
       hashie
@@ -408,6 +410,7 @@ DEPENDENCIES
   faraday_middleware
   feed-normalizer
   ffi (>= 1.9.4)
+  font-awesome-sass
   forecast_io (~> 2.0.0)
   foreman (~> 0.63.0)
   geokit (~> 1.8.4)

+ 37 - 0
app/assets/stylesheets/application.css.scss.erb

@@ -18,6 +18,8 @@
  */
 
 @import "bootstrap";
+@import "font-awesome-sprockets";
+@import "font-awesome";
 
 body { padding-top: 60px; }
 
@@ -237,3 +239,38 @@ h2 .scenario, a span.label.scenario {
 .confirm-agent .popover {
   width: 200px;
 }
+
+.btn-auth {
+  position: relative;
+  padding-left: 40px;
+  $border-color: rgba(0,0,0,0.2);
+  border-color: $border-color;
+
+  > i:first-child {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    width: 32px;
+    height: 32px;
+    text-align: center;
+    line-height: 32px;
+    font-size: 24px;
+    border-right: 1px solid $border-color;
+  }
+
+  &.btn-auth-twitter {
+    color: #fff;
+    background-color: #55acee;
+  }
+
+  &.btn-auth-37signals {
+    color: #fff;
+    background-color: #8fc857;
+  }
+
+  &.btn-auth-github {
+    color: #fff;
+    background-color: #444;
+  }
+}

+ 5 - 5
app/assets/stylesheets/tables.css.scss

@@ -6,17 +6,17 @@
   &.asc:after, &.desc:after {
     text-decoration: none;
     position: absolute;
-    top: -5px;
-    right: -12px;
-    font-size: 1.2em;
+    top: 0;
+    right: -1em;
+    font-family: FontAwesome;
   }
 
   &.asc:after {
-    content: '\2193';
+    content: '\f0de'; //fa-sort-asc
   }
 
   &.desc:after {
-    content: '\2191';
+    content: '\f0dd'; //fa-sort-desc
   }
 }
 

+ 3 - 3
app/views/services/index.html.erb

@@ -12,13 +12,13 @@
         for guidance.
       </p>
       <% if has_oauth_configuration_for?('twitter') %>
-        <p><%= link_to "Authenticate with Twitter", "/auth/twitter" %></p>
+        <p><%= link_to "/auth/twitter", class: 'btn btn-default btn-auth btn-auth-twitter' do %><i class='fa fa-twitter'></i><span>Authenticate with Twitter</span><% end %></p>
       <% end %>
       <% if has_oauth_configuration_for?('37signals') %>
-        <p><%= link_to "Authenticate with 37Signals (Basecamp)", "/auth/37signals" %></p>
+        <p><%= link_to "/auth/37signals", class: 'btn btn-default btn-auth btn-auth-37signals' do %><i class='fa fa-lock'></i><span>Authenticate with 37Signals (Basecamp)</span><% end %></p>
       <% end -%>
       <% if has_oauth_configuration_for?('github') %>
-        <p><%= link_to "Authenticate with Github", "/auth/github" %></p>
+        <p><%= link_to "/auth/github", class: 'btn btn-default btn-auth btn-auth-github' do %><i class='fa fa-github'></i><span>Authenticate with Github</span><% end %></p>
       <% end -%>
       <hr>