[Groonga-commit] ranguba/epub-searcher at c48bc4d [master] Remove non-semantic classes from forms and descendants

Back to archive index

KITAITI Makoto null+****@clear*****
Sun Feb 15 05:55:09 JST 2015


KITAITI Makoto	2015-02-15 05:55:09 +0900 (Sun, 15 Feb 2015)

  New Revision: c48bc4dc5b5a5db7cb44c577fabcdabe63bd80db
  https://github.com/ranguba/epub-searcher/commit/c48bc4dc5b5a5db7cb44c577fabcdabe63bd80db

  Message:
    Remove non-semantic classes from forms and descendants

  Modified files:
    app/stylesheets/groonga.scss
    app/views/_book.haml
    app/views/_form_search.haml

  Modified: app/stylesheets/groonga.scss (+31 -0)
===================================================================
--- app/stylesheets/groonga.scss    2015-02-15 05:54:44 +0900 (be7d973)
+++ app/stylesheets/groonga.scss    2015-02-15 05:55:09 +0900 (c608df6)
@@ -17,6 +17,37 @@ form {
   color: red;
 }
 
+form.form_search {
+  @extend .row;
+
+  & > div {
+    @extend .form-group;
+
+    & > div:nth-of-type(1) {
+      @extend .col-md-6;
+      @extend .col-md-offset-2;
+    }
+
+    & > div:nth-of-type(2) {
+      @extend .col-md-2;
+    }
+  }
+
+  input[type="search"], button {
+    @extend .form-control
+  }
+
+  button {
+    @extend .btn;
+    @extend .btn-default;
+  }
+}
+
 form.form_delete_book {
   text-align: right;
+
+  input[type="submit"] {
+    @extend .btn;
+    @extend .btn-danger;
+  }
 }

  Modified: app/views/_book.haml (+1 -1)
===================================================================
--- app/views/_book.haml    2015-02-15 05:54:44 +0900 (c5717a8)
+++ app/views/_book.haml    2015-02-15 05:55:09 +0900 (d7f1349)
@@ -3,4 +3,4 @@
     %h4{:class => 'media-heading'}== #{book['title']} - #{book['author']}
     = book['file_path']
     = form_for :books, url_for(:books, :id => book['_id']), :method => 'delete', :class => 'form_delete_book' do |f|
-      = f.submit t('form_delete_book.button'), :class => 'btn btn-danger'
+      = f.submit t('form_delete_book.button')

  Modified: app/views/_form_search.haml (+6 -6)
===================================================================
--- app/views/_form_search.haml    2015-02-15 05:54:44 +0900 (c3dae98)
+++ app/views/_form_search.haml    2015-02-15 05:55:09 +0900 (cc3f5e8)
@@ -1,7 +1,7 @@
-%form{:class => 'row', :action => '/', :method => 'GET'}
-  %div{:class => 'form-group'}
-    %div{:class => 'col-md-6 col-md-offset-2'}
-      %input{:type => 'search', :class => 'form-control', :name => 'q', :value => @query_words, :required => true}
-    %div{:class => 'col-md-2'}
-      %button{:class => 'form-control btn btn-default'}== #{t 'form_search.button'}
+%form{:class => 'form_search', :action => '/', :method => 'GET'}
+  %div
+    %div
+      %input{:type => 'search', :name => 'q', :value => @query_words, :required => true}
+    %div
+      %button== #{t 'form_search.button'}
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index