質問編集履歴
1
必要なコードが足りなかったため、コードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -54,6 +54,8 @@
|
|
54
54
|
|
55
55
|
```
|
56
56
|
|
57
|
+
検索機能部分(サイドカラム)
|
58
|
+
|
57
59
|
```html
|
58
60
|
|
59
61
|
<%= search_form_for @search, url: search_recipes_path do |f| %>
|
@@ -104,6 +106,70 @@
|
|
104
106
|
|
105
107
|
```
|
106
108
|
|
109
|
+
メインカラム(ページネーション)
|
110
|
+
|
111
|
+
```HTML
|
112
|
+
|
113
|
+
<div class="recipe-list jscroll">
|
114
|
+
|
115
|
+
<div class="columns is-multiline">
|
116
|
+
|
117
|
+
<% search_recipes.each do |recipe| %>
|
118
|
+
|
119
|
+
<div class="column is-3">
|
120
|
+
|
121
|
+
<div class="card">
|
122
|
+
|
123
|
+
<div class="card-image">
|
124
|
+
|
125
|
+
~中略~
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
<% end %>
|
134
|
+
|
135
|
+
<%= paginate search_recipes %>
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
サイドカラムとメインカラムをパーシャルで記載
|
144
|
+
|
145
|
+
```HTML
|
146
|
+
|
147
|
+
<section class="section">
|
148
|
+
|
149
|
+
<div class="container">
|
150
|
+
|
151
|
+
<div class="columns is-centered">
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<%= render 'recipes/サイドカラム', search_recipes: @search_recipes %>
|
156
|
+
|
157
|
+
~中略~
|
158
|
+
|
159
|
+
<%= render 'recipes/メインカラム', search_recipes: @search_recipes %>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
</section>
|
170
|
+
|
171
|
+
```
|
172
|
+
|
107
173
|
```Javascript
|
108
174
|
|
109
175
|
$(function() {
|