openBD 以外の利用しているAPIの説明を記述、 評価の表示ロジックを変更
authorOHASHI, Norikazu <katz@neko-mori.sakura.ne.jp>
Thu, 29 Apr 2021 03:08:41 +0000 (12:08 +0900)
committerOHASHI, Norikazu <katz@neko-mori.sakura.ne.jp>
Thu, 29 Apr 2021 03:08:41 +0000 (12:08 +0900)
.markdownlint.json [new file with mode: 0644]
readme.md
sinatra/app/views/book_info.haml
sinatra/app/views/book_regist.haml

diff --git a/.markdownlint.json b/.markdownlint.json
new file mode 100644 (file)
index 0000000..f2a375a
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "MD024": false
+}
index 9aa919f..74c0b29 100644 (file)
--- a/readme.md
+++ b/readme.md
 * 書誌情報の取得: `/get?isbn=ISBN,ISBN`
 * 収録範囲の取得: `/coverage`
 * JSONスキーマの取得: `/schema`
+
+### 国立国会図書館サーチ
+
+#### 参照URI
+
+[国立国会図書館サーチ](https://iss.ndl.go.jp/information/outline/)
+
+#### API仕様
+
+[API仕様の概要](https://iss.ndl.go.jp/information/api/riyou/)
+
+### GoogleBooks
+
+#### 参照URI
+
+[Google Books APIs](https://developers.google.com/books)
+
+#### API仕様
+
+* 書籍の探索: `GET https://www.googleapis.com/books/v1/volumes?q={search terms}`
index d2a2dab..a5dafd8 100644 (file)
         %th
           評価
         %td
-          - case book_info[:book_rank]
-          - when 0 then
-            .rank
-              ☆ ☆ ☆ ☆ ☆
-          - when 1 then
-            .rank
-              ★ ☆ ☆ ☆ ☆
-          - when 2 then
-            .rank
-              ★ ★ ☆ ☆ ☆
-          - when 3 then
-            .rank
-              ★ ★ ★ ☆ ☆
-          - when 4 then
-            .rank
-              ★ ★ ★ ★ ☆
-          - when 5 then
-            .rank
-              ★ ★ ★ ★ ★
+          #{"★"*book_info[:book_rank]+"☆"*(5-book_info[:book_rank])}
   .buttons
     %input{ :type => 'button', :class=>"push_button", :onclick =>"location.href='/book_edit/#{book_info[:isbn]}'", :value => '編集' }
     %input{ :type => 'button', :class=>"push_button", :onclick =>"location.href='/book_list/fromInfo'", :value => '一覧へ' }
index a99e3f9..bc3edec 100644 (file)
@@ -21,7 +21,7 @@
         「ISBN探索」を押下すると、該当する本の情報が取得できます。
 
     .message
-      ç\94»å±¤ファイルを指定して、「書影Upload」を押下すると、本の書影を登録できます。
+      ç\94»å\83\8fファイルを指定して、「書影Upload」を押下すると、本の書影を登録できます。
 
     - if warning
       .warning
               %span
                 書影:
             %input{ :name => 'cover_file', :type => 'file', :id => 'cover_file', :accept => 'image/png, image/jpeg', :style => "display:none"}
-            %input{ :type => 'text', :class => 'input_text', :id => 'file_name', :value => ''}
+p            %input{ :type => 'text', :class => 'input_text', :id => 'file_name', :value => ''}
             %input{ :type => 'submit', :class => 'side_button', :value => '書影Upload', :formaction => '/book_upload_cover' }
             :javascript
               var file = document.getElementById( 'cover_file' );