質問編集履歴
22
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -122,4 +122,52 @@
|
|
122
122
|
【_micropost.html.erb】
|
123
123
|
```
|
124
124
|
////省略////
|
125
|
+
```
|
126
|
+
|
127
|
+
###解決できたコード
|
128
|
+
|
129
|
+
【_feed.html.erb】
|
130
|
+
```
|
131
|
+
<% if @feed_items.any? %>
|
132
|
+
<ol class="microposts">
|
133
|
+
<%= render @feed_items %>
|
134
|
+
</ol>
|
135
|
+
<%= will_paginate @feed_items %>
|
136
|
+
<% end %>
|
137
|
+
<script>
|
138
|
+
$(document).ready(function() {
|
139
|
+
var showChar = 25;
|
140
|
+
var ellipsestext = "...";
|
141
|
+
var moretext = "more";
|
142
|
+
var lesstext = "less";
|
143
|
+
$('.more').each(function() {
|
144
|
+
var content = $.trim($(this).html());
|
145
|
+
|
146
|
+
if(content.length > showChar) {
|
147
|
+
|
148
|
+
var c = content.substr(0, showChar);
|
149
|
+
var h = content.substr(showChar, content.length - showChar);
|
150
|
+
|
151
|
+
var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>';
|
152
|
+
|
153
|
+
$(this).html(html);
|
154
|
+
}
|
155
|
+
|
156
|
+
});
|
157
|
+
|
158
|
+
$(".morelink").click(function(){
|
159
|
+
if($(this).hasClass("less")) {
|
160
|
+
$(this).removeClass("less");
|
161
|
+
$(this).html(moretext);
|
162
|
+
} else {
|
163
|
+
$(this).addClass("less");
|
164
|
+
$(this).html(lesstext);
|
165
|
+
}
|
166
|
+
$(this).parent().prev().toggle();
|
167
|
+
$(this).prev().toggle();
|
168
|
+
return false;
|
169
|
+
});
|
170
|
+
});
|
171
|
+
</script>
|
172
|
+
|
125
173
|
```
|
21
情報修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -98,147 +98,28 @@
|
|
98
98
|
|
99
99
|
kei344さんへ
|
100
100
|
|
101
|
+
【index.html.erb】
|
102
|
+
|
101
103
|
```
|
102
|
-
<
|
104
|
+
<div class="col-md-8">
|
105
|
+
<h3>Micropost Feed</h3>
|
106
|
+
<%= render 'shared/feed' %>
|
107
|
+
</div>
|
108
|
+
```
|
109
|
+
↓
|
110
|
+
【_feed.html.erb】
|
103
111
|
|
104
|
-
<!-- ユーザーアイコン -->
|
105
|
-
<a href="/users/1"><img alt="名前なので伏せます" class="gravatar" src="https://secure.gravatar.com/avatar/4c1486a659e37659c9473f14cdae1ccf?s=50" /></a>
|
106
|
-
|
107
|
-
|
112
|
+
```
|
108
|
-
<!-- User名 -->
|
109
|
-
<span class="user"><a href="/users/1">名前なので伏せます</a></span>
|
110
|
-
|
111
|
-
|
113
|
+
<% if @feed_items.any? %>
|
112
|
-
<span class="content">
|
113
|
-
<!-- 投稿文 -->
|
114
|
-
|
114
|
+
<ol class="microposts">
|
115
|
-
|
115
|
+
<%= render @feed_items %>
|
116
|
-
|
116
|
+
</ol>
|
117
|
+
<%= will_paginate @feed_items %>
|
117
|
-
|
118
|
+
<% end %>
|
118
|
-
|
119
|
-
|
119
|
+
```
|
120
|
-
<!-- 投稿時間 -->
|
121
|
-
<span class="timestamp">
|
122
|
-
Posted about 17 hours ago.
|
123
|
-
</span>
|
124
120
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<!-- お気に入り登録リンク user-to-micropost.user-->
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<a href="/microposts/14">コメントを見る</a>
|
136
|
-
|
137
|
-
</li>
|
138
|
-
<script>
|
139
|
-
$(document).ready(function() {
|
140
|
-
var showChar = 25;
|
141
|
-
var ellipsestext = "...";
|
142
|
-
var moretext = "more";
|
143
|
-
var lesstext = "less";
|
144
|
-
$('.more').each(function() {
|
145
|
-
var content = $.trim($(this).html());
|
146
|
-
|
147
|
-
if(content.length > showChar) {
|
148
|
-
|
149
|
-
var c = content.substr(0, showChar);
|
150
|
-
var h = content.substr(showChar, content.length - showChar);
|
151
|
-
|
152
|
-
var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>';
|
153
|
-
|
154
|
-
$(this).html(html);
|
155
|
-
}
|
156
|
-
|
157
|
-
});
|
158
|
-
|
159
|
-
$(".morelink").click(function(){
|
160
|
-
if($(this).hasClass("less")) {
|
161
|
-
$(this).removeClass("less");
|
162
|
-
$(this).html(moretext);
|
163
|
-
} else {
|
164
|
-
$(this).addClass("less");
|
165
|
-
$(this).html(lesstext);
|
166
|
-
}
|
167
|
-
$(this).parent().prev().toggle();
|
168
|
-
$(this).prev().toggle();
|
169
|
-
return false;
|
170
|
-
});
|
171
|
-
});
|
172
|
-
</script>
|
173
|
-
<li id="micropost-13">
|
174
|
-
|
175
|
-
<!-- ユーザーアイコン -->
|
176
|
-
<a href="/users/1"><img alt="名前なので伏せます" class="gravatar" src="https://secure.gravatar.com/avatar/4c1486a659e37659c9473f14cdae1ccf?s=50" /></a>
|
177
|
-
|
178
|
-
<!-- ユーザー名 -->
|
179
|
-
<!-- User名 -->
|
180
|
-
<span class="user"><a href="/users/1">名前なので伏せます</a></span>
|
181
|
-
|
182
|
-
<!-- User/Shop 共通 -->
|
183
|
-
<span class="content">
|
184
|
-
<!-- 投稿文 -->
|
185
|
-
<div class="more">
|
186
|
-
テストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテスト
|
187
|
-
</div>
|
188
|
-
<!-- 投稿写真 -->
|
189
|
-
|
190
|
-
</span>
|
191
|
-
<!-- 投稿時間 -->
|
192
|
-
<span class="timestamp">
|
193
|
-
Posted about 18 hours ago.
|
194
|
-
</span>
|
195
|
-
|
196
|
-
|
197
|
-
<!-- 削除リンク User ver-->
|
198
|
-
<a data-confirm="You sure?" rel="nofollow" data-method="delete" href="/microposts/13">delete</a>
|
199
|
-
|
200
|
-
<!-- お気に入り登録リンク user-to-micropost.user-->
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
<a href="/microposts/13">コメントを見る</a>
|
207
|
-
|
208
|
-
</li>
|
209
|
-
<script>
|
210
|
-
$(document).ready(function() {
|
211
|
-
var showChar = 25;
|
212
|
-
var ellipsestext = "...";
|
213
|
-
var moretext = "more";
|
214
|
-
var lesstext = "less";
|
215
|
-
$('.more').each(function() {
|
216
|
-
var content = $.trim($(this).html());
|
217
|
-
|
218
|
-
if(content.length > showChar) {
|
219
|
-
|
220
|
-
var c = content.substr(0, showChar);
|
221
|
-
var h = content.substr(showChar, content.length - showChar);
|
222
|
-
|
223
|
-
var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>';
|
224
|
-
|
225
|
-
$(this).html(html);
|
226
|
-
}
|
227
|
-
|
228
|
-
});
|
229
|
-
|
230
|
-
$(".morelink").click(function(){
|
231
|
-
if($(this).hasClass("less")) {
|
232
|
-
$(this).removeClass("less");
|
233
|
-
$(this).html(moretext);
|
234
|
-
} else {
|
235
|
-
$(this).addClass("less");
|
236
|
-
$(this).html(lesstext);
|
237
|
-
}
|
238
|
-
$(this).parent().prev().toggle();
|
239
|
-
$(this).prev().toggle();
|
240
|
-
return false;
|
241
|
-
});
|
242
|
-
});
|
243
|
-
</script>
|
121
|
+
↓
|
122
|
+
【_micropost.html.erb】
|
123
|
+
```
|
124
|
+
////省略////
|
244
125
|
```
|
20
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -96,79 +96,44 @@
|
|
96
96
|
|
97
97
|
###ソースコード
|
98
98
|
|
99
|
+
kei344さんへ
|
100
|
+
|
99
101
|
```
|
100
|
-
<li id="micropost-
|
102
|
+
<li id="micropost-14">
|
101
103
|
|
102
104
|
<!-- ユーザーアイコン -->
|
103
|
-
<% if micropost.shop.nil? %>
|
104
|
-
<
|
105
|
+
<a href="/users/1"><img alt="名前なので伏せます" class="gravatar" src="https://secure.gravatar.com/avatar/4c1486a659e37659c9473f14cdae1ccf?s=50" /></a>
|
105
|
-
<% elsif micropost.user.nil? %>
|
106
|
-
<%= link_to gravatar_to(micropost.shop, size: 50), micropost.shop %>
|
107
|
-
<% end %>
|
108
106
|
|
109
107
|
<!-- ユーザー名 -->
|
110
|
-
<% if micropost.shop.nil? %>
|
111
108
|
<!-- User名 -->
|
112
|
-
<span class="user"><
|
109
|
+
<span class="user"><a href="/users/1">名前なので伏せます</a></span>
|
113
|
-
<% elsif micropost.user.nil? %>
|
114
|
-
<!-- Shop名 -->
|
115
|
-
<span class="user"><%= link_to micropost.shop.shopname, micropost.shop %></span>
|
116
|
-
<% end %>
|
117
110
|
|
118
111
|
<!-- User/Shop 共通 -->
|
119
112
|
<span class="content">
|
120
113
|
<!-- 投稿文 -->
|
121
114
|
<div class="more">
|
122
|
-
|
115
|
+
123456789abcdefghijklmnopqrstuvwxyz
|
123
116
|
</div>
|
124
117
|
<!-- 投稿写真 -->
|
125
|
-
|
118
|
+
|
126
119
|
</span>
|
127
120
|
<!-- 投稿時間 -->
|
128
121
|
<span class="timestamp">
|
129
|
-
Posted
|
122
|
+
Posted about 17 hours ago.
|
130
123
|
</span>
|
131
124
|
|
132
125
|
|
133
|
-
<% if user_signed_in? %>
|
134
126
|
<!-- 削除リンク User ver-->
|
135
|
-
<% if current_user?(micropost.user) %>
|
136
|
-
<
|
127
|
+
<a data-confirm="You sure?" rel="nofollow" data-method="delete" href="/microposts/14">delete</a>
|
137
|
-
<% end %>
|
138
128
|
|
139
129
|
<!-- お気に入り登録リンク user-to-micropost.user-->
|
140
|
-
<% if micropost.shop.nil? %>
|
141
|
-
<% if !current_user?(micropost.user) %>
|
142
|
-
<%= render 'evaluates/evaluate_links', micropost: micropost %>
|
143
|
-
<% end %>
|
144
130
|
|
145
|
-
<% elsif micropost.user.nil? %>
|
146
|
-
<!-- いいね!リンク user-to-micropost.shop -->
|
147
|
-
<% if !current_user?(micropost.user) %>
|
148
|
-
<%= render 'praises/praise_links', micropost: micropost %>
|
149
|
-
<% end %>
|
150
|
-
<% end %>
|
151
131
|
|
152
132
|
|
153
133
|
|
154
|
-
<% elsif shop_signed_in? %>
|
155
|
-
<!-- 削除リンク Shop ver-->
|
156
|
-
<% if current_shop?(micropost.shop) %>
|
157
|
-
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
158
|
-
<% end %>
|
159
134
|
|
160
|
-
<% if micropost.shop.nil? %>
|
161
|
-
#パーシャル
|
162
|
-
<% end %>
|
163
|
-
|
164
|
-
<
|
135
|
+
<a href="/microposts/14">コメントを見る</a>
|
165
|
-
#リンク
|
166
|
-
#パーシャル
|
167
|
-
<% end %>
|
168
|
-
|
169
136
|
|
170
|
-
<% end %>
|
171
|
-
#リンク
|
172
137
|
</li>
|
173
138
|
<script>
|
174
139
|
$(document).ready(function() {
|
@@ -205,82 +170,75 @@
|
|
205
170
|
});
|
206
171
|
});
|
207
172
|
</script>
|
208
|
-
|
173
|
+
<li id="micropost-13">
|
209
174
|
|
175
|
+
<!-- ユーザーアイコン -->
|
176
|
+
<a href="/users/1"><img alt="名前なので伏せます" class="gravatar" src="https://secure.gravatar.com/avatar/4c1486a659e37659c9473f14cdae1ccf?s=50" /></a>
|
177
|
+
|
178
|
+
<!-- ユーザー名 -->
|
210
|
-
|
179
|
+
<!-- User名 -->
|
211
|
-
|
180
|
+
<span class="user"><a href="/users/1">名前なので伏せます</a></span>
|
181
|
+
|
212
|
-
|
182
|
+
<!-- User/Shop 共通 -->
|
213
|
-
|
183
|
+
<span class="content">
|
214
|
-
|
184
|
+
<!-- 投稿文 -->
|
215
|
-
|
185
|
+
<div class="more">
|
216
|
-
|
186
|
+
テストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテスト
|
217
|
-
|
187
|
+
</div>
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
188
|
+
<!-- 投稿写真 -->
|
189
|
+
|
190
|
+
</span>
|
191
|
+
<!-- 投稿時間 -->
|
223
|
-
|
192
|
+
<span class="timestamp">
|
193
|
+
Posted about 18 hours ago.
|
194
|
+
</span>
|
224
195
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
</br>
|
274
|
-
<p><%= insist.body %></p>
|
275
|
-
<% if shop_signed_in? && insist.shop == current_shop %>
|
276
|
-
<p><%= link_to 'Delete', insist_path(insist), method: :delete %></p>
|
277
|
-
<% end %>
|
278
|
-
</div>
|
279
|
-
<% end %>
|
280
|
-
<% if shop_signed_in? %>
|
281
|
-
<%= render 'insists/form' %>
|
282
|
-
<% end %>
|
283
|
-
</div>
|
284
|
-
</aside>
|
285
|
-
</div>
|
196
|
+
|
197
|
+
<!-- 削除リンク User ver-->
|
198
|
+
<a data-confirm="You sure?" rel="nofollow" data-method="delete" href="/microposts/13">delete</a>
|
199
|
+
|
200
|
+
<!-- お気に入り登録リンク user-to-micropost.user-->
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<a href="/microposts/13">コメントを見る</a>
|
207
|
+
|
208
|
+
</li>
|
209
|
+
<script>
|
210
|
+
$(document).ready(function() {
|
211
|
+
var showChar = 25;
|
212
|
+
var ellipsestext = "...";
|
213
|
+
var moretext = "more";
|
214
|
+
var lesstext = "less";
|
215
|
+
$('.more').each(function() {
|
216
|
+
var content = $.trim($(this).html());
|
217
|
+
|
218
|
+
if(content.length > showChar) {
|
219
|
+
|
220
|
+
var c = content.substr(0, showChar);
|
221
|
+
var h = content.substr(showChar, content.length - showChar);
|
222
|
+
|
223
|
+
var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>';
|
224
|
+
|
225
|
+
$(this).html(html);
|
226
|
+
}
|
227
|
+
|
228
|
+
});
|
229
|
+
|
230
|
+
$(".morelink").click(function(){
|
231
|
+
if($(this).hasClass("less")) {
|
232
|
+
$(this).removeClass("less");
|
233
|
+
$(this).html(moretext);
|
234
|
+
} else {
|
235
|
+
$(this).addClass("less");
|
236
|
+
$(this).html(lesstext);
|
237
|
+
}
|
238
|
+
$(this).parent().prev().toggle();
|
239
|
+
$(this).prev().toggle();
|
240
|
+
return false;
|
241
|
+
});
|
242
|
+
});
|
243
|
+
</script>
|
286
244
|
```
|
19
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,67 +43,6 @@
|
|
43
43
|
後、数文字表示される予定なのですが…
|
44
44
|
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
###該当のソースコード
|
51
|
-
|
52
|
-
|
53
|
-
<!-- 投稿文 -->
|
54
|
-
```ruby
|
55
|
-
<div class="more">
|
56
|
-
<%= micropost.content %>
|
57
|
-
</div>
|
58
|
-
```
|
59
|
-
|
60
|
-
```javascript
|
61
|
-
<script>
|
62
|
-
$(document).ready(function() {
|
63
|
-
var showChar = 25; ←閉じている時に表示される文字数
|
64
|
-
var ellipsestext = "...";
|
65
|
-
var moretext = "more";
|
66
|
-
var lesstext = "less";
|
67
|
-
$('.more').each(function() {
|
68
|
-
var content = $(this).html();
|
69
|
-
|
70
|
-
if(content.length > showChar) {
|
71
|
-
|
72
|
-
var c = content.substr(0, showChar); ←閉じている時に表示される文字
|
73
|
-
var h = content.substr(showChar, content.length - showChar); ←開いたときに表示される文字
|
74
|
-
|
75
|
-
var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>'; ←投稿文が開ているときと閉じている時の表示内容
|
76
|
-
|
77
|
-
$(this).html(html);
|
78
|
-
}
|
79
|
-
|
80
|
-
});
|
81
|
-
|
82
|
-
$(".morelink").click(function(){
|
83
|
-
if($(this).hasClass("less")) {
|
84
|
-
$(this).removeClass("less");
|
85
|
-
$(this).html(moretext);
|
86
|
-
} else {
|
87
|
-
$(this).addClass("less");
|
88
|
-
$(this).html(lesstext);
|
89
|
-
}
|
90
|
-
$(this).parent().prev().toggle();
|
91
|
-
$(this).prev().toggle();
|
92
|
-
return false;
|
93
|
-
});
|
94
|
-
});
|
95
|
-
</script>
|
96
|
-
```
|
97
|
-
|
98
|
-
|
99
|
-
```css
|
100
|
-
.morecontent span {
|
101
|
-
display: none;
|
102
|
-
}
|
103
|
-
```
|
104
|
-
|
105
|
-
|
106
|
-
|
107
46
|
ご教示ください。お願いします。
|
108
47
|
|
109
48
|
###<情報追加>
|
@@ -119,10 +58,7 @@
|
|
119
58
|
==================================
|
120
59
|
|
121
60
|
|
122
|
-
cssコードは消しました。
|
123
|
-
sii_sideさん、kei344さんへ!
|
124
61
|
|
125
|
-
|
126
62
|
【エラー当初の出力内容】----------------------------------------------------
|
127
63
|
|
128
64
|

