質問編集履歴

3

index.html.erbにclassを追加編集。出力結果を挿入

2019/01/08 08:07

投稿

-maeji-
-maeji-

スコア39

test CHANGED
File without changes
test CHANGED
@@ -195,3 +195,25 @@
195
195
  //= require bootstrap-sprockets
196
196
 
197
197
  ```
198
+
199
+
200
+
201
+
202
+
203
+ :追記
204
+
205
+ ![イメージ説明](688ae701159a9926b6237d60d1af50b4.png)
206
+
207
+
208
+
209
+ index.html.erb
210
+
211
+
212
+
213
+ ```
214
+
215
+ <h1>書籍一覧</h1>
216
+
217
+ <a href="#" class="btn btn-primary btn-lg active" role="button">Primary link</a>
218
+
219
+ ```

2

bootstrap導入時に編集したファイルとindexファイルの投稿

2019/01/08 08:07

投稿

-maeji-
-maeji-

スコア39

test CHANGED
File without changes
test CHANGED
@@ -37,3 +37,161 @@
37
37
  まずは出力された文字のレイアウトを整えたいのと、リンクのデザインをカッコ良くしたいです。
38
38
 
39
39
  よろしくお願いします。
40
+
41
+ ###index.html.erb
42
+
43
+ ```index.html.erb
44
+
45
+ <h1>書籍一覧</h1>
46
+
47
+
48
+
49
+ <%= link_to '新しい書籍を登録',new_book_path %>
50
+
51
+ <table>
52
+
53
+ <tr>
54
+
55
+ <th>タイトル</th>
56
+
57
+ <th>テキスト</th>
58
+
59
+ <th colspan="3"></th>
60
+
61
+ </tr>
62
+
63
+
64
+
65
+ <% @books.each do |book| %>
66
+
67
+ <tr>
68
+
69
+ <td><%= book.title %></td>
70
+
71
+ <td><%= book.text %></td>
72
+
73
+ <td><%= link_to '表示',book_path(book) %></td>
74
+
75
+ <td><%= link_to '編集',edit_book_path(book) %></td>
76
+
77
+ <td><%= link_to '削除',book_path(book),
78
+
79
+ method: :delete,
80
+
81
+ data: {confirm: '本当に削除してもいいですか?'} %>
82
+
83
+ </td>
84
+
85
+ </tr>
86
+
87
+ <% end %>
88
+
89
+ </table>
90
+
91
+ ```
92
+
93
+
94
+
95
+ ###gemfile
96
+
97
+
98
+
99
+ ```#gemfile
100
+
101
+
102
+
103
+ gem 'bootstrap', '~> 4.2.1'
104
+
105
+ gem 'jquery-rails'
106
+
107
+ ```
108
+
109
+
110
+
111
+
112
+
113
+ ###application.scss
114
+
115
+
116
+
117
+ ```/*
118
+
119
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
120
+
121
+ * listed below.
122
+
123
+ *
124
+
125
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
126
+
127
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
128
+
129
+ *
130
+
131
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
132
+
133
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
134
+
135
+ * files in this directory. Styles in this file should be added after the last require_* statement.
136
+
137
+ * It is generally better to create a new file per style scope.
138
+
139
+ *
140
+
141
+ *= require_tree .
142
+
143
+ *= require_self
144
+
145
+ */
146
+
147
+ @import "bootstrap";
148
+
149
+ ```
150
+
151
+
152
+
153
+ ###application.js
154
+
155
+ ```
156
+
157
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
158
+
159
+ // listed below.
160
+
161
+ //
162
+
163
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
164
+
165
+ // vendor/assets/javascripts directory can be referenced here using a relative path.
166
+
167
+ //
168
+
169
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
170
+
171
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
172
+
173
+ //
174
+
175
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
176
+
177
+ // about supported directives.
178
+
179
+ //
180
+
181
+ //= require rails-ujs
182
+
183
+ //= require activestorage
184
+
185
+ //= require turbolinks
186
+
187
+ //= require_tree .
188
+
189
+
190
+
191
+ //= require jquery3
192
+
193
+ //= require popper
194
+
195
+ //= require bootstrap-sprockets
196
+
197
+ ```

1

目的を追加

2019/01/08 05:50

投稿

-maeji-
-maeji-

スコア39

test CHANGED
File without changes
test CHANGED
@@ -29,3 +29,11 @@
29
29
  --
30
30
 
31
31
  ![イメージ説明](e065bb645ea126bce3257212a3552051.png)
32
+
33
+
34
+
35
+ :追記
36
+
37
+ まずは出力された文字のレイアウトを整えたいのと、リンクのデザインをカッコ良くしたいです。
38
+
39
+ よろしくお願いします。