質問編集履歴
5
```修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
|
17
|
+
``` index
|
18
18
|
|
19
19
|
<div class="card">
|
20
20
|
|
@@ -72,4 +72,4 @@
|
|
72
72
|
|
73
73
|
<div>
|
74
74
|
|
75
|
-
|
75
|
+
```
|
4
削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,8 +72,4 @@
|
|
72
72
|
|
73
73
|
<div>
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
75
|
###
|
3
#追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
現在blumaというフレームワークを使って、
|
1
|
+
現在blumaというフレームワークを使って、一覧を横並びにしたいのですがどうしても下記のようなレイアウトになってしまいます。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -8,182 +8,72 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
+
|
12
|
+
|
11
|
-
https://gyazo.com/
|
13
|
+
https://gyazo.com/82fa2accf92419302d95c35b4bc7578c
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
### index
|
18
|
+
|
19
|
+
<div class="card">
|
20
|
+
|
21
|
+
<% @blogs.each do |blog|%>
|
22
|
+
|
23
|
+
<div class="card-image">
|
24
|
+
|
25
|
+
<%= link_to blog_path(blog) do %>
|
26
|
+
|
27
|
+
<%= attachment_image_tag blog, :image %><br>
|
28
|
+
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="card-content">
|
34
|
+
|
35
|
+
<div class="media">
|
36
|
+
|
37
|
+
<div class="media-content">
|
38
|
+
|
39
|
+
<%= link_to blog.user.username,user_path(blog.user.id) %><br>
|
40
|
+
|
41
|
+
<%= blog.updated_at.strftime("%Y-%m-%d %H:%M") %>更新<br>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<% if current_user.already_favarited?(blog) %>
|
50
|
+
|
51
|
+
<%= link_to blog_favarites_path(blog), method: :delete do %>
|
52
|
+
|
53
|
+
<i class="fas fa-heart"></i>
|
54
|
+
|
55
|
+
<% end %>
|
56
|
+
|
57
|
+
<% else %>
|
58
|
+
|
59
|
+
<%= link_to blog_favarites_path(blog), method: :post do %>
|
60
|
+
|
61
|
+
<i class="far fa-heart"></i>
|
62
|
+
|
63
|
+
<% end %>
|
64
|
+
|
65
|
+
<%= blog.favarites.count %>
|
66
|
+
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div>
|
12
74
|
|
13
75
|
|
14
76
|
|
15
77
|
|
16
78
|
|
17
|
-
### application
|
18
|
-
|
19
|
-
<!DOCTYPE html>
|
20
|
-
|
21
|
-
<html>
|
22
|
-
|
23
|
-
<head>
|
24
|
-
|
25
|
-
<title>Ourblog</title>
|
26
|
-
|
27
|
-
<%= csrf_meta_tags %>
|
28
|
-
|
29
|
-
<%= csp_meta_tag %>
|
30
|
-
|
31
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
<link href="https://use.fontawesome.com/releases/v5.15.1/css/all.css" rel="stylesheet">
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
40
|
-
|
41
|
-
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
42
|
-
|
43
|
-
</head>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<body>
|
48
|
-
|
49
|
-
<% if flash[:notice] %>
|
50
|
-
|
51
|
-
<div class="notification is-info">
|
52
|
-
|
53
|
-
<p class="notice"><%= notice %></p>
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<% end %>
|
58
|
-
|
59
|
-
<% if flash[:alert] %>
|
60
|
-
|
61
|
-
<div class="notification is-danger">
|
62
|
-
|
63
|
-
<p class="alert"><%= alert %></p>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
|
67
|
-
<% end %>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
<nav class="navbar" role="navigation" aria-label="main navigation">
|
72
|
-
|
73
|
-
<div class="navbar-brand">
|
74
|
-
|
75
|
-
<a class="navbar-item" href="https://bulma.io"></a>
|
76
|
-
|
77
|
-
<%= link_to root_path, class: "navbar-item" do %>
|
78
|
-
|
79
|
-
<h1 class="title is-4" style="font-family: cursive;">ourblog</h1>
|
80
|
-
|
81
|
-
<% end %>
|
82
|
-
|
83
|
-
</a>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
<div id="navbarBasicExample" class="navbar-menu">
|
92
|
-
|
93
|
-
<div class="navbar-start">
|
94
|
-
|
95
|
-
<% if user_signed_in? %>
|
96
|
-
|
97
|
-
<a class="navbar-item">
|
98
|
-
|
99
|
-
<%= link_to "投稿者一覧", users_path, class: " button is-warning is-light" %>
|
100
|
-
|
101
|
-
</a>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<a class="navbar-item">
|
106
|
-
|
107
|
-
<%= link_to "マイページ", user_path(current_user), class: "button is-warning is-light" %>
|
108
|
-
|
109
|
-
</a>
|
110
|
-
|
111
|
-
<a class="navbar-item">
|
112
|
-
|
113
|
-
<%= link_to "ブログ一覧", blogs_path, class: "navbar-item button is-warning is-light" %>
|
114
|
-
|
115
|
-
</a>
|
116
|
-
|
117
|
-
<a class="navbar-item">
|
118
|
-
|
119
|
-
<%= link_to "ブログ投稿", new_blog_path, class: "navbar-item button is-warning is-light" %>
|
120
|
-
|
121
|
-
</a>
|
122
|
-
|
123
|
-
<a class="navbar-item">
|
124
|
-
|
125
|
-
<%= link_to "ログアウト", destroy_user_session_path, method: :delete, class: "button is-warning is-light" %>
|
126
|
-
|
127
|
-
</a>
|
128
|
-
|
129
|
-
<a class="navbar-item">
|
130
|
-
|
131
|
-
<%= form_with(url: search_blogs_path, local: true, method: :get, class: "search-form") do |form| %>
|
132
|
-
|
133
|
-
<%= form.text_field :keyword, placeholder: "投稿を検索する", class: "search-input" %>
|
134
|
-
|
135
|
-
<%= form.submit "検索", class: "search-btn" %>
|
136
|
-
|
137
|
-
</a>
|
138
|
-
|
139
|
-
<% end %>
|
140
|
-
|
141
|
-
<% else %>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
<div class="navbar-end">
|
146
|
-
|
147
|
-
<div class="navbar-item">
|
148
|
-
|
149
|
-
<a class="navbar-item">
|
150
|
-
|
151
|
-
<%= link_to "ブログ投稿一覧", users_path, class: "navbar-item button is-warning is-light" %>
|
152
|
-
|
153
|
-
</a>
|
154
|
-
|
155
|
-
<div class="buttons">
|
156
|
-
|
157
|
-
<a class="button is-primary">
|
158
|
-
|
159
|
-
<%= link_to "新規登録", new_user_registration_path, class: "button is-warning is-light" %>
|
160
|
-
|
161
|
-
</a>
|
162
|
-
|
163
|
-
<a class="button is-light">
|
164
|
-
|
165
|
-
<%= link_to "ログイン", new_user_session_path, class: "button is-warning is-light" %>
|
166
|
-
|
167
|
-
</a>
|
168
|
-
|
169
|
-
</div>
|
170
|
-
|
171
|
-
</div>
|
172
|
-
|
173
|
-
</div>
|
174
|
-
|
175
|
-
</div>
|
176
|
-
|
177
|
-
</nav>
|
178
|
-
|
179
|
-
<% end %>
|
180
|
-
|
181
|
-
<%= yield %>
|
182
|
-
|
183
|
-
</body>
|
184
|
-
|
185
|
-
</html>
|
186
|
-
|
187
|
-
|
188
|
-
|
189
79
|
###
|
2
HTML追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
###削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,11 +8,9 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
###
|
12
|
-
|
13
11
|
https://gyazo.com/e17e90f7eec534fefa27760329f7924e
|
14
12
|
|
15
|
-
|
13
|
+
|
16
14
|
|
17
15
|
|
18
16
|
|