|
@@ -144,36 +80,45 @@
|
|
144
80
|
|
145
81
|
---------------------------------------------------------------------------
|
146
82
|
|
147
|
-
【sii-sideさんの指摘を受けてコード変更し、出力したときのブラウザ】^^^^^^^^^^^^^^^^^^^^
|
148
|
-
|
83
|
+
###追加の追加
|
149
84
|
|
150
|
-
|
85
|
+
_micropost.html.erbでは開閉は機能しませんでしたが、
|
86
|
+
show.html.erbでは機能しました。
|
151
87
|
|
152
|
-
【このときの出力表示】
|
153
|
-
|
88
|
+
_micropost.html.erbはshow.html.erbのパーシャルですので、
|
89
|
+
コード内容には差がないのですが…
|
154
90
|
|
155
|
-
↓
|
156
|
-
|
91
|
+
【moreを押す前】
|
157
|
-
↓
|
158
|
-

|
159
93
|
|
94
|
+
【moreを押した後】
|
95
|
+

|
96
|
+
|
160
|
-
|
97
|
+
###ソースコード
|
98
|
+
|
161
99
|
```
|
100
|
+
<li id="micropost-<%= micropost.id %>">
|
101
|
+
|
102
|
+
<!-- ユーザーアイコン -->
|
103
|
+
<% if micropost.shop.nil? %>
|
104
|
+
<%= link_to gravatar_for(micropost.user, size: 50), micropost.user %>
|
105
|
+
<% elsif micropost.user.nil? %>
|
106
|
+
<%= link_to gravatar_to(micropost.shop, size: 50), micropost.shop %>
|
107
|
+
<% end %>
|
108
|
+
|
109
|
+
<!-- ユーザー名 -->
|
110
|
+
<% if micropost.shop.nil? %>
|
111
|
+
<!-- User名 -->
|
112
|
+
<span class="user"><%= link_to micropost.user.username, micropost.user %></span>
|
113
|
+
<% elsif micropost.user.nil? %>
|
114
|
+
<!-- Shop名 -->
|
115
|
+
<span class="user"><%= link_to micropost.shop.shopname, micropost.shop %></span>
|
116
|
+
<% end %>
|
117
|
+
|
162
118
|
<!-- User/Shop 共通 -->
|
163
119
|
<span class="content">
|
164
120
|
<!-- 投稿文 -->
|
165
121
|
<div class="more">
|
166
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
167
|
-
</div>
|
168
|
-
|
169
|
-
<div class="more">
|
170
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
171
|
-
</div>
|
172
|
-
|
173
|
-
<div class="more">
|
174
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
175
|
-
</div>
|
176
|
-
<div class="more">
|
177
122
|
<%= micropost.content %>
|
178
123
|
</div>
|
179
124
|
<!-- 投稿写真 -->
|
@@ -183,5 +128,159 @@
|
|
183
128
|
<span class="timestamp">
|
184
129
|
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
|
185
130
|
</span>
|
131
|
+
|
132
|
+
|
133
|
+
<% if user_signed_in? %>
|
134
|
+
<!-- 削除リンク User ver-->
|
135
|
+
<% if current_user?(micropost.user) %>
|
136
|
+
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
137
|
+
<% end %>
|
138
|
+
|
139
|
+
<!-- お気に入り登録リンク user-to-micropost.user-->
|
140
|
+
<% if micropost.shop.nil? %>
|
141
|
+
<% if !current_user?(micropost.user) %>
|
142
|
+
<%= render 'evaluates/evaluate_links', micropost: micropost %>
|
143
|
+
<% end %>
|
144
|
+
|
145
|
+
<% elsif micropost.user.nil? %>
|
146
|
+
<!-- いいね!リンク user-to-micropost.shop -->
|
147
|
+
<% if !current_user?(micropost.user) %>
|
148
|
+
<%= render 'praises/praise_links', micropost: micropost %>
|
149
|
+
<% end %>
|
150
|
+
<% end %>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<% elsif shop_signed_in? %>
|
155
|
+
<!-- 削除リンク Shop ver-->
|
156
|
+
<% if current_shop?(micropost.shop) %>
|
157
|
+
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
158
|
+
<% end %>
|
159
|
+
|
160
|
+
<% if micropost.shop.nil? %>
|
161
|
+
#パーシャル
|
162
|
+
<% end %>
|
163
|
+
|
164
|
+
<% elsif micropost.user.nil? %>
|
165
|
+
#リンク
|
166
|
+
#パーシャル
|
167
|
+
<% end %>
|
168
|
+
|
169
|
+
|
170
|
+
<% end %>
|
171
|
+
#リンク
|
172
|
+
</li>
|
173
|
+
<script>
|
174
|
+
$(document).ready(function() {
|
175
|
+
var showChar = 25;
|
176
|
+
var ellipsestext = "...";
|
177
|
+
var moretext = "more";
|
178
|
+
var lesstext = "less";
|
179
|
+
$('.more').each(function() {
|
180
|
+
var content = $.trim($(this).html());
|
181
|
+
|
182
|
+
if(content.length > showChar) {
|
183
|
+
|
184
|
+
var c = content.substr(0, showChar);
|
185
|
+
var h = content.substr(showChar, content.length - showChar);
|
186
|
+
|
187
|
+
var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>';
|
188
|
+
|
189
|
+
$(this).html(html);
|
190
|
+
}
|
191
|
+
|
192
|
+
});
|
193
|
+
|
194
|
+
$(".morelink").click(function(){
|
195
|
+
if($(this).hasClass("less")) {
|
196
|
+
$(this).removeClass("less");
|
197
|
+
$(this).html(moretext);
|
198
|
+
} else {
|
199
|
+
$(this).addClass("less");
|
200
|
+
$(this).html(lesstext);
|
201
|
+
}
|
202
|
+
$(this).parent().prev().toggle();
|
203
|
+
$(this).prev().toggle();
|
204
|
+
return false;
|
205
|
+
});
|
206
|
+
});
|
207
|
+
</script>
|
186
208
|
```
|
209
|
+
|
210
|
+
【show.html.erb】
|
211
|
+
```
|
212
|
+
<div class="row">
|
213
|
+
<aside class="col-md-4">
|
214
|
+
<!-- 投稿 -->
|
215
|
+
<div class="col-md-8">
|
187
|
-
|
216
|
+
<%= render @micropost, micropost: @micropost %> ←micropost.html.erb
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
<!-- コメント -->
|
223
|
+
<div class="col-md-8">
|
224
|
+
|
225
|
+
<!-- user-to-micropost.user -->
|
226
|
+
|
227
|
+
<% @comments. each do |comment| %>
|
228
|
+
<div>
|
229
|
+
<strong><%= comment.user.username %></strong>
|
230
|
+
</br>
|
231
|
+
<p><%= comment.body %></p>
|
232
|
+
<% if user_signed_in? && comment.user == current_user %>
|
233
|
+
<p><%= link_to 'Delete', comment_path(comment), method: :delete %></p>
|
234
|
+
<% end %>
|
235
|
+
</div>
|
236
|
+
<% end %>
|
237
|
+
|
238
|
+
<!-- user-to-micropost.shop -->
|
239
|
+
|
240
|
+
<% @calls. each do |call| %>
|
241
|
+
<div>
|
242
|
+
<strong><%= call.user.username %></strong>
|
243
|
+
</br>
|
244
|
+
<p><%= call.body %></p>
|
245
|
+
<% if user_signed_in? && call.user == current_user %>
|
246
|
+
<p><%= link_to 'Delete', call_path(call), method: :delete %></p>
|
247
|
+
<% end %>
|
248
|
+
</div>
|
249
|
+
<% end %>
|
250
|
+
<% if user_signed_in? %>
|
251
|
+
<%= render 'calls/form' %>
|
252
|
+
<% end %>
|
253
|
+
<!-- shop-to-micropost.shop -->
|
254
|
+
<% @says. each do |say| %>
|
255
|
+
<div>
|
256
|
+
<strong><%= say.shop.shopname %></strong>
|
257
|
+
</br>
|
258
|
+
<p><%= say.body %></p>
|
259
|
+
<% if shop_signed_in? && say.shop == current_shop %>
|
260
|
+
<p><%= link_to 'Delete', say_path(say), method: :delete %></p>
|
261
|
+
<% end %>
|
262
|
+
</div>
|
263
|
+
<% end %>
|
264
|
+
<% if shop_signed_in? %>
|
265
|
+
<%= render 'says/form' %>
|
266
|
+
<% end %>
|
267
|
+
|
268
|
+
<!-- shop-to-micropost.shop -->
|
269
|
+
|
270
|
+
<% @insists. each do |insist| %>
|
271
|
+
<div>
|
272
|
+
<strong><%= insist.shop.shopname %></strong>
|
273
|
+
</br>
|
274
|
+
<p><%= insist.body %></p>
|
275
|
+
<% if shop_signed_in? && insist.shop == current_shop %>
|
276
|
+
<p><%= link_to 'Delete', insist_path(insist), method: :delete %></p>
|
277
|
+
<% end %>
|
278
|
+
</div>
|
279
|
+
<% end %>
|
280
|
+
<% if shop_signed_in? %>
|
281
|
+
<%= render 'insists/form' %>
|
282
|
+
<% end %>
|
283
|
+
</div>
|
284
|
+
</aside>
|
285
|
+
</div>
|
286
|
+
```
|
18
構成変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -108,18 +108,22 @@
|
|
108
108
|
|
109
109
|
###<情報追加>
|
110
110
|
|
111
|
+
==================================
|
112
|
+
|
111
113
|
・通常の投稿の文字数
|
112
114
|

|
113
115
|
|
114
116
|
・script記述後
|
115
117
|

|
116
118
|
|
119
|
+
==================================
|
117
120
|
|
121
|
+
|
118
122
|
cssコードは消しました。
|
119
123
|
sii_sideさん、kei344さんへ!
|
120
124
|
|
121
125
|
|
122
|
-
【エラー当初の出力内容】
|
126
|
+
【エラー当初の出力内容】----------------------------------------------------
|
123
127
|
|
124
128
|

|
125
129
|
|
@@ -138,8 +142,9 @@
|
|
138
142
|
↓
|
139
143
|

|
140
144
|
|
145
|
+
---------------------------------------------------------------------------
|
141
146
|
|
142
|
-
【sii-sideさんの指摘を受けてコード変更し、出力したときのブラウザ】
|
147
|
+
【sii-sideさんの指摘を受けてコード変更し、出力したときのブラウザ】^^^^^^^^^^^^^^^^^^^^
|
143
148
|

|
144
149
|
|
145
150
|
→moreを押しても隠された文字は表示されませんでした...
|
@@ -178,4 +183,5 @@
|
|
178
183
|
<span class="timestamp">
|
179
184
|
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
|
180
185
|
</span>
|
181
|
-
```
|
186
|
+
```
|
187
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
17
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -119,6 +119,7 @@
|
|
119
119
|
sii_sideさん、kei344さんへ!
|
120
120
|
|
121
121
|
|
122
|
+
【エラー当初の出力内容】
|
122
123
|
|
123
124
|

|
124
125
|
|
16
情報削除
title
CHANGED
File without changes
|
body
CHANGED
@@ -119,31 +119,7 @@
|
|
119
119
|
sii_sideさん、kei344さんへ!
|
120
120
|
|
121
121
|
|
122
|
-
【ブラウザ】
|
123
|
-

|
124
122
|
|
125
|
-
|
126
|
-
イメージとどう順に出力された内容を記述していますね!
|
127
|
-
|
128
|
-
```
|
129
|
-
<div class="more">
|
130
|
-
テストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテスト
|
131
|
-
</div>
|
132
|
-
```
|
133
|
-
|
134
|
-
```
|
135
|
-
<div class="more">
|
136
|
-
testtesttesttest
|
137
|
-
</div>
|
138
|
-
```
|
139
|
-
|
140
|
-
```
|
141
|
-
<div class="more">
|
142
|
-
TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTEST
|
143
|
-
</div>
|
144
|
-
```
|
145
|
-
|
146
|
-
|
147
123
|

|
148
124
|
|
149
125
|
↓
|
15
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -173,4 +173,32 @@
|
|
173
173
|
↓
|
174
174
|
投稿文までたどり着いたもの
|
175
175
|
↓
|
176
|
-

|
176
|
+

|
177
|
+
|
178
|
+
【div周辺コード】
|
179
|
+
```
|
180
|
+
<!-- User/Shop 共通 -->
|
181
|
+
<span class="content">
|
182
|
+
<!-- 投稿文 -->
|
183
|
+
<div class="more">
|
184
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div class="more">
|
188
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<div class="more">
|
192
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
193
|
+
</div>
|
194
|
+
<div class="more">
|
195
|
+
<%= micropost.content %>
|
196
|
+
</div>
|
197
|
+
<!-- 投稿写真 -->
|
198
|
+
<%= image_tag micropost.picture.url if micropost.picture? %>
|
199
|
+
</span>
|
200
|
+
<!-- 投稿時間 -->
|
201
|
+
<span class="timestamp">
|
202
|
+
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
|
203
|
+
</span>
|
204
|
+
```
|
14
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -159,4 +159,18 @@
|
|
159
159
|
↓
|
160
160
|
投稿文までたどり着きました。
|
161
161
|
↓
|
162
|
-

|
162
|
+

|
163
|
+
|
164
|
+
|
165
|
+
【sii-sideさんの指摘を受けてコード変更し、出力したときのブラウザ】
|
166
|
+

|
167
|
+
|
168
|
+
→moreを押しても隠された文字は表示されませんでした...
|
169
|
+
|
170
|
+
【このときの出力表示】
|
171
|
+

|
172
|
+
|
173
|
+
↓
|
174
|
+
投稿文までたどり着いたもの
|
175
|
+
↓
|
176
|
+

|
13
画像追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -153,4 +153,10 @@
|
|
153
153
|
|
154
154
|
|
155
155
|
【123456789abcdefghijklmnopqrstuvwxyzと投稿した場合】
|
156
|
-

|
156
|
+

|
157
|
+
|
158
|
+

|
159
|
+
↓
|
160
|
+
投稿文までたどり着きました。
|
161
|
+
↓
|
162
|
+

|
12
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -149,4 +149,8 @@
|
|
149
149
|
↓
|
150
150
|
投稿内容にたどり着きました
|
151
151
|
↓
|
152
|
-

|
152
|
+

|
153
|
+
|
154
|
+
|
155
|
+
【123456789abcdefghijklmnopqrstuvwxyzと投稿した場合】
|
156
|
+

|
11
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -144,4 +144,9 @@
|
|
144
144
|
```
|
145
145
|
|
146
146
|
|
147
|
-

|
147
|
+

|
148
|
+
|
149
|
+
↓
|
150
|
+
投稿内容にたどり着きました
|
151
|
+
↓
|
152
|
+

|
10
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -141,4 +141,7 @@
|
|
141
141
|
<div class="more">
|
142
142
|
TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTEST
|
143
143
|
</div>
|
144
|
-
```
|
144
|
+
```
|
145
|
+
|
146
|
+
|
147
|
+

|
9
情報修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -133,12 +133,12 @@
|
|
133
133
|
|
134
134
|
```
|
135
135
|
<div class="more">
|
136
|
-
|
136
|
+
testtesttesttest
|
137
137
|
</div>
|
138
138
|
```
|
139
139
|
|
140
140
|
```
|
141
141
|
<div class="more">
|
142
|
-
|
142
|
+
TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTEST
|
143
143
|
</div>
|
144
144
|
```
|
8
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
|
117
117
|
|
118
118
|
cssコードは消しました。
|
119
|
-
sii_sideさんへ!
|
119
|
+
sii_sideさん、kei344さんへ!
|
120
120
|
|
121
121
|
|
122
122
|
【ブラウザ】
|
7
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -118,108 +118,27 @@
|
|
118
118
|
cssコードは消しました。
|
119
119
|
sii_sideさんへ!
|
120
120
|
|
121
|
-
【投稿を出力するコード】
|
122
|
-
```
|
123
|
-
<li id="micropost-<%= micropost.id %>">
|
124
121
|
|
125
|
-
<!-- ユーザーアイコン -->
|
126
|
-
<% if micropost.shop.nil? %>
|
127
|
-
<%= link_to gravatar_for(micropost.user, size: 50), micropost.user %>
|
128
|
-
<% elsif micropost.user.nil? %>
|
129
|
-
<%= link_to gravatar_to(micropost.shop, size: 50), micropost.shop %>
|
130
|
-
|
122
|
+
【ブラウザ】
|
131
|
-
|
132
|
-
<!-- ユーザー名 -->
|
133
|
-
<% if micropost.shop.nil? %>
|
134
|
-
<!-- User名 -->
|
135
|
-
<span class="user"><%= link_to micropost.user.username, micropost.user %></span>
|
136
|
-
<% elsif micropost.user.nil? %>
|
137
|
-
<!-- Shop名 -->
|
138
|
-
<span class="user"><%= link_to micropost.shop.shopname, micropost.shop %></span>
|
139
|
-
<% end %>
|
140
|
-
|
141
|
-
<!-- User/Shop 共通 -->
|
142
|
-
<span class="content">
|
143
|
-
<!-- 投稿文 -->
|
144
|
-
<div class="more">
|
145
|
-
<%= micropost.content %>
|
146
|
-
</div>
|
147
|
-
<!-- 投稿写真 -->
|
148
|
-
<%= image_tag micropost.picture.url if micropost.picture? %>
|
149
|
-
</span>
|
150
|
-
<!-- 投稿時間 -->
|
151
|
-
|
123
|
+

|
152
|
-
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
|
153
|
-
</span>
|
154
124
|
|
155
125
|
|
156
|
-
<% if user_signed_in? %>
|
157
|
-
|
126
|
+
イメージとどう順に出力された内容を記述していますね!
|
158
|
-
<% if current_user?(micropost.user) %>
|
159
|
-
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
160
|
-
<% end %>
|
161
|
-
|
162
|
-
<!-- お気に入り登録リンク user-to-micropost.user-->
|
163
|
-
<% if micropost.shop.nil? %>
|
164
|
-
<% if !current_user?(micropost.user) %>
|
165
|
-
<%= render 'evaluates/evaluate_links', micropost: micropost %>
|
166
|
-
<% end %>
|
167
127
|
|
128
|
+
```
|
168
|
-
|
129
|
+
<div class="more">
|
169
|
-
<!-- いいね!リンク user-to-micropost.shop -->
|
170
|
-
<% if !current_user?(micropost.user) %>
|
171
|
-
|
130
|
+
テストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテストテスト
|
172
|
-
|
131
|
+
</div>
|
173
|
-
|
132
|
+
```
|
174
133
|
|
175
|
-
|
176
|
-
|
177
|
-
<% elsif shop_signed_in? %>
|
178
|
-
<!-- 削除リンク Shop ver-->
|
179
|
-
<% if current_shop?(micropost.shop) %>
|
180
|
-
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
181
|
-
<% end %>
|
182
|
-
|
183
|
-
<% if micropost.shop.nil? %>
|
184
|
-
<!-- お気に入り登録リンク shop-to-micropost.user-->
|
185
|
-
<% if !current_shop?(micropost.shop) %>
|
186
|
-
<%= render 'sympathizes/sympathize_links', micropost: micropost %>
|
187
|
-
<% end %>
|
188
|
-
|
189
|
-
<% elsif micropost.user.nil? %>
|
190
|
-
<!-- いいね!リンク shop-to-micropost.shop -->
|
191
|
-
<% if !current_shop?(micropost.shop) %>
|
192
|
-
<%= render 'likes/like_links', micropost: micropost %>
|
193
|
-
<% end %>
|
194
|
-
<% end %>
|
195
|
-
|
196
|
-
|
197
|
-
<% end %>
|
198
|
-
|
199
|
-
<%= link_to 'コメントを見る', micropost_path(micropost.id) %>
|
200
|
-
|
201
|
-
</li>
|
202
134
|
```
|
135
|
+
<div class="more">
|
136
|
+
TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTEST
|
137
|
+
</div>
|
138
|
+
```
|
203
139
|
|
204
|
-
【投稿フォームコード】
|
205
140
|
```
|
206
|
-
<%= form_for(@micropost, html: { multipart: true }) do |f| %>
|
207
|
-
<%= render 'shared/error_messages', object: f.object %>
|
208
|
-
|
141
|
+
<div class="more">
|
209
|
-
|
142
|
+
testtesttesttest
|
210
|
-
|
143
|
+
</div>
|
211
|
-
<%= f.submit "Post", class: "btn btn-primary" %>
|
212
|
-
<span class="picture">
|
213
|
-
<%= f.file_field :picture, accept: 'image/jpeg,image/gif,image/png' %>
|
214
|
-
</span>
|
215
|
-
<% end %>
|
216
|
-
|
217
|
-
<script type="text/javascript">
|
218
|
-
$('#micropost_picture').bind('change', function() {
|
219
|
-
var size_in_megabytes = this.files[0].size/1024/1024;
|
220
|
-
if (size_in_megabytes > 5) {
|
221
|
-
alert('Maximum file size is 5MB. Please choose a smaller file.');
|
222
|
-
}
|
223
|
-
});
|
224
|
-
</script>
|
225
144
|
```
|
6
情報修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -118,7 +118,7 @@
|
|
118
118
|
cssコードは消しました。
|
119
119
|
sii_sideさんへ!
|
120
120
|
|
121
|
-
【
|
121
|
+
【投稿を出力するコード】
|
122
122
|
```
|
123
123
|
<li id="micropost-<%= micropost.id %>">
|
124
124
|
|
5
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -199,4 +199,27 @@
|
|
199
199
|
<%= link_to 'コメントを見る', micropost_path(micropost.id) %>
|
200
200
|
|
201
201
|
</li>
|
202
|
+
```
|
203
|
+
|
204
|
+
【投稿フォームコード】
|
205
|
+
```
|
206
|
+
<%= form_for(@micropost, html: { multipart: true }) do |f| %>
|
207
|
+
<%= render 'shared/error_messages', object: f.object %>
|
208
|
+
<div class="field">
|
209
|
+
<%= f.text_area :content, placeholder: "Compose new micropost..." %>
|
210
|
+
</div>
|
211
|
+
<%= f.submit "Post", class: "btn btn-primary" %>
|
212
|
+
<span class="picture">
|
213
|
+
<%= f.file_field :picture, accept: 'image/jpeg,image/gif,image/png' %>
|
214
|
+
</span>
|
215
|
+
<% end %>
|
216
|
+
|
217
|
+
<script type="text/javascript">
|
218
|
+
$('#micropost_picture').bind('change', function() {
|
219
|
+
var size_in_megabytes = this.files[0].size/1024/1024;
|
220
|
+
if (size_in_megabytes > 5) {
|
221
|
+
alert('Maximum file size is 5MB. Please choose a smaller file.');
|
222
|
+
}
|
223
|
+
});
|
224
|
+
</script>
|
202
225
|
```
|
4
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -115,6 +115,9 @@
|
|
115
115
|

|
116
116
|
|
117
117
|
|
118
|
+
cssコードは消しました。
|
119
|
+
sii_sideさんへ!
|
120
|
+
|
118
121
|
【micropost.html.erb】
|
119
122
|
```
|
120
123
|
<li id="micropost-<%= micropost.id %>">
|
3
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -114,352 +114,86 @@
|
|
114
114
|
・script記述後
|
115
115
|

|
116
116
|
|
117
|
-
```css
|
118
|
-
@import "bootstrap-sprockets";
|
119
|
-
@import "bootstrap";
|
120
117
|
|
118
|
+
【micropost.html.erb】
|
119
|
+
```
|
121
|
-
|
120
|
+
<li id="micropost-<%= micropost.id %>">
|
122
121
|
|
122
|
+
<!-- ユーザーアイコン -->
|
123
|
+
<% if micropost.shop.nil? %>
|
124
|
+
<%= link_to gravatar_for(micropost.user, size: 50), micropost.user %>
|
125
|
+
<% elsif micropost.user.nil? %>
|
126
|
+
<%= link_to gravatar_to(micropost.shop, size: 50), micropost.shop %>
|
127
|
+
<% end %>
|
128
|
+
|
129
|
+
<!-- ユーザー名 -->
|
130
|
+
<% if micropost.shop.nil? %>
|
131
|
+
<!-- User名 -->
|
132
|
+
<span class="user"><%= link_to micropost.user.username, micropost.user %></span>
|
133
|
+
<% elsif micropost.user.nil? %>
|
134
|
+
<!-- Shop名 -->
|
135
|
+
<span class="user"><%= link_to micropost.shop.shopname, micropost.shop %></span>
|
136
|
+
<% end %>
|
137
|
+
|
123
|
-
|
138
|
+
<!-- User/Shop 共通 -->
|
139
|
+
<span class="content">
|
140
|
+
<!-- 投稿文 -->
|
141
|
+
<div class="more">
|
142
|
+
<%= micropost.content %>
|
143
|
+
</div>
|
144
|
+
<!-- 投稿写真 -->
|
145
|
+
<%= image_tag micropost.picture.url if micropost.picture? %>
|
146
|
+
</span>
|
147
|
+
<!-- 投稿時間 -->
|
148
|
+
<span class="timestamp">
|
149
|
+
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
|
150
|
+
</span>
|
124
151
|
|
125
|
-
@mixin box_sizing {
|
126
|
-
-moz-box-sizing: border-box;
|
127
|
-
-webkit-box-sizing: border-box;
|
128
|
-
box-sizing: border-box;
|
129
|
-
}
|
130
152
|
|
153
|
+
<% if user_signed_in? %>
|
131
|
-
|
154
|
+
<!-- 削除リンク User ver-->
|
155
|
+
<% if current_user?(micropost.user) %>
|
156
|
+
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
157
|
+
<% end %>
|
158
|
+
|
159
|
+
<!-- お気に入り登録リンク user-to-micropost.user-->
|
160
|
+
<% if micropost.shop.nil? %>
|
161
|
+
<% if !current_user?(micropost.user) %>
|
162
|
+
<%= render 'evaluates/evaluate_links', micropost: micropost %>
|
163
|
+
<% end %>
|
132
164
|
|
133
|
-
|
165
|
+
<% elsif micropost.user.nil? %>
|
166
|
+
<!-- いいね!リンク user-to-micropost.shop -->
|
167
|
+
<% if !current_user?(micropost.user) %>
|
168
|
+
<%= render 'praises/praise_links', micropost: micropost %>
|
134
|
-
|
169
|
+
<% end %>
|
135
|
-
|
170
|
+
<% end %>
|
136
171
|
|
172
|
+
|
173
|
+
|
137
|
-
|
174
|
+
<% elsif shop_signed_in? %>
|
175
|
+
<!-- 削除リンク Shop ver-->
|
176
|
+
<% if current_shop?(micropost.shop) %>
|
177
|
+
<%= link_to "delete", micropost, method: :delete, data: { confirm: "You sure?" } %>
|
138
|
-
|
178
|
+
<% end %>
|
179
|
+
|
180
|
+
<% if micropost.shop.nil? %>
|
181
|
+
<!-- お気に入り登録リンク shop-to-micropost.user-->
|
182
|
+
<% if !current_shop?(micropost.shop) %>
|
183
|
+
<%= render 'sympathizes/sympathize_links', micropost: micropost %>
|
139
|
-
|
184
|
+
<% end %>
|
185
|
+
|
186
|
+
<% elsif micropost.user.nil? %>
|
187
|
+
<!-- いいね!リンク shop-to-micropost.shop -->
|
188
|
+
<% if !current_shop?(micropost.shop) %>
|
189
|
+
<%= render 'likes/like_links', micropost: micropost %>
|
190
|
+
<% end %>
|
191
|
+
<% end %>
|
192
|
+
|
140
193
|
|
141
|
-
textarea {
|
142
|
-
|
194
|
+
<% end %>
|
195
|
+
|
143
|
-
|
196
|
+
<%= link_to 'コメントを見る', micropost_path(micropost.id) %>
|
144
197
|
|
145
|
-
.center {
|
146
|
-
text-align: center;
|
147
|
-
h1 {
|
148
|
-
margin-bottom: 10px;
|
149
|
-
}
|
150
|
-
}
|
151
|
-
|
152
|
-
/* typography */
|
153
|
-
|
154
|
-
h1, h2, h3, h4, h5, h6 {
|
155
|
-
line-height: 1;
|
156
|
-
}
|
157
|
-
|
158
|
-
h1 {
|
159
|
-
font-size: 3em;
|
160
|
-
letter-spacing: -2px;
|
161
|
-
margin-bottom: 30px;
|
162
|
-
text-align: center;
|
163
|
-
}
|
164
|
-
|
165
|
-
h2 {
|
166
|
-
font-size: 1.2em;
|
167
|
-
letter-spacing: -1px;
|
168
|
-
margin-bottom: 30px;
|
169
|
-
text-align: center;
|
170
|
-
font-weight: normal;
|
171
|
-
|
198
|
+
</li>
|
172
|
-
}
|
173
|
-
|
174
|
-
p {
|
175
|
-
font-size: 1.1em;
|
176
|
-
line-height: 1.7em;
|
177
|
-
}
|
178
|
-
|
179
|
-
|
180
|
-
/* header */
|
181
|
-
|
182
|
-
#logo {
|
183
|
-
float: left;
|
184
|
-
margin-right: 10px;
|
185
|
-
font-size: 1.7em;
|
186
|
-
color: white;
|
187
|
-
text-transform: uppercase;
|
188
|
-
letter-spacing: -1px;
|
189
|
-
padding-top: 9px;
|
190
|
-
font-weight: bold;
|
191
|
-
&:hover {
|
192
|
-
color: white;
|
193
|
-
text-decoration: none;
|
194
|
-
}
|
195
|
-
}
|
196
|
-
|
197
|
-
/* footer */
|
198
|
-
|
199
|
-
footer {
|
200
|
-
margin-top: 45px;
|
201
|
-
padding-top: 5px;
|
202
|
-
border-top: 1px solid $gray-medium-light;
|
203
|
-
color: $gray-light;
|
204
|
-
a {
|
205
|
-
color: $gray;
|
206
|
-
&:hover {
|
207
|
-
color: $gray-darker;
|
208
|
-
}
|
209
|
-
}
|
210
|
-
small {
|
211
|
-
float: left;
|
212
|
-
}
|
213
|
-
ul {
|
214
|
-
float: right;
|
215
|
-
list-style: none;
|
216
|
-
li {
|
217
|
-
float: left;
|
218
|
-
margin-left: 15px;
|
219
|
-
}
|
220
|
-
}
|
221
|
-
}
|
222
|
-
|
223
|
-
/* miscellaneous */
|
224
|
-
|
225
|
-
.debug_dump {
|
226
|
-
clear: both;
|
227
|
-
float: left;
|
228
|
-
width: 100%;
|
229
|
-
margin-top: 45px;
|
230
|
-
@include box_sizing;
|
231
|
-
}
|
232
|
-
|
233
|
-
|
234
|
-
/* sidebar */
|
235
|
-
|
236
|
-
aside {
|
237
|
-
section.user_info {
|
238
|
-
margin-top: 20px;
|
239
|
-
}
|
240
|
-
section {
|
241
|
-
padding: 10px 0;
|
242
|
-
margin-top: 20px;
|
243
|
-
&:first-child {
|
244
|
-
border: 0;
|
245
|
-
padding-top: 0;
|
246
|
-
}
|
247
|
-
span {
|
248
|
-
display: block;
|
249
|
-
margin-bottom: 3px;
|
250
|
-
line-height: 1;
|
251
|
-
}
|
252
|
-
h1 {
|
253
|
-
font-size: 1.4em;
|
254
|
-
text-align: left;
|
255
|
-
letter-spacing: -1px;
|
256
|
-
margin-bottom: 3px;
|
257
|
-
margin-top: 0px;
|
258
|
-
}
|
259
|
-
}
|
260
|
-
}
|
261
|
-
|
262
|
-
.gravatar {
|
263
|
-
float: left;
|
264
|
-
margin-right: 10px;
|
265
|
-
}
|
266
|
-
|
267
|
-
.gravatar_edit {
|
268
|
-
margin-top: 15px;
|
269
|
-
}
|
270
|
-
|
271
|
-
.stats {
|
272
|
-
overflow: auto;
|
273
|
-
margin-top: 0;
|
274
|
-
padding: 0;
|
275
|
-
a {
|
276
|
-
float: left;
|
277
|
-
padding: 0 10px;
|
278
|
-
border-left: 1px solid $gray-lighter;
|
279
|
-
color: gray;
|
280
|
-
&:first-child {
|
281
|
-
padding-left: 0;
|
282
|
-
border: 0;
|
283
|
-
}
|
284
|
-
&:hover {
|
285
|
-
text-decoration: none;
|
286
|
-
color: blue;
|
287
|
-
}
|
288
|
-
}
|
289
|
-
strong {
|
290
|
-
display: block;
|
291
|
-
}
|
292
|
-
}
|
293
|
-
|
294
|
-
.likes {
|
295
|
-
overflow: auto;
|
296
|
-
margin-top: 0;
|
297
|
-
padding: 0;
|
298
|
-
a {
|
299
|
-
float: left;
|
300
|
-
padding: 0 10px;
|
301
|
-
border-left: 1px solid $gray-lighter;
|
302
|
-
color: gray;
|
303
|
-
&:first-child {
|
304
|
-
padding-left: 0;
|
305
|
-
border: 0;
|
306
|
-
}
|
307
|
-
&:hover {
|
308
|
-
text-decoration: none;
|
309
|
-
color: blue;
|
310
|
-
}
|
311
|
-
}
|
312
|
-
strong {
|
313
|
-
display: block;
|
314
|
-
}
|
315
|
-
}
|
316
|
-
|
317
|
-
.user_avatars {
|
318
|
-
overflow: auto;
|
319
|
-
margin-top: 10px;
|
320
|
-
.gravatar {
|
321
|
-
margin: 1px 1px;
|
322
|
-
}
|
323
|
-
a {
|
324
|
-
padding: 0;
|
325
|
-
}
|
326
|
-
}
|
327
|
-
.shop_avatars {
|
328
|
-
overflow: auto;
|
329
|
-
margin-top: 10px;
|
330
|
-
.gravatar {
|
331
|
-
margin: 1px 1px;
|
332
|
-
}
|
333
|
-
a {
|
334
|
-
padding: 0;
|
335
|
-
}
|
336
|
-
}
|
337
|
-
|
338
|
-
.users.follow {
|
339
|
-
padding: 0;
|
340
|
-
}
|
341
|
-
.shops.follow {
|
342
|
-
padding: 0;
|
343
|
-
}
|
344
|
-
|
345
|
-
|
346
|
-
/* forms */
|
347
|
-
|
348
|
-
input, textarea, select, .uneditable-input {
|
349
|
-
border: 1px solid #bbb;
|
350
|
-
width: 100%;
|
351
|
-
margin-bottom: 15px;
|
352
|
-
@include box_sizing;
|
353
|
-
}
|
354
|
-
|
355
|
-
input {
|
356
|
-
height: auto !important;
|
357
|
-
}
|
358
|
-
|
359
|
-
|
360
|
-
#error_explanation {
|
361
|
-
color: red;
|
362
|
-
ul {
|
363
|
-
color: red;
|
364
|
-
margin: 0 0 30px 0;
|
365
|
-
}
|
366
|
-
}
|
367
|
-
|
368
|
-
.field_with_errors {
|
369
|
-
@extend .has-error;
|
370
|
-
.form-control {
|
371
|
-
color: $state-danger-text;
|
372
|
-
}
|
373
|
-
}
|
374
|
-
|
375
|
-
.checkbox {
|
376
|
-
margin-top: -10px;
|
377
|
-
margin-bottom: 10px;
|
378
|
-
span {
|
379
|
-
margin-left: 20px;
|
380
|
-
font-weight: normal;
|
381
|
-
}
|
382
|
-
}
|
383
|
-
|
384
|
-
#session_remember_me {
|
385
|
-
width: auto;
|
386
|
-
margin-left: 0;
|
387
|
-
}
|
388
|
-
|
389
|
-
/* Users index */
|
390
|
-
|
391
|
-
.users {
|
392
|
-
list-style: none;
|
393
|
-
margin: 0;
|
394
|
-
li {
|
395
|
-
overflow: auto;
|
396
|
-
padding: 10px 0;
|
397
|
-
border-bottom: 1px solid $gray-lighter;
|
398
|
-
}
|
399
|
-
}
|
400
|
-
.shops {
|
401
|
-
list-style: none;
|
402
|
-
margin: 0;
|
403
|
-
li {
|
404
|
-
overflow: auto;
|
405
|
-
padding: 10px 0;
|
406
|
-
border-bottom: 1px solid $gray-lighter;
|
407
|
-
}
|
408
|
-
}
|
409
|
-
|
410
|
-
|
411
|
-
/* microposts */
|
412
|
-
|
413
|
-
.microposts {
|
414
|
-
list-style: none;
|
415
|
-
padding: 0;
|
416
|
-
li {
|
417
|
-
padding: 10px 0;
|
418
|
-
border-top: 1px solid #e8e8e8;
|
419
|
-
}
|
420
|
-
.user {
|
421
|
-
margin-top: 5em;
|
422
|
-
padding-top: 0;
|
423
|
-
}
|
424
|
-
.shop {
|
425
|
-
margin-top: 5em;
|
426
|
-
padding-top: 0;
|
427
|
-
}
|
428
|
-
.content {
|
429
|
-
display: block;
|
430
|
-
margin-left: 60px;
|
431
|
-
img {
|
432
|
-
display: block;
|
433
|
-
padding: 5px 0;
|
434
|
-
}
|
435
|
-
}
|
436
|
-
.timestamp {
|
437
|
-
color: $gray-light;
|
438
|
-
display: block;
|
439
|
-
margin-left: 60px;
|
440
|
-
}
|
441
|
-
.gravatar {
|
442
|
-
float: left;
|
443
|
-
margin-right: 10px;
|
444
|
-
margin-top: 5px;
|
445
|
-
}
|
446
|
-
}
|
447
|
-
|
448
|
-
aside {
|
449
|
-
textarea {
|
450
|
-
height: 100px;
|
451
|
-
margin-bottom: 5px;
|
452
|
-
}
|
453
|
-
}
|
454
|
-
|
455
|
-
span.picture {
|
456
|
-
margin-top: 10px;
|
457
|
-
input {
|
458
|
-
border: 0;
|
459
|
-
}
|
460
|
-
}
|
461
|
-
.morecontent span {
|
462
|
-
display: none;
|
463
|
-
}
|
464
|
-
|
465
199
|
```
|
2
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -112,4 +112,354 @@
|
|
112
112
|

|
113
113
|
|
114
114
|
・script記述後
|
115
|
-

|
115
|
+

|
116
|
+
|
117
|
+
```css
|
118
|
+
@import "bootstrap-sprockets";
|
119
|
+
@import "bootstrap";
|
120
|
+
|
121
|
+
/* mixins, variables, etc. */
|
122
|
+
|
123
|
+
$gray-medium-light: #eaeaea;
|
124
|
+
|
125
|
+
@mixin box_sizing {
|
126
|
+
-moz-box-sizing: border-box;
|
127
|
+
-webkit-box-sizing: border-box;
|
128
|
+
box-sizing: border-box;
|
129
|
+
}
|
130
|
+
|
131
|
+
/* universal */
|
132
|
+
|
133
|
+
body {
|
134
|
+
padding-top: 60px;
|
135
|
+
}
|
136
|
+
|
137
|
+
section {
|
138
|
+
overflow: auto;
|
139
|
+
}
|
140
|
+
|
141
|
+
textarea {
|
142
|
+
resize: vertical;
|
143
|
+
}
|
144
|
+
|
145
|
+
.center {
|
146
|
+
text-align: center;
|
147
|
+
h1 {
|
148
|
+
margin-bottom: 10px;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
/* typography */
|
153
|
+
|
154
|
+
h1, h2, h3, h4, h5, h6 {
|
155
|
+
line-height: 1;
|
156
|
+
}
|
157
|
+
|
158
|
+
h1 {
|
159
|
+
font-size: 3em;
|
160
|
+
letter-spacing: -2px;
|
161
|
+
margin-bottom: 30px;
|
162
|
+
text-align: center;
|
163
|
+
}
|
164
|
+
|
165
|
+
h2 {
|
166
|
+
font-size: 1.2em;
|
167
|
+
letter-spacing: -1px;
|
168
|
+
margin-bottom: 30px;
|
169
|
+
text-align: center;
|
170
|
+
font-weight: normal;
|
171
|
+
color: $gray-light;
|
172
|
+
}
|
173
|
+
|
174
|
+
p {
|
175
|
+
font-size: 1.1em;
|
176
|
+
line-height: 1.7em;
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
/* header */
|
181
|
+
|
182
|
+
#logo {
|
183
|
+
float: left;
|
184
|
+
margin-right: 10px;
|
185
|
+
font-size: 1.7em;
|
186
|
+
color: white;
|
187
|
+
text-transform: uppercase;
|
188
|
+
letter-spacing: -1px;
|
189
|
+
padding-top: 9px;
|
190
|
+
font-weight: bold;
|
191
|
+
&:hover {
|
192
|
+
color: white;
|
193
|
+
text-decoration: none;
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
/* footer */
|
198
|
+
|
199
|
+
footer {
|
200
|
+
margin-top: 45px;
|
201
|
+
padding-top: 5px;
|
202
|
+
border-top: 1px solid $gray-medium-light;
|
203
|
+
color: $gray-light;
|
204
|
+
a {
|
205
|
+
color: $gray;
|
206
|
+
&:hover {
|
207
|
+
color: $gray-darker;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
small {
|
211
|
+
float: left;
|
212
|
+
}
|
213
|
+
ul {
|
214
|
+
float: right;
|
215
|
+
list-style: none;
|
216
|
+
li {
|
217
|
+
float: left;
|
218
|
+
margin-left: 15px;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
|
223
|
+
/* miscellaneous */
|
224
|
+
|
225
|
+
.debug_dump {
|
226
|
+
clear: both;
|
227
|
+
float: left;
|
228
|
+
width: 100%;
|
229
|
+
margin-top: 45px;
|
230
|
+
@include box_sizing;
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
/* sidebar */
|
235
|
+
|
236
|
+
aside {
|
237
|
+
section.user_info {
|
238
|
+
margin-top: 20px;
|
239
|
+
}
|
240
|
+
section {
|
241
|
+
padding: 10px 0;
|
242
|
+
margin-top: 20px;
|
243
|
+
&:first-child {
|
244
|
+
border: 0;
|
245
|
+
padding-top: 0;
|
246
|
+
}
|
247
|
+
span {
|
248
|
+
display: block;
|
249
|
+
margin-bottom: 3px;
|
250
|
+
line-height: 1;
|
251
|
+
}
|
252
|
+
h1 {
|
253
|
+
font-size: 1.4em;
|
254
|
+
text-align: left;
|
255
|
+
letter-spacing: -1px;
|
256
|
+
margin-bottom: 3px;
|
257
|
+
margin-top: 0px;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
.gravatar {
|
263
|
+
float: left;
|
264
|
+
margin-right: 10px;
|
265
|
+
}
|
266
|
+
|
267
|
+
.gravatar_edit {
|
268
|
+
margin-top: 15px;
|
269
|
+
}
|
270
|
+
|
271
|
+
.stats {
|
272
|
+
overflow: auto;
|
273
|
+
margin-top: 0;
|
274
|
+
padding: 0;
|
275
|
+
a {
|
276
|
+
float: left;
|
277
|
+
padding: 0 10px;
|
278
|
+
border-left: 1px solid $gray-lighter;
|
279
|
+
color: gray;
|
280
|
+
&:first-child {
|
281
|
+
padding-left: 0;
|
282
|
+
border: 0;
|
283
|
+
}
|
284
|
+
&:hover {
|
285
|
+
text-decoration: none;
|
286
|
+
color: blue;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
strong {
|
290
|
+
display: block;
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
.likes {
|
295
|
+
overflow: auto;
|
296
|
+
margin-top: 0;
|
297
|
+
padding: 0;
|
298
|
+
a {
|
299
|
+
float: left;
|
300
|
+
padding: 0 10px;
|
301
|
+
border-left: 1px solid $gray-lighter;
|
302
|
+
color: gray;
|
303
|
+
&:first-child {
|
304
|
+
padding-left: 0;
|
305
|
+
border: 0;
|
306
|
+
}
|
307
|
+
&:hover {
|
308
|
+
text-decoration: none;
|
309
|
+
color: blue;
|
310
|
+
}
|
311
|
+
}
|
312
|
+
strong {
|
313
|
+
display: block;
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
317
|
+
.user_avatars {
|
318
|
+
overflow: auto;
|
319
|
+
margin-top: 10px;
|
320
|
+
.gravatar {
|
321
|
+
margin: 1px 1px;
|
322
|
+
}
|
323
|
+
a {
|
324
|
+
padding: 0;
|
325
|
+
}
|
326
|
+
}
|
327
|
+
.shop_avatars {
|
328
|
+
overflow: auto;
|
329
|
+
margin-top: 10px;
|
330
|
+
.gravatar {
|
331
|
+
margin: 1px 1px;
|
332
|
+
}
|
333
|
+
a {
|
334
|
+
padding: 0;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
.users.follow {
|
339
|
+
padding: 0;
|
340
|
+
}
|
341
|
+
.shops.follow {
|
342
|
+
padding: 0;
|
343
|
+
}
|
344
|
+
|
345
|
+
|
346
|
+
/* forms */
|
347
|
+
|
348
|
+
input, textarea, select, .uneditable-input {
|
349
|
+
border: 1px solid #bbb;
|
350
|
+
width: 100%;
|
351
|
+
margin-bottom: 15px;
|
352
|
+
@include box_sizing;
|
353
|
+
}
|
354
|
+
|
355
|
+
input {
|
356
|
+
height: auto !important;
|
357
|
+
}
|
358
|
+
|
359
|
+
|
360
|
+
#error_explanation {
|
361
|
+
color: red;
|
362
|
+
ul {
|
363
|
+
color: red;
|
364
|
+
margin: 0 0 30px 0;
|
365
|
+
}
|
366
|
+
}
|
367
|
+
|
368
|
+
.field_with_errors {
|
369
|
+
@extend .has-error;
|
370
|
+
.form-control {
|
371
|
+
color: $state-danger-text;
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
.checkbox {
|
376
|
+
margin-top: -10px;
|
377
|
+
margin-bottom: 10px;
|
378
|
+
span {
|
379
|
+
margin-left: 20px;
|
380
|
+
font-weight: normal;
|
381
|
+
}
|
382
|
+
}
|
383
|
+
|
384
|
+
#session_remember_me {
|
385
|
+
width: auto;
|
386
|
+
margin-left: 0;
|
387
|
+
}
|
388
|
+
|
389
|
+
/* Users index */
|
390
|
+
|
391
|
+
.users {
|
392
|
+
list-style: none;
|
393
|
+
margin: 0;
|
394
|
+
li {
|
395
|
+
overflow: auto;
|
396
|
+
padding: 10px 0;
|
397
|
+
border-bottom: 1px solid $gray-lighter;
|
398
|
+
}
|
399
|
+
}
|
400
|
+
.shops {
|
401
|
+
list-style: none;
|
402
|
+
margin: 0;
|
403
|
+
li {
|
404
|
+
overflow: auto;
|
405
|
+
padding: 10px 0;
|
406
|
+
border-bottom: 1px solid $gray-lighter;
|
407
|
+
}
|
408
|
+
}
|
409
|
+
|
410
|
+
|
411
|
+
/* microposts */
|
412
|
+
|
413
|
+
.microposts {
|
414
|
+
list-style: none;
|
415
|
+
padding: 0;
|
416
|
+
li {
|
417
|
+
padding: 10px 0;
|
418
|
+
border-top: 1px solid #e8e8e8;
|
419
|
+
}
|
420
|
+
.user {
|
421
|
+
margin-top: 5em;
|
422
|
+
padding-top: 0;
|
423
|
+
}
|
424
|
+
.shop {
|
425
|
+
margin-top: 5em;
|
426
|
+
padding-top: 0;
|
427
|
+
}
|
428
|
+
.content {
|
429
|
+
display: block;
|
430
|
+
margin-left: 60px;
|
431
|
+
img {
|
432
|
+
display: block;
|
433
|
+
padding: 5px 0;
|
434
|
+
}
|
435
|
+
}
|
436
|
+
.timestamp {
|
437
|
+
color: $gray-light;
|
438
|
+
display: block;
|
439
|
+
margin-left: 60px;
|
440
|
+
}
|
441
|
+
.gravatar {
|
442
|
+
float: left;
|
443
|
+
margin-right: 10px;
|
444
|
+
margin-top: 5px;
|
445
|
+
}
|
446
|
+
}
|
447
|
+
|
448
|
+
aside {
|
449
|
+
textarea {
|
450
|
+
height: 100px;
|
451
|
+
margin-bottom: 5px;
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
span.picture {
|
456
|
+
margin-top: 10px;
|
457
|
+
input {
|
458
|
+
border: 0;
|
459
|
+
}
|
460
|
+
}
|
461
|
+
.morecontent span {
|
462
|
+
display: none;
|
463
|
+
}
|
464
|
+
|
465
|
+
```
|
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -104,4 +104,12 @@
|
|
104
104
|
|
105
105
|
|
106
106
|
|
107
|
-
ご教示ください。お願いします。
|
107
|
+
ご教示ください。お願いします。
|
108
|
+
|
109
|
+
###<情報追加>
|
110
|
+
|
111
|
+
・通常の投稿の文字数
|
112
|
+

|
113
|
+
|
114
|
+
・script記述後
|
115
|
+

